on 12-13-2005 4:08 PM
Hello Guys!
Does anybody knows how to get a reference to the context element using the onAction method of the LinkToAction UI element inside a TreeByNestingTableColumn?
The onAction is being called but I cannot get the current context element.
In the wdModifyView I did the source mapping for LinkToAction element but a runtime exception is being thrown.
I'm using NW SP12.
Best Regards,
Marcelo
Marcelo,
Use wdContext.node<yourRecursiveNode>().getTreeSelection();
If this doesn't work for onAction handler, save reference in IWDTable onLeadSelect (using same code)
Additional details and example you can get here: /people/valery.silaev/blog/2005/06/20/master-of-columns-part-ii
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Marcelo,
Just create onLeadSelect action handler for table.
Save reference to selected element (get it via wdContext.node<YourRecursiveNode>().getTreeSelection) to some private controller variable (declared between @@begin other / @@end) in this action handler.
Then in onAction handler of link use this reference as current element.
AFAIR, there was a bug in SP12 that clicking on link in tree does not select row. So it is necessary for user to first select row then click on link. I know how it sounds...
VS
Sadly, we found no workaround so far.
Since SP14 (probably Sp13? -- we skip this version rather quickly there is a possibility to add mapping for all cell editors events:
lnkToAction
.mappingOfOnAction()
.addSourceMapping
(
"nodeElement",
"<name-of-your-on-action-param>"
);
Action param has type of node element (i.e. I<ControllerName>.I<NodeName>Element). So you may access it directly. And even set tree selection yourself.
Valery Silaev
EPAM Systems
Hallo Marcelo,
this new feature (called "Parameter Enrichment for controls in containers") described by Valery is applied within my tutorial on <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/bad3e990-0201-0010-3985-fa0936d901b4">Enhancing Web Dynpro Table Performance</a>. With this parameter it is possible to address the clicked node element without changing the lead selection.
Regards, Bertram
Message was edited by: Bertram Ganz
corrected broken link
> Hallo Marcelo,
>
> this new feature (called "Parameter Enrichment for
> controls in containers") described by Valery is
> applied within my tutorial on
> <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/pr
> troot/com.sap.km.cm.docs/library/uuid/bad3e990-0201">En
> hancing Web Dynpro Table Performance</a>. With
> this parameter it is possible to address the clicked
> node element without changing the lead selection.
>
> Regards, Bertram
Hello Bertram!!!
The link is broken. Could you please fix it?
Thanks!!!
> Sadly, we found no workaround so far.
>
> Since SP14 (probably Sp13? -- we skip this version
> rather quickly there is a possibility to add
> mapping for all cell editors events:
> lnkToAction
> .mappingOfOnAction()
> .addSourceMapping
> (
> "nodeElement",
> "<name-of-your-on-action-param>"
> );
>
> Action param has type of node element (i.e.
> I<ControllerName>.I<NodeName>Element). So you may
> access it directly. And even set tree selection
> yourself.
>
> Valery Silaev
> EPAM Systems
> http://www.NetWeaverTeam.com
Thanks Valery!!!!
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.