on 06-07-2008 12:05 PM
hi
i have two tables , in the first scenatio
when the two tables are empty it should shown a error
message , plz do some operation to populate data in the table.
second scenario when the data is populated , there should be no multi selection in the two table .
and if one row is selected from one table and nothing is
selected from another table it should show error
i am trying this application with using some boolean
condition , but its not working as required
can any one help me ?
Hi
lets say you have two value nodes nodetable1 and nodetable2
For the first scenario
when the two tables are empty it should shown a error
message
For this u can check nodes size.
if(wdContext.nodetable1.size()==0 && wdContext.nodetable2.size()==0)
//ur error message
For second scenario when the data is populated , there should
be no multi selection in the two table .
For implementing the above scenario u can set ur table
selectionMode to single.
For the third scenario.
if one row is selected from one table and nothing is
selected from another table
For implementing the above scenario u need to initially keep ur
both nodes lead selection to -1.So that initially no row would be
selected in both the tabes.
wdContext.nodetable1.setLeadSelection(-1);
wdContext.nodetable2.setLeadSelection(-1);
for checking the 3rd scenario
if(wdContext.nodetable1.getLeadSelection()!=-1 && wdContext.nodetable2.getLeadSelection()!=-1)
//Any Processing if both tables are selected
else
//ur error message
I hope now u r clear with ur doubts.
Regards
Surender Dahiya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi dahiya
i have followed the procedure u have mentioned
and i have a issue with multimatch ,
problem is i cannot make the table selection property
as single selection , as this table is used in
two procedures , one with single selection and other
with multi selection . and other thing is for
showing one table selected and other table not selected
i have used lead selection , but for the else i need
to show different messages for different tables
i am able to show the message for single table that is first table and for the second table i am not able too .
Hi,
why dont u bind ur table selectionMode to context variable so
that in whichever procedure u want ur table to behave as single
selection u can set this variable to single and in other to multi.
say u created a context variable tableselection of type
com.sap.ide.webdynpro.uielementdefinitions.TableSelectionMode
just bind this variable to selectionMode of ur table and then u can play
with table selection mode according to ur requirment.
wdContext.currentContextElement().setTableselection(WDTableSelectionMode.SINGLE);
wdContext.currentContextElement().setTableselection(WDTableSelectionMode.MULTI);
dont forget to keep ur node cardinality 0..n.
I hope this helps
regards
Surender Dahiya
hi dahiya
thanks for the response ,
here problem with the selection property to single and
multiple
my single table has both single and multiple selection at the same time .
i mean user can select single row or multiple rows
. i have two button . in which i have written the action code
and for the first button user will or should select only one
row from the both table and click on first button and in this scenario mutiple selection is not allowed .
for the above what u have mentioned above in the post i have done with binding the context atrribute and making it single .
not in the same table i need have multiple selection and
then click on the second button , in the second button
i have other action code .
in which i have made the table as multiple ,but here only
single selection is only working ,
What exactly have you tried already?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.