Skip to Content
avatar image
Former Member

'select all' in the dropdown

Hi,

I have a requirement where i need to display the dynamic values in the dropdown. Along with the data i should have 'select all' option in the dropdown.

How can i get the select all value in the dropdown along with the database values?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jun 18, 2010 at 11:06 AM
    //Add 'Select All' default entry
    wdContext.nodeDroplist().createAndAddDroplistElement().setValue("Select All");
    // 'Select All' is  added before database values are populated in the list
    while( rs.next()){
         wdContext.nodeDroplist().createAndAddDroplistElement().setValue( rs.getString( "Country"));
    }
    

    regards,

    nikhil

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 18, 2010 at 12:37 PM

    Hi Nikhil,

    Thanks for the reply.

    If we use Select All as you said, can we do internationalization for this value.

    Thanks,

    Madhavi.T

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Madhavi,

      This will not do internationalization. But you can create a message in the Message Pool and use same for assigning value for "Select All"

      Create a Message in Message Pool as type of TEXT.

      String value = wdComponentAPI.getTextAccessor().getText(IMessage<comp>.<Messsage>));
      

      cheers,

      Nikhil

  • avatar image
    Former Member
    Jun 18, 2010 at 01:06 PM

    Hi Nikhil.

    i got it...Thank You

    Add comment
    10|10000 characters needed characters exceeded