on 03-03-2011 11:44 AM
Hi Experts,
I have a static table in which more than 500 records appears in the table, so vertical scroll is displaying in the table. In each row, check boxes and text boxes displays with the data. When the check box is selected, I will do the calculation based on the selected check box and displays the calculated value to text control of respected row. To achieve this, I am triggering the event iterating the loop over the context to find which check box is selected. When the page gets refreshed, cursor moves to first record.
Since all the check boxes having the same id, I am not able to get from which check box this event has got triggered.
Is there a way to assign unique id to each check box so that I can assign parameter to the control and get from which check box event got triggered. I have tried to generate the table dynamically, even there I couldn't assign id to each check box.
Please through light on this request
Thanks
Murthy
You can identify the table row using event parameter mapping.
Add an action parameter "row" of type I<DataSourceNode>Element to the action for the "onToggle" event and define an event parameter mapping "nodeElement" -> "row".
This will give you the context node element corresponding to the table row where the checkbox has been toggled.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am setting the focus by getting the context attribute and calling request focus
IWDAttributeInfo attributeInfo = wdContext.node<ContextNode>().getNodeInfo().getAttribute("attribname");
wdThis.wdGetAPI().requestFocus(wdContext.node<ContextNode>().get<ContextElement>at(leadselection), attributeInfo);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murthy,
if it is webdynpro application then in the check box action get the leadselection of that table( context node which is binde to that table) and then write your code to populate the values in text fileds in the same row based on condition.
sample code:
To get Lead Selection: int i = wdContext.node<NodeName>().getLeadselection();
To populate the data on same row:
wdContext.node<NodeName>().get<NodeName>ElementAt(i).set<AttributeName>("< EnterValue>");
hope this will help you.
Thanks & Regards,
Bharagva.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is not specific to any platform but common in all whether is CE or 7.0 follow the given procedure
1. Create a common onLeadSelect of table say it selectedRow
2. Assign the same event in onToggle selectedRow of checkbox.
3. Now loop it in such a way that
if (wdContext.nodeAppinvoiceData().getLeadSelection() >= 0)
{
wdContext.currentAppinvoiceDataElement().setIsPreviewSelected(true);
if (wdContext.currentAppinvoiceDataElement().getIsSelected())
{
wdContext.currentAppinvoiceDataElement().setIsSelected(false);
for (int i = 0; i < wdContext.nodeAppinvoiceData().size(); i++)
{
boolean flag = wdContext.nodeAppinvoiceData().getAppinvoiceDataElementAt(i).getIsSelected();
if (flag)
{
break;
}
else
{
}
}
}
else
{
wdContext.currentAppinvoiceDataElement().setIsSelected(true);
}
}
wdContext.currentAppinvoiceDataElement().setIsPreviewSelected(false);
wdContext.nodeAppinvoiceData().clearSelection();
wdContext.nodeAppinvoiceData().setLeadSelection(-1);
BR
Satish Kumar
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
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.