struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
Subject Re: create text fields/radio buttons dynamically by reading from db
Date Mon, 03 Jan 2005 16:34:11 GMT
Creating the underlying HTML yourself is relatively trivial.  I did 
something similar a few months back...

I had to create a web-based repot design tool (let's not get into why we 
couldn't use any of the millions of canned solutions to this...) 
Anyway, the report itself was basically constructed of a large number of 
<div> tags, all with different style attributes.  All of these details 
were retrieved from a database.  In these layers were all sorts of text, 
images, database field references, etc., all the stuff you'd typically 
see on a banded report design tool.  So, what was rendered in the 
browser was generated completely dynamically from the database entriesm 
but was of course just plain HTML.

This isn't exactly like what your trying to do, but it is similar.  It's 
just a matter of generating <div>'s and their content vs. creating 
<input>'s and their content.  Remember, the taglibs are optional 
components, and they render straight HTML in the end anyway, so just 
bypass them and you can do what you want.

I would say James is right, it IS ugly, but only if you are used to 
using the taglibs in the first place.  If you use them all the time, 
then yes, this will appear ugly :)  If you don't use them much now 
though, this really doesn't seem so bad.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

James Mitchell wrote:
> No, you will not be able to use the struts tags to generate these 
> (html:text, html:radio).  You will need to do this 'by hand' unless you 
> can find some other component/framework that can handle this use case.
> 
> I had the displeasure of working on such a beast about 5 years 
> ago......and let me just say......it was ugly.
> 
> 
> 
> -- 
> James Mitchell
> Software Engineer / Open Source Evangelist
> EdgeTech, Inc.
> 678.910.8017
> AIM: jmitchtx
> 
> ----- Original Message ----- From: "Partho Sandell" 
> <partho.sandell@verizonwireless.com>
> To: <user@struts.apache.org>
> Sent: Monday, January 03, 2005 10:10 AM
> Subject: create text fields/radio buttons dynamically by reading from db
> 
> 
>> I need display html tags on the screen such as text fields, radio 
>> buttons etc
>> by reading them from the database.
>>
>> Is there any way that the text fields/radio buttons can be created 
>> dynamically,
>> in struts framework, by reading the list of html tags from the 
>> database. I
>> would not like to hard code the getters and setters in a bean or add the
>> enteries corresponding to the html tags in configuration files for 
>> dynaform?
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message