on 12-20-2005 5:13 AM
is there any event to handle the current line in a table when the lead selection leaves this line?
hi wei
you can also retrieve the previous table elements other than the immediately previous one.
instead of using
wdcontext.node<node name>.move previous();
use this one
suppose your intended element is say x above the currently selected element.the change your index
i=i-x;(make sure that value of i is positive)
and use the below code to get that element.
wdContext.node<node name>().get<node name>ElementAt(int index);
may i know why do you want to store the currently selected value in the component controller.
hope this helps
regards
saravana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
There are no default handlers for this requirment.
We can store the (previous)lead select in a context attribute..
and use that on onSelect..
IN the onSelect event handler use this code..
//Do process - wat u want to do with the prev select
wdComponentAPI.getMessageManager().reportWarning(wdContext.node<nodename>().get<nodename>ElementAt(<b>wdContext.currentContextElement().getSel_prev()).</b>get<some attr name>());
//Set the current selection
wdContext.currentContextElement().setSel_prev(wdContext.nodeRole().getLeadSelection());
SO every time u r using the prev selected value and then store the current selection for future access
Regards
Bharathwaj
Message was edited by: Bharathwaj R
Hi Bharathwaj,
what does this method setSel_prev mean?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi wei
declare global variable of type int say int k=0.
and another variable of type int say int j=1;
in the event handler of the lead select method give the following code.
{
if(j==1)
{
int i= wdContext.current<node name>Element().index();
wdContext.node<node name>().get<node name>ElementAt(i);
k=i;
}
else
{int i= wdContext.current<node name>Element(). index();
wdContext.node<node name>().get<node name>ElementAt(k);
k=i;
}
j=j+1;
}
hope this helps
regards
saravana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi wei
suppose lineA and lineB are in sucession and you want to get access of the previous table element
in the event handler then the following code might be useful.then in the event handler of the lead select method supp
leadselect action method
{
get the index of the current table element corresponding to the leadselection of line B
int i= wdContext.current<node name>Element(). index();
to get the element at line A.
wdcontext.node<node name>.move previous();
wdContext.node<node name>().get<node name>ElementAt(int index);
}
regards
saravana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi wei
can you elaborate your scenario a bit more.
what do you mean by current line.please could you describe it a bit more.
regards
saravana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.