I haven't followed all of the responses and I'm not
sure if this would work, but could you generate your
struts tags to a separate file and then call a struts
template page that would dynamically include the file
you generated?
David
--- "Young, Wayne" <[EMAIL PROTECTED]> wrote:
> Martin,
>
> Thanks for your response. I'm think I can get this
> done if I start modifying
> struts, but I am looking for a simpler solution.
>
> I am trying go dynamically create form elements
> based on a schema. I've been
> using XALAN with FOP & came up with the idea that a
> tag could execute XALAN
> & transform my schema into STRUTS tags. The issue is
> HOW to get the
> generated STRUTS tags processed. An alternate
> solution is to build an editor
> to edits the schema that regenerates portions of the
> JSP file. But this
> would require redeploying the WAR, which isn't
> really a something we want
> our customers doing.
>
> In the following example, I have a schema named
> test.xsd. The
> <app:databyschema> tag would examine the schema and
> generate the <struts>
> tags, which would then render to HTML.
>
> test.xsd
> <xsd:schema
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <xsd:simpleType name="field1" base="xsd:string">
> <xsd:minOccurs="1"/>
> <xsd:maxOccurs="1"/>
> <xsd:pattern value="([A-Z]){1,16}"/>
> </xsd:simpleType>
> <xsd:simpleType name="field2" base="xsd:string">
> <xsd:minOccurs="1"/>
> <xsd:maxOccurs="1"/>
> <xsd:pattern value="([A-Z]){1,16}"/>
> </xsd:simpleType>
>
> So the tag: <app:databyschema schema="test.xsd"/>
> is processed and returns
> <struts:text property="field1" size="16"
> maxlength="16"/>
> <struts:text property="field2" size="16"
> maxlength="16"/>
>
> which is then processed to HTML.
>
> I'm keeping a close eye on this thread & if/when I
> find a solution I'll post
> it.
>
> Thanks for all the responses.
>
> Wayne
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 27, 2001 9:45 PM
> To: [EMAIL PROTECTED]
> Subject: RE: recursive tag
>
>
> Actually, the <logic:iterate> tag doesn't produce
> tags, although it does
> iterate over the tags in its body.
>
> What Wayne wants to do, as I understand it, is have
> a tag that can actually
> generate some JSP containing other tags (in this
> case Struts tags). Those
> tags would then be evaluated, and may in fact
> produce yet more tags, and so
> on until there were no more tags to process.
>
> My guess now, after Nick Pellow pointed out the bug
> in my thinking (thank
> you, Nick! :-) ), is that you just can't do this, at
> least not this way.
>
> Wayne, can you tell us what it is you're trying to
> do? Maybe we can come up
> with an alternative approach.
>
> --
> Martin Cooper
> Tumbleweed Communications
>
>
> At 11:00 PM 2/27/01 -0500, Mallari Kulkarni wrote:
>
> >Hi,
> >
> >Struts "enumerate" tag does that
> >-----Original Message----- From: Young, Wayne
> >[SMTP:[EMAIL PROTECTED]] Sent: Tuesday,
> February 27, 2001 8:22
> >AM To: Struts-Dev@Jakarta. Apache. Org
> >(E-mail) Subject: recursive tag
> >
> >Does anyone know how to create a tag that produces
> struts tags &
> >then recursively processes them.
> >
> >Something like: <app:databyschema schema="test"/>
> is processed and
> >returns <struts:text property="field1" size="16"
> >maxlength="16"/> <struts:text property="field2"
> size="16"
> >maxlength="16"/> which is then processed to HTML.
> >
> >Any help would be appreciated.
> >
> >Thanks.
> >
> >Wayne [EMAIL PROTECTED]
>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/