struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mick.Knut...@ubsw.com
Subject RE: logic:Present tag
Date Fri, 23 May 2003 13:38:12 GMT
I have an iterate question as well, and nobody has responded to my first 3 emails, so maybe
I will try here:

I have a simiar issue that I can't resolve and was hoping you could help.
I have this logic iterate that does not print anything out even though there are 3 beans in
my UserContact[]:

<bean:define id="state" name="contactListForm" property="userContacts" />


    <logic:present scope="request" name="contactListForm" >
        <html:select property="userContacts" >
        <html:option value="" key="form.select"/>
            <logic:iterate id="contact" name="contactListForm" property="userContacts">
                <html:options value='<bean:write name="contact" property="contactId"
/>'>
            </logic:iterate>
        </html:form>
    </logic:present>

    <logic:notPresent scope="request" name="contactListForm" >
        <b><font color="red">NO CONTACTS CREATED YET. PLEASE CREATE AT LEAST ONE
CONTACT!</font></b>
    </logic:notPresent>




-----Original Message-----
From: Caroline Holanda [mailto:spencercaroline@yahoo.com]
Sent: Friday, May 23, 2003 3:27 PM
To: Struts Users Mailing List
Subject: RE: logic:Present tag


Gandle,

 Thanks again for the reply, but I guess your code
tests if a property of a collection is not null. What
I need is really test if the collection object, that
is a DynaActionForm property, is null. Following is
the code where I use this:
 
  <html:select property="supplyList" multiple="true"
size="5" styleClass="Campos" style="width:150">
    <logic:present property="supplyColl" >
       <html:optionsCollection property="supplyColl" 
value="value" label="label"/>  
    </logic:present> 
  </html:select> 

  supplyColl is a collection of LabelValueBean.
 
  Caroline

 --- "Gandle, Panchasheel" <pgandle@rwjf.org>
escreveu: > <logic:present property="propertyName"
> scope="request">.
> this would be for collection
> 
> I think it should be 
> <logic:present name="coll" scope="request">
>   <logic:iterate id="idColl" name="coll"
> scope="request">
>     <!-- for property -->
>     <logic:present name="idColl"
> property="propertyName">
>        <!-- do your things here ...-->
>     </logic:present>
>   </logic:iterate>
> </logic:present>
> 
> Thanks
> Panchasheel
> 
> 
> -----Original Message-----
> From: Caroline Holanda
> [mailto:spencercaroline@yahoo.com]
> Sent: Friday, May 23, 2003 8:54 AM
> To: Struts Users Mailing List
> Subject: RE: logic:Present tag
> 
> 
> I'm sorry, I guess I didn't use the write words. I
> want to verify if the properties is not null, and
> execute the tag body only if the collection property
> is not null. Isn't it the case to use <logic:present
> property="propertyName" scope="request">.
> 
>   Thanks for any help.
>   Caroline Holanda
> 
>  --- "Gandle, Panchasheel" <pgandle@rwjf.org>
> escreveu: > you should probably use 
> > <logic:notPresent
> > 
> > 
> > Thanks
> > Panchasheel
> > 609 627 7561
> > 
> > 
> > -----Original Message-----
> > From: Caroline Holanda
> > [mailto:spencercaroline@yahoo.com]
> > Sent: Thursday, May 22, 2003 5:07 PM
> > To: 'Struts Users Mailing List'
> > Subject: logic:Present tag
> > 
> > 
> > Hi List!
> > 
> >   How can I test if a form property, like a
> > collection, is null with the logic:present tag?
> > 
> >   I tried both 
> > <logic:present property="propertyName"
> > scope="request"> and <logic:present
> name="formName"
> > property="propertyName" scope="request">, but it
> > didn't work.
> > 
> >   I can't understand the present tag well. Its
> > description say that name attribute correspond to
> a
> > JSP bean name, but I have an example application
> > that
> > uses this tag setting the name to an attribute
> name
> > that can be set to the request object and it works
> > well.
> > 
> >   Thanks.
> >   Caroline
> > 
> > =====
> > ******************************
> > Cuide das pessoas que vc ama! 
> > Elas são presentes de Deus!
> > 
> >
>
_______________________________________________________________________
> > Yahoo! Mail
> > O melhor e-mail gratuito da internet: 6MB de
> espaço,
> > antivírus, acesso POP3,
> > filtro contra spam. 
> > http://br.mail.yahoo.com/
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> >  
> 
> =====
> ******************************
> Cuide das pessoas que vc ama! 
> Elas são presentes de Deus!
> 
>
_______________________________________________________________________
> Yahoo! Mail
> O melhor e-mail gratuito da internet: 6MB de espaço,
> antivírus, acesso POP3,
> filtro contra spam. 
> http://br.mail.yahoo.com/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
>  

=====
******************************
Cuide das pessoas que vc ama! 
Elas são presentes de Deus!

_______________________________________________________________________
Yahoo! Mail
O melhor e-mail gratuito da internet: 6MB de espaço, antivírus, acesso POP3, filtro contra
spam. 
http://br.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message