on 07-08-2010 11:43 AM
Hi developers,
I am using table popin on Ce 711.
I would like to retrieve the index of the row where the expand/collapse button has been clicked to show/hide the popin.
I do not want to know the lead selection, but the clicked row index, how can that be done?
Thanks, regards
Vincenzo
Hi Vincenzo,
What Bernd has mentioned is the way to go.
We also are using the popin in one of our projects.
Following is the template of the code we use for our popin in the table.
code in wdModifyView:
if(firstTime)
{
//This code assigns the name 'row' to the node element that you click i.e. to the row you click
IWDTablePopin tablePopin = (IWDTablePopin) view.getElement("Popin");
tablePopin.mappingOfOnClose().addSourceMapping("nodeElement", "row");
}
We have an action closePopin assigned to the onClose even od the popin. You have to add the Parameter of the type I<Your Table Node Name>Element to this action with the name 'row' as defined in wdModifyView. This will give you the pointer to the row you clicked. Then you can use this 'ro' to access the clicked row:
Close Action looks like:
public void onActionClosePopin(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, <namespace>.I<My Table Node Name>Element row )
{
//@@begin onActionClosePopin(ServerEvent)
row.setSelectedpopin("");
//@@end
}
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
in wdDoModifyView do the following (this is for a CheckBoxGroup), but I think you can adapt it:
if (firstTime) {
IWDCheckBoxGroup cbg = (IWDCheckBoxGroup) view.getElement("GroupWBLs");
cbg.mappingOfOnToggle().addSourceMapping(IWDCheckBoxGroup.IWDOnToggle.CHECKED, "checked");
cbg.mappingOfOnToggle().addSourceMapping(IWDCheckBoxGroup.IWDOnToggle.INDEX, "index");
}
later you can use this like
public void onActionSetActiveWBLs(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, boolean checked, int index )
{
if (checked == true) {
<your code here>
}
if (checked == false ) {
<your code here accessing the relevant element via the parameter index>
wdContext.nodemynode.getmynodeElementAt(index).getElement()
}
}
Hope this helps
Bernd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
LET CHECK THIS WIKKI AND LET ME KNOW WHERE U R GETTING ERROR/NOT UNDERSTAND
http://wiki.sdn.sap.com/wiki/display/WDJava/TableCellPopininCe7.1withanExample.
RAVINDRA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thanks for replying,
I understand how the procedure works and how mapping is performed.
Closing is ok.
However it seems that popins can be opened only for the lead-selected row.
Also in the code in the tutorial, you use
getLeadSelection
in order to retrieve the current row.
Can I somehow intercept the click event on non-lead selected rows?
Thanks, regards
Vincenzo
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.