Skip to Content
author's profile photo Former Member
Former Member

validating the table

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 ?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2008 at 11:42 AM

    What exactly have you tried already?

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2008 at 04:22 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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 ,

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.