cancel
Showing results for 
Search instead for 
Did you mean: 

Selection tablerow cursor

Former Member
0 Kudos

Hi,

When selecting another row, there is a delay on the selection.

The program is putting the cursor in the selected row, before you can enter a value

Any idea to solve it that the user can just enter a value without waiting for the cursor.

Accepted Solutions (1)

Accepted Solutions (1)

Sharathmg
Active Contributor
0 Kudos

The reason for the delay is because a server roundtrip is performed by the Web Dynpro framework and then the lead selection is set to the selected row. During this period the page is on hold and hence unable to make any new entries.

Change the table compatibility mode to nw04s and it should remove this delay.

Regards,

Sharath

Former Member
0 Kudos

I can only chose between: nw04plus or auto
nw04s is not possible

govardan_raj
Contributor
0 Kudos

hi Tim,

as already specified please do parameter mapping for the table , then you will get the current element , like in

wdModifyview method of the view in which this table is present add this code ....

IWDLinkToAction indTransLevelLink = (IWDLinkToAction) view.getElement("LinkToAction");             

   indTransLevelLink.mappingOfOnAction().addSourceMapping("nodeElement","selectedElement");

here LinkToAction is the id of the linktoaction in the table if present , and then you have an action

onActionBBB(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.tc.webdynpro.progmodel.api.IWDNodeElement selectedElement

)

{

 

IPrivate*******View.ITableNodeElement element = (IPrivate*******View.ITableNodeElement)selectedElement;

element.getafb (); -- //this will give you the current elements afb details , this afb is reference to above //table shown by you

.......

}

here wdEvent is by default available and you have to create parameter selectedElement for this action  ,

so any action you have where you are refering the current element just use the above code .

for better understanding read links below

http://help.sap.com/saphelp_dm40/helpdata/en/60/1f1f056f057d4d962375efd3c92ed0/content.htm

Please close the thread if your problem is solved.

Regards

Govardan

Former Member
0 Kudos

Complicated but I'll try this..I can't resolve the function onActionBBB?
Are you sure about these line?

govardan_raj
Contributor
0 Kudos

yes tim ,

Im sure about those lines ,

tell me which part u did not understand ill explain in detail

Regards

Govardan.

Former Member
0 Kudos

Thanks Govardan,

My code:

IWDLinkToAction indTransLevelLink = (IWDLinkToAction) view.getElement("LinkToAction");

indTransLevelLink.mappingOfOnAction().addSourceMapping("nodeElement","selectedElement");

onActionBBB(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.tc.webdynpro.progmodel.api.IWDNodeElement selectedElement);

{

IPrivateOverview.IFormatedTableElement element = IPrivateOverview.IFormatedTableElement)selectedElement;

//test

element.getMaktx();

}

Error: Syntax error, expected ')' after ','

govardan_raj
Contributor
0 Kudos

Hi Tim,

onActionBBB(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.tc.webdynpro.progmodel.api.IWDNodeElement selectedElement);

here remove the ";"  terminator ...

Regards

Govardan

Former Member
0 Kudos

Still the same error as before...I also can't resolve the onActionBBB

govardan_raj
Contributor
0 Kudos

hi tim,

Just do a favour , print stack trace in the action it will give the line numbe where exactly we get the error, there we can localise the issue.

here another thing is OnactionBBB is the action binded the linktoaction UI element of the table, and the first two lines that is ...view.getelement("").... and add source mapping .. should be placed in wdDomodifyView() in the view.


try

{

//paste the code that is in actionBBB here in this block.

}

catch (Exception e)

{

  StackTraceElement element[] = e.getStackTrace();

  StringBuffer buffer = new StringBuffer();

  for(int i=0;i<element.length;i++)

  {

   buffer.append(element[i]);

  }

  wdComponentAPI.getMessageManager().reportException(buffer.toString(),true);

}

Regards

Govardan

Former Member
0 Kudos

You are not get it I think...I can't even build...

This is my error:

     [javac] Compiling 40 source files to C:\SAP\.dtc\13\t\8347DC8DDC435BC462A2648E068E4671\classes

     [javac] ERROR: C:\SAP\.dtc\13\t\8347DC8DDC435BC462A2648E068E4671\gen_wdp\packages\com\carrefour\be\Overview.java:180: ')' expected

     [javac] ERROR: onActionBBB(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.tc.webdynpro.progmodel.api.IWDNodeElement selectedElement)

     [javac] ERROR:                                                                       ^

     [javac] ERROR: C:\SAP\.dtc\13\t\8347DC8DDC435BC462A2648E068E4671\gen_wdp\packages\com\carrefour\be\Overview.java:185: ';' expected

     [javac] ERROR: 

     [javac] ERROR: ^

     [javac] 2 errors

govardan_raj
Contributor
0 Kudos

Hi Tim ,

Can u please post the complete build error .

Regards

Govardan

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tim,

I can see basic programming mistakes, like expected bracket, missing semicolon, etc.

Double check your code Overview.java at line 180 and at line 185

I am sure it'd be easier to locate the problem if we saw the complete source code. Without it it is very difficult to tell where are the syntax problems in your code.

You also said that you can't resolve the onActionBBB(). Normally you create an action in NWDS and then you need to rebuild the wd java project in order to have the corresponding code part written by webdynpro into your source code. Did you do a rebuild after creating an action ?

I hope this helps.

Best Regards,

Ervin

Answers (1)

Answers (1)

govardan_raj
Contributor
0 Kudos

Hi Tim ,

There is delay in selecting another row because when you select or click a row in table that particular element is made lead selected , and also check your table properties ,

Compatibility Mode --> nw04plus or auto

if your nwds is 7.01 then choose that compatibility mode as nw04plus which resolves your problem , and do parameter mapping to get the current element of the table.

Regards

Govardan Raj

Former Member
0 Kudos

After I have changed the mode to nw04plus, the table is always selecting the first row.
How do I get the current element of the table?

Sharathmg
Active Contributor
0 Kudos

Well, that's the side effect of this compatibility mode.

However as a better practice use the parameter mapping for the event. Ex: if you have a UI element with action then link the relevant action with the table element.

Check up for the document on Parameter mapping in WD Java to get tutorials on how to implement the mapping.

Regards,

Sharath

P.S. Thanks for nw04plus correction.