You may define de following in the config file (XML).
        <providers>
                <provider name="countries"
className="ar.com.koalas.providers.FixedProvider">
                        <set-property property="keyName" value="key"/>
                        <set-property property="description"
value="value"/>
                        <value key="01" value="Argentina"
tipo="SouthAmerica"/>
                        <value key="02" value="Brasil"
tipo="SouthAmerica"/>
                        <value key="03" value="Italia" tipo="Europe"/>
                        <value key="04" value="Espa�a" tipo="Europe"/>
                </provider>
        </providers>

Then in your JSP you may use the collection like this
        <select name="selTest">
                <prv:options provider="countries"/>
        </select>

Of course, this is a "hardcoded" solution. You can also use an
alternative provider named "JDBCProvider" it is still on its early
development stages, but we think to get a stable solution for the next
week. With the JDBCProvider you will define the Query, and the jndiName
of your datasource. And it populate your collection with the query
result.

If you download the framework you will see a better example.

Regards,
Nicol�s


-----Original Message-----
From: Samyukta Akunuru [mailto:[EMAIL PROTECTED] 
Sent: Mi�rcoles, 11 de Febrero de 2004 12:03 p.m.
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Regarding Array List - Select


Thanks. I read http://providers.sourceforge.net/examples.html
please let me know name of the xml file we need to name it (to define
providers in xml file)-is this compulsory... the following tags in jsp
are not enough???

<html:form action="demo">
        <prv:comboselect name="elements" 
                metadata="idCountry,country,idState,state,idCity,city">
                <prv:select property="country" doMatches="true"/>

        </prv:comboselect>
</html:form>

Finally please clarify metadata and elements
I guess the solution is here if I can get the above syntax right Else I
will have to go back trying with bean:define and logic:iterate tags may
be

Thanks

-----Original Message-----
From: Guillermo Meyer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 8:47 AM
To: 'Struts Users Mailing List'
Subject: RE: Regarding Array List - Select


Take a look at http://providers.sourceforge.net/

-----Original Message-----
From: Samyukta Akunuru [mailto:[EMAIL PROTECTED] 
Sent: Mi�rcoles, 11 de Febrero de 2004 11:43 a.m.
To: Struts Users Mailing List
Subject: RE: Regarding Array List - Select


Qn again:
In the following
<bean:define id="employee" name="employees"  property="supervisor"/>

throws me this exception:
javax.servlet.jsp.JspException: No getter method for property supervisor
of bean employees

-----Original Message-----
From: Gandhi, Snehal Kishore (Cognizant)
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 8:26 AM
To: Struts Users Mailing List
Subject: RE: Regarding Array List - Select


<logic:present name="FileName">
        <logic:iterate id="attachList" name="FileName">
        <logic:iterate id="attachList2" name="FileName">
                <bean:define id="test" name="attachList1"
property="value" />
                <bean:define id="test1" name="attachList2"
property="value" />
                        <html:checkbox property="checkAttachment"
value="<%=test1.toString()%>"/>
                        <a href="javascript:openAttachment('<bean:write
name="attachList1" property="value"/>')">
                        <bean:write name="attachList2" property="value"
/>
                        </a> &nbsp;&nbsp;&nbsp;
        </logic:iterate>
        </logic:iterate>
</logic:present>

try this

-- 
Snehal K. Gandhi         | Email : [EMAIL PROTECTED] 
Financial Services Group | http://www.cognizant.com
<http://www.cognizant.com/>  
Cognizant Corporation    | Ph:91-44-52096000 
Mobile : +91 98400 57326 | Xtn:8118, Vnet:48128 
 -- The secret to enjoying your job is not to change your job but to
change your attitude..



-----Original Message-----
From: Samyukta Akunuru [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 7:45 PM
To: Struts Users Mailing List
Subject: RE: Regarding Array List - Select


I have the same related problem...
i want to use logic:iterate to loop through my bookID values and print
it as a drop down using <html:select> Here is what I am trying to do....

<html:select property="bookID ">

            <html:options collection="books" property="bookID " 
labelProperty="bookName"/>

        </html:select>



seems something wrong with this....how do i do this....


Thanks.
-----Original Message-----
From: Ramachandran [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 8:20 AM
To: Struts Users Mailing List
Subject: Regarding Array List - Select


Hi all,

                I am in the need of help regarding array list with
select option. I am having two Array List. One is for displaying value
in the select box. Other is for value in the option.

                How can i do that one.This is my code. If any body
knows, please mail me.

      Here 'allreqids'  is one arraylist and 'allreqidsonly' is another
arraylist. Here i want to give the value of 'allreqidsonly' in the
option. And 'allreqids' if for berween the options.

      How can i do that one....

      <select name="reqidcheck" size="1">
              <%for(int i = 0; i < allreqids.size(); i++) {%>
               <option
value="<%=allreqids.get(i)%>"><%=allreqids.get(i)%></option>
              <%}%>
       </select>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido
exclusivamente a las personas direccionadas en el mail y puede contener
informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii)
amparada por el secreto profesional. Cualquier opinion en el contenido,
es exclusiva de su autor y no representa necesariamente la opinion de
Interbanking S.A. El acceso no autorizado, uso, reproduccion, o
divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad
ni obligacion legal alguna por cualquier informacion incorrecta o
alterada contenida en este mensaje. Si usted ha recibido este mensaje
por error, le rogamos tenga la amabilidad de destruirlo inmediatamente
junto con todas las copias del mismo, notificando al remitente. No
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni
ninguna de sus partes si usted no es el destinatario. Muchas gracias.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo 
inmediatamente junto con todas las copias del mismo, notificando al remitente. No 
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus 
partes si usted no es el destinatario. Muchas gracias.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to