I agree with Alex that current strut taglib has a big
deficiency.  It allows only access through get/set
methods of a property.  How do I write the size of
collection object to a page without resorting
scriptlet or <%=?  How do I write toString() output to
a page without resorting scriptlet or <%=?

I had a proposal to allow x.y expression to get y
in the this order:
(1) x.getY()
(2) x.y()
(3) x.y

In this way, to write toString of x object to a page,
simply use
<bean:write name="x" property="toString"/>

This proposal is shotdown.  Without this, scriptlet
has to be used in jsp.

ct


--- Arron Bates <[EMAIL PROTECTED]> wrote:
> For one, I recommend getting your properties into
> getter/setter 
> methodology. Simply so you can use the wealth that
> is the Struts tagging 
> system (as it's (the bean spec Struts runs against
> for it's model 
> components) kind of what it's all about).
> 
> By "'raw' String" do you mean the object's
> "toString()" method?... Any 
> property that yields and object to be written out
> will have it's 
> "toString()" method called to write it to the
> output.
> 
> I'm also curious about your "null pointer" issue
> with the nested 
> extension (for some reason :).
> Can I get a hold of the bean and JSP you were trying
> to run it with?...
> 
> Arron.
> 
> 
> Alex Paransky wrote:
> 
> >I am pretty new with struts and wrote the following
> .JSP code.  Is there a
> >better way to write this?  I could not find a tag
> in STRUTS to let me just
> >get the property from the object.  My object does
> not have get/set methods,
> >so I had to resort to using <%= tag.  Is there a
> tag in STRUTS that would
> >just access the "raw" String attribute of the
> object instead of calling
> >get/set?
> >
> >I also tried using the keyboardmonkey nested
> library, but kept getting
> >NullPointerExceptions when nested:iterate would
> execute
> >
> ><jsp:useBean id="profileHeaders"
>
>class="com.myprofiles.client.web.bean.MemberProfileHeadersBean"
> />
> ><logic:iterate id="profile" name="profileHeaders"
> property="profiles"
>
>type="com.myprofiles.service.common.ProfileHeaderValue">
> >  <%=profile.name%>
> >  <%=profile.description%>
> ></logic:iterate>
> >
> >Thanks.
> >
> >
> >-AP_
> >www: http://www.alexparansky.com
> >
> >
> >--
> >To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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

Reply via email to