You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mark Lowe <ml...@officinedigitali.it> on 2003/02/18 11:20:34 UTC
Fwd: help
Inizio del messaggio inoltrato:
> Da: Mark Lowe <ml...@officinedigitali.it>
> Data: Mar 18 feb 2003 11:16:35 Europe/Rome
> A: Struts List <st...@jakarta.apache.org>
> Oggetto: help
>
> This isn't really a struts question, but is i imagine a typical
> scenrio when attempting to use struts with older systems.
>
> I'm using a legacy cms system were some genius, executing a 'code
> before think' policy, thought it sage to generate sql tables rather
> than just storing data in them.
>
> Does anybody know any clever ways I can get around this.. ?
>
> At the moment I'm using the jdbc metadata which provides a reasonable
> interface to site builders. i.e i read the meta data along with the
> results into a hash and make an array of hashmaps with column names as
> keys. Then the array is fed to the request etc..
>
> e.g.
>
> <logic:iterate id="jism" name="thesqltablename">
> <bean:write name="jism" property="fieldname" /><br />
> </logic:iterate>
>
>
> But i don't like this (although it does work), I'm also running into
> problems when having to return the contents of two tables to my page.
> As i have don't have all the gets and sets in my beans (because i
> don't know ahead of time what the fields are).
>
> Has anyone had any similar problems to solve? Is there a nicer way of
> doing this?
>
> Many thanks
>
> mark
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: help
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Tue, 18 Feb 2003, Mark Lowe wrote:
> I've just taken a closer look at org.apache.commons.beanutils ...
>
> This seems the question i should have been asking, any good references
> for learning how to use this package would be appreciated..
>
The "package description" part of the Javadocs is a good starting point:
http://jakarta.apache.org/commons/beanutils/api/
Other than that, you might find it useful to look inside the Struts code
to see where BeanUtils and PropertyUtils methods are used. That should
give you some ideas.
> Many thanks
>
> mark
Craig
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: help
Posted by Mark Lowe <ml...@officinedigitali.it>.
I've just taken a closer look at org.apache.commons.beanutils ...
This seems the question i should have been asking, any good references
for learning how to use this package would be appreciated..
Many thanks
mark
Martedì, 18 feb 2003, alle 11:20 Europe/Rome, Mark Lowe ha scritto:
>
>
> Inizio del messaggio inoltrato:
>
>> Da: Mark Lowe <ml...@officinedigitali.it>
>> Data: Mar 18 feb 2003 11:16:35 Europe/Rome
>> A: Struts List <st...@jakarta.apache.org>
>> Oggetto: help
>>
>> This isn't really a struts question, but is i imagine a typical
>> scenrio when attempting to use struts with older systems.
>>
>> I'm using a legacy cms system were some genius, executing a 'code
>> before think' policy, thought it sage to generate sql tables rather
>> than just storing data in them.
>>
>> Does anybody know any clever ways I can get around this.. ?
>>
>> At the moment I'm using the jdbc metadata which provides a reasonable
>> interface to site builders. i.e i read the meta data along with the
>> results into a hash and make an array of hashmaps with column names
>> as keys. Then the array is fed to the request etc..
>>
>> e.g.
>>
>> <logic:iterate id="jism" name="thesqltablename">
>> <bean:write name="jism" property="fieldname" /><br />
>> </logic:iterate>
>>
>>
>> But i don't like this (although it does work), I'm also running into
>> problems when having to return the contents of two tables to my page.
>> As i have don't have all the gets and sets in my beans (because i
>> don't know ahead of time what the fields are).
>>
>> Has anyone had any similar problems to solve? Is there a nicer way of
>> doing this?
>>
>> Many thanks
>>
>> mark
>>
>
>
> ---------------------------------------------------------------------
> 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