To answer your original question, look at the BeanUtils package in
Jakarta Commons.

http://jakarta.apache.org/commons/beanutils.html


In particular, BeanUtils.populate(Object, Map)
-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -----Original Message-----
> From: Jason Pyeron [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 16, 2003 1:07 PM
> To: Tomcat Users List
> Subject: is there a list for jsp / tag development?
> 
> 
> I am trying to get this answered, I guess I dont know where to ask.
> 
> -jason
> 
> On Wed, 15 Jan 2003, Jason Pyeron wrote:
> 
> To those who like to deal with tags,
> 
> I have some JSP code that gets stamped allover every day, it requires 
> tweaking in each situation, hence it is error prone. We 
> decided to make it 
> a tag, but got stuck on two issues:
> 
>  how do we scope the 'formBean' var in the JSP page like 
> <jsp:useBean/>
> 
>  how do we simulate <jsp:setProperty name='formBean' property='*' />
>   now I am sure we can brute force this, by using reflection and 
>   iteration, but is there a method already written?
> 
> here is my JSP code.
> 
>  <jsp:useBean id='formBean' 
> class='com.pyerotechnics.customer.ushr.ca15.intranet.tier2.bea
> ns.Form_IssueEdit'>
>   <%formBean.setPageContext(pageContext);%>
>   <jsp:setProperty name='formBean' property='dataSource' 
> value='jdbc/intranetDB' />
>   <jsp:setProperty name='formBean' property='*' />
>   <%formBean.go();%>
>  </jsp:useBean>
> 
> here is the intended tag syntax.
> 
>  <p:useFormBean 
>     id='formBean' 
>     
> class='com.pyerotechnics.customer.ushr.ca15.intranet.tier2.bea
> ns.Form_IssueEdit'
>     dataSource='jdbc/intranetDB' />
> 
> -Jason Pyeron

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

Reply via email to