struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamie M. Guillemette" <Jamie_Guilleme...@av-basesystems.com>
Subject Re: <bean:write > boolean
Date Fri, 04 Jul 2003 14:03:20 GMT
I dont have a nice simple tag handy to send.. but here is what you should
look up

Look up the object BodyTagSupport. you will want to probably extend this one
to make your tag.
To build the tag there are multiple methods that get involed at different
points of the tag processing. their names are pretty straight forward.

doBeforeBody();
doAfterBody();

ect..

you have access to a request object.. so if you need to read a struts from
value.. just use it to pull the object out of the request or session
memmory.
( if you have never done this manually its pretty easy the string name of
the object is exactly the same as its class name)

JMG





----- Original Message -----
From: "SuniX" <kafchoice@yahoo.fr>
To: <struts-user@jakarta.apache.org>
Sent: Friday, July 04, 2003 9:51 AM
Subject: Re: <bean:write > boolean


> okay ... i've never write tags ....
> can you give me a small example ?
>
> Jamie M. Guillemette a écrit :
> > I might suggest writting your own tag then to ouput the desired text.
Tags
> > are not difficult to write and you can make changes to it pretty easily
if
> > you need to modify the functionality later one.
> >
> > JMG
> >
> >
> >
> > ----- Original Message -----
> > From: "SuniX" <kafchoice@yahoo.fr>
> > To: <struts-user@jakarta.apache.org>
> > Sent: Friday, July 04, 2003 9:40 AM
> > Subject: <bean:write > boolean
> >
> >
> >
> >>hi i have a arraylist of bean with  boolean attributs
> >>and i want to render a image (or another string than true) when it's
> >>true and another image when it's false :
> >>
> >><logic:iterate id="permissionbean" name="permissionsList" >
> >>   <tr>
> >>    <td><bean:write name="permissionbean" property="user.group"/></td>
> >>    <td><bean:write name="permissionbean" property="user.name"/></td>
> >>    <td><bean:write name="permissionbean" property="read"/></td>
> >>    <td><bean:write name="permissionbean" property="write"/></td>
> >><!-- it render "true" or "false" but i want to render "writeable" or
> >>"not writeable" -->
> >>
> >>   </tr>
> >></logic:iterate>
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>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
>
>


---------------------------------------------------------------------
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