Hi
I have a doubt regarding test the bean variable with in the array

i give u the example
For example i have array with name matchValue and a string name
surveyMatchType in a bean file
and i want  ot compare and the value in the surveyMatchType give as the
default value in the http page.

Plz help me .
This is the code i has been trying
---------------

 <logic:iterate id="element" name="searchValue" property="matchValue"
indexId="index">
           <p>
        <c:choose>
         <c:when test="${element eq searchValue.surveyMatchType}">
         <option value= "<%=searchValue.getMatchIndex(index.intValue())%>"
selected>
         <c:out value="${element}"/></option>
         </c:when>
         <c:otherwise>
          <option value= "<%=searchValue.getMatchIndex(index.intValue())%>"
>
          <c:out value="${element}"/></option>
     </c:otherwise>
     </c:choose>
     </p>
</logic:iterate>

or
<select property="surveyJoinFour" size="1">
            <logic:iterate id="element" name="searchValue"
property="conditionsValue" indexId="index">
           <p>
          <logic:equal name="searchValue" property="surveyJoinFour"
value="${element}" >
                   <option value=
"<%=searchValue.getConditionsIndex(index.intValue())%>" selected>
                    <c:out value="${element}"/></option>
          </logic:equal>
         <logic:notEqual name="searchValue" property="surveyJoinFour"
value="${element}">
                 <option value=
"<%=searchValue.getConditionsIndex(index.intValue())%>" >
                  <c:out value="${element}"/></option>
       </logic:notEqual>
     </p>
        </logic:iterate>
</select>

Waiting for u best reply

Thanks in advance

Regards
Shashi


----- Original Message -----
From: "Nicolas De Loof" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 19, 2003 1:31 PM
Subject: Re: Displaying


>
> <bean:write name="person" property="personinfo.lastName"/>
>
> this assumes you have getter and setters in your beans
>
> see more in
>
http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/bean
> /package-summary.html#package_description
>
> Nico.
>
>
>
>
> how to i display my bean using the tags included in struts if my bean is
> like this:
> <code>
> public class Person{
> PersonInfoBase personinfo;
> ContactInfoBase contactinfo;
> ....
> }
>
> public class PersonInfoBase{
> getLastName();
> getBirthdate();
> ....
> }
>
> public class ContactInfoBase{
> getAddress();
> getZip();
> ....
> }
> </code>
>
> How do i display like address or lastname is i put the class person in the
> session.attribute:
>
> <code>
> Person person = new Person();
> request.setAttribute("person",person)
> </code>
>
> Can someshow show me how wil the jsp looks like.
>
> thanks a lot in advance.
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to