on 05-28-2008 2:32 PM
hi
i have a scenario where a table contains
multiple rows and on select of a particular row
and click a button i need to get model window
which has data in input fields with that particular rows
selection
here iam not using onLeadSelect()
just click on the partucular row or select a particular
row then click a button , i need to get the select row
data on the pop-up window input fields
how can this be achieved .
hi,
first create another window named(second) and embedd the view for showing the selected table data.
the view is taking data from same component controller so it will automatically reflect in this view when u select table.
for creating model window u can use this pice of code in lead selction property of table
IWDWindowManager winMgr= wdThis.wdGetAPI().getComponent().getWindowManager();
IWDWindowInfo winInfo=wdThis.wdGetAPI().getComponent().getComponentInfo().
findInWindows("second");
IWDWindow changeFontWindow=winMgr.createModalWindow(winInfo);
changeFontWindow.setWindowPosition(WDWindowPos.CENTER);
changeFontWindow.setTitle("Title");
changeFontWindow.show();
Regards
Trilochan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I)
wdContext.currentTableNodeElement().get<Value>() will give you current LeadSelected Element attribute Value.
you can use this in OnAction button to create the modal window and pass the attributes to it.
II)
Or if the view is available in the same component, just map that value and show the window on OnAction of button will give you currently selected row details on other window.
nikhiL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is this button part of the table row?
Regards
Ayyapparaj
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 the reply
this button is part of the table .
exclusively used to show the selected row in the
pop-up window
and i dont want onLeadselect to be used
i need to select a particular row in the table
then click the button which is part of the table
and populate the selected row int he input fields
any suggestion?
Hi,
Add a paramter "nodeElement" of type IWDNodeelement or <IPublicYour Element> to the action onAction of the button.
Do the following in the wdDomodify
if(firstTime)
IWDButton button = (IWDButton) view.getElement("<BUtton>");
button.mappingOfOnAction().addSourceMapping("nodeElement", "nodeElement");
now in the action hadler you can access the entire attributes using the
nodeElement.get<YourAttribute>
Or
nodeElement.getAttributeValue("<yourattribute>");
Populate this values to the context which is mapped to the input fields
Rest to show the popup already the code is posted in this thread.
Regards
Ayyapparaj
Hi,
if u want the selected row record in next window on action of button then u can get value from table source node attribute and make all attribute which u want to show in second window view and set these attributes by getting value from first window view.
in onAction write this
wdContext.currentContextElement().setNewFirst(wdContext.currentAddressElement().getFirst());
wdContext.currentContextElement().setNewSecond(wdContext.currentAddressElement().getSecond());
IWDWindowManager winMgr = wdComponentAPI.getWindowManager();
IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().getWindow("Second");
IWDWindow win = winMgr.createModalWindow(winInfo);
win.setWindowPosition(WDWindowPos.CENTER);
win.setTitle("Model Window");
win.show();
Regards
Trilochan
User | Count |
---|---|
74 | |
10 | |
7 | |
6 | |
6 | |
5 | |
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.