I use to run in the same issue quite often, and use to solve it by:

<logic:iterate id="datum" name="data">
     <bean:write name="dynabean" property="<%=datum%>"/>
</logic:iterate>

where data is a collection e.g. of Strings, with the parameter names, and 
the properties of the dynabean match exactly this parameter names.

Works for me but, actually a hate to use the scriplet. It is necessary, 
AFAIK, since Custom tags in JSP 1.1  does not handle embedded tags.

More suggestion are welcome also for me,

regards,

Adolfo

>From: Anjana Wijayaweera <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: Struts Users Mailing List <[EMAIL PROTECTED]>
>Subject: RE: DynaBeans, DynaClass, DynaMen
>Date: Mon, 15 Jul 2002 20:14:33 +0600
>
>Hi All,
>
>       I need to know if there is any Struts Tag being developed for 1.1
>whiich supports Dynabeans in a
>truely dynamic way.
>
>I have seen examples which go like this
><bean:write name="dynabean" property="property1"/>  BUT this doesn't answer
>my requirement since I need to have a really
>dynamic page and won't be knowing  what the name of the property is which 
>is
>a requirement to use the bean :write tag.
>
>My requirement is to read from a database table a list of custom fields
>which may vary from zero, one to many
>and I have no way of knowing the names of the fields since its dynamic. I
>want to handle this within the
>Struts framework therfore if you have any ideas let me know. I am open to
>any suggestions.
>
>
>
>Regards,
>Anjana
>
>
>
>
>From: Adolfo Miguelez
>Subject: RE: DynaBeans, DynaClass, DynaMen
>Date: Mon, 01 Jul 2002 09:54:52 -0700
>
>----------------------------------------------------------------------------
>----
>
>
>By using dynabeans should not need to modify the custom tags at all.
>BeansUtils package is able to inspect dynabeans itself.
>
>The advantage is that you have not to worry about making your modified
>custom tags for each new release.
>
>Adolfo
>
> >From: [EMAIL PROTECTED]
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: RE: DynaBeans, DynaClass, DynaMen
> >Date: Mon, 1 Jul 2002 12:10:51 -0400
> >
> >
> >Yep, the display tag library...
> >
> >I spent some time looking at the source last night, and modifying it
> >should not be that bad...
> >
> >Thanks for the feedback!
> >
> >-----Original Message-----
> >From: pelly69 [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, July 01, 2002 11:05 AM
> >To: struts-user
> >Subject: Re: DynaBeans, DynaClass, DynaMen
> >
> >
> >I have implemented the same approach: getting results from a database
> >query
> >and wrap them in an ArrayList of dynabeans. In that way I can use the
> >Struts
> >Customs tags in order to render the dynabeans content in the JSP.
> >
> >Custom Tags rely on Commons BeanUtils package which is able to inspect
> >any
> >Java Bean or Dynabean to pick up the information.
> >
> >I think your approach is correct,
> >
> >Adolfo.
> >
> >
> > >From: [EMAIL PROTECTED]
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: [EMAIL PROTECTED]
> > >Subject: DynaBeans, DynaClass, DynaMen
> > >Date: Mon, 1 Jul 2002 10:39:46 -0400
> > >
> > >
> > >...anyone remember DynaMen?
> > >
> > >Anyhow...  I got a Dynabean mechanism working that builds a DynaBean
> > >based on the metadata of a SQL result set, populates and array of the
> > >little buggers and passes it back to me.  For displaying I have a tag
> > >library that does not like a call to get('name') as the field name.
> > >What is the best way to get around this?
> > >
> > >(A) Write a bean to encapsulate the dynabean and provide hard method
> > >gets and sets
> > >(B) Modify the tag library to detect a DynaBean and access it via a get
> > >and set (not my library)
> > >(C) Don't use dynabeans for this sort of thing
> > >(D) None of the above you dufus
> > >
> > >I can do any of the above - I just want to make sure that there is not
> > >an obvious way I am missing.
> > >
> > >Thanks and happy monday
> > >
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>




<HTML>
      <HEAD>
             <TITLE>Adolfo's signature</TITLE>
      </HEAD>
      <BODY>
             <center><b><em>Adolfo Rodriguez Miguelez</em><b></center>

      </BODY>
      </HTML>





_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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

Reply via email to