4 Replies Latest reply on Jan 12, 2010 9:14 PM by sai burgula

    Prepopulation of right side of rich pickList

    sai burgula Novice

      Hi


      Could anyone let me know how to prepopulate the right side of rich picklist



      thanks
      Sai

        • 1. Re: Prepopulation of right side of rich pickList
          Aravind Ksr Newbie

          Hi Sai,


          Here is the snippet of code to prepopulate right side of rich picklist. selectedCustomerList is the list object holds the customer entities which will be displayed on right side of rich pick list.


          <rich:pickList value="#{selectedCustomerList}">
               <s:selectItems value="#{customerList}" var="cust" label="#{cust.customerName}" />
               <s:convertEntity/>
          </rich:pickList>



          Aravind


          • 2. Re: Prepopulation of right side of rich pickList
            sai burgula Novice
            Hi Aravind

            Thanks for the reply.  But the situation is this.  I have a Faculty List retrieved from the database, which I display on the left side of the pickList.  In my web application, the page prior to this where I have certain information displayed, needs to be retrieved and displayed on the right side.


            So where you have the value# parameter I use the database List that I retrieve and display.  On the right side should be the value retrieved from the previous page and displayed.

            I hope you understand my explanation.  I know it is a bit tough to understand without seeing it visually.

            Let me know if you need additional information, and suggest any solution if you have one.

            thanks again for your help

            Sai
            • 3. Re: Prepopulation of right side of rich pickList
              Aravind Ksr Newbie
              Hi Sai,

              customerList variable holds list of data that should be displayed on left side as well as list of data that displays on right side.

              selectedCustomerList variable holds list of data that will be displayed on right side.

              As per your requirement you fetch faculty data from database and that information holds in List A.

              From previous page you get some information which you would like to display on right side and let's assume that you have that information in List B.

              Now customerList = A + B and selectedCustomerList = B

              Hope that it gives some idea about how rich pick list works.

              Aravind


              • 4. Re: Prepopulation of right side of rich pickList
                sai burgula Novice

                Hi Aravind


                Thanks for your quick responses.  The following query is something I posted on this website couple of days back, but due to lack of response, I thought I post it here, so that you can give me some idea about it.


                QUERY
                ------


                I am trying to display database information in my web application. In the sense, any user can view, update, delete data for any table via the application. I have a rich:dataTable and each row of the table is the name of the tables in the database.


                For example consider that I have CUSTOMER and STUDENT as tables. Then in the dataTable displayed, I will have rows which have CUSTOMER and STUDENT listed. Upon clicking any row, the data related to that table can be viewed, and edit and delete links are provided for Edit and Delete operations respectively.


                I have used the rich:dataTable before but the case was different, in which each row of the table was of the same type. Either a CustomerList or a StudentList for example.


                But in this case each row of the dataTable will belong to a different type. How is it to be achieved in Seam and is there a concept of abstract class which I can form and extend all the entities from it. So that I can refer this class for displaying in the dataTable.


                Please provide any viewpoints on this, and if any information is available, kindly do share it.


                Looking forward for a response.


                Please let me know if you have any idea.


                thanks
                Sai