Subject: Empty and Equal
From: "Tim Chen" <[EMAIL PROTECTED]>
===
Hi all,
1) Didnt the struts taglib use to have a way to test if a collection is
empty?
I cant seem to find it anymore.
I have a bean that contains an ArrayList.
I want to Output a message if that ArrayList is empty.
I also want a header if it is notEmpty.
I could use the iterate tag but that would print the header for each
iteration of the tag
unless I use some scriptlets to check inside the tag (which defeats the
whole purpose of using taglibs i think).
2) I am using the equal and notEqual of the logic tag to check for a
constant value. That works fine.
However, I would like to use it to match a value coming from another
Bean. Is there a way to do this with out using scriptlets? Perhaps another
taglib from a a different library?
ex.
Bean1
int beanID;
String beanDesc;
Bean2
int beanID;
String beanDesc;
in session:
mybean1 = Bean1;
mybean2 = Bean2;
how can i do:
<logic:equals name="mybean1" property="beanID" value="mybean2.beanID"
scope="session">
<bean:write name="mybean1" property="beanDesc"/>
</logic:equals>
I've tried using the above and also using a bean.write to get the value of
the second bean.
But it seems like unless I start using some scriplets, I cant test a bean
property to another bean property.
And yes, I have RTFM, unfortunately I cant seem to find it in there. It
seems that they've really changed the docs for the Struts taglib. I liked
the old style too. Too bad now you have to dig through several links to get
to the old doc style.
-Tim
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>