You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pat Quinn <pa...@hotmail.com> on 2003/03/14 15:06:36 UTC

& 2D String Array without a Form Bean

Hi Guys,

Sorry to ask such a basic question but i've searched the archive and failed 
to find a suitable answer to my question so heres my problem:

I'm having some trouble getting <logic:iterate/> to work with a 2D String 
array when using it without a form bean. Heres what i'm trying to do:

I have an action which inserts a two dimensional String Array (i.e. 
tabledata) in to the request.



In my JSP i do the following:

<logic:iterate id="datarow" name="tabledata" indexId="counter">
	<tr>
		<td><bean:write name="<%=datarow[counter][0]%>"/></td>
          	<td><bean:write name="<%=datarow[counter][1]%>"/></td>
        </tr>
</logic:iterate>


Any ideas???


_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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


Re: Tag Extension

Posted by James Mitchell <jm...@apache.org>.
Why don't you just extend one that already supports most of what you want to
do?



--
James Mitchell
Software Developer/Struts Evangelist
http://struts.sourceforge.net/struts-atlanta/




----- Original Message -----
From: "Renato Romano" <r....@set-network.com>
To: "'Noureddine Bekrar'" <nb...@rennes.jouve.fr>; "'Struts Users Mailing
List'" <st...@jakarta.apache.org>
Sent: Friday, March 14, 2003 10:10 AM
Subject: RE: Tag Extension


You mean something like: ??

Public class SelectPlusButton extends TagSupport
{


doStartTag(...)
{
// Write out a table definition...
SelectTag st = new SelectTag();
st.doStartTag(..);
...
ButtonTag bt = new ButtonTag();
bt.doStartTag();
....
}
}

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________


-----Original Message-----
From: Noureddine Bekrar [mailto:nbekrar@rennes.jouve.fr]
Sent: venerdì 14 marzo 2003 15.52
To: Struts Users Mailing List; r.romano@set-network.com
Subject: Re: Tag Extension


i think to do that , you must write a new tag java class (extends
"TagSupport" class)and in this class you will use a java code of the 2
other classes ( select and option).

and after this you will declare your new tag in the tld file.

----- Original Message -----
From: "Renato Romano" <r....@set-network.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Friday, March 14, 2003 3:24 PM
Subject: Tag Extension


> What is the standard way to "extend" a struts tag, or generally
> whatever jsp tag ? Do I have to extend the Java class Implementing
> that tag ? To be more clear: in my application I have to often use a
> select/options struts tag, together with a button, so it would be
> useful in the jsp page to only use one construct. Any ideas ?
> Thanks a lot.
>
> Renato
>
> P.S.: I know, this is not really a struts question, but I think it
> would be of interest ...
>
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
>
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
>
>
>
> ---------------------------------------------------------------------
> 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


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


Re: Tag Extension

Posted by Nicolas De Loof <ni...@cgey.com>.
Something like this :

public class PoweredSelectTag extends SelectTag {

    /**
     * Add a sumbit button after the select list
     */
    public int doEndTag() throws JspException {
        ... (code taken from other tags, like SubmitTag) ...
    }

}

Nico.

----- Original Message -----
From: "Renato Romano" <r....@set-network.com>
To: "'Noureddine Bekrar'" <nb...@rennes.jouve.fr>; "'Struts Users
Mailing List'" <st...@jakarta.apache.org>
Sent: Friday, March 14, 2003 4:10 PM
Subject: RE: Tag Extension


You mean something like: ??

Public class SelectPlusButton extends TagSupport
{


doStartTag(...)
{
// Write out a table definition...
SelectTag st = new SelectTag();
st.doStartTag(..);
...
ButtonTag bt = new ButtonTag();
bt.doStartTag();
....
}
}

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________


-----Original Message-----
From: Noureddine Bekrar [mailto:nbekrar@rennes.jouve.fr]
Sent: venerdì 14 marzo 2003 15.52
To: Struts Users Mailing List; r.romano@set-network.com
Subject: Re: Tag Extension


i think to do that , you must write a new tag java class (extends
"TagSupport" class)and in this class you will use a java code of the 2
other classes ( select and option).

and after this you will declare your new tag in the tld file.

----- Original Message -----
From: "Renato Romano" <r....@set-network.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Friday, March 14, 2003 3:24 PM
Subject: Tag Extension


> What is the standard way to "extend" a struts tag, or generally
> whatever jsp tag ? Do I have to extend the Java class Implementing
> that tag ? To be more clear: in my application I have to often use a
> select/options struts tag, together with a button, so it would be
> useful in the jsp page to only use one construct. Any ideas ?
> Thanks a lot.
>
> Renato
>
> P.S.: I know, this is not really a struts question, but I think it
> would be of interest ...
>
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
>
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
>
>
>
> --------------------------------------------------------------------
-
> 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


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


Re: Tag Extension

Posted by Nicolas De Loof <ni...@cgey.com>.
As you cannot inherit two classes, I don't think you can "re-use" this
two existing tags code. You could create a new SumitTag instance to
get it's code running from your tag, calling it's setters and
doStart/doEnd methods, but I really don't think it's a good idea (I
sometimes have very bad ideas).

IMHO copying half the code will not be so bad, as struts tag allready
use common tools (RequestUtils...) and you will so have to learn using
them !

Nico.

> Yes i think too that the Nicolas's and James solution is better.
>
> ----- Original Message -----
> From: "Renato Romano" <r....@set-network.com>
> To: "'Noureddine Bekrar'" <nb...@jouve.fr>; "'Struts Users Mailing
List'"
> <st...@jakarta.apache.org>
> Sent: Friday, March 14, 2003 4:26 PM
> Subject: RE: Tag Extension
>
>
> > I was looking at that possibility, but, if doing so, my own tag
should
> > redefine all setter property for the original tags: the
html:select tag,
> > for example has a style attribute; If I use it as a private object
> > inside mine, I have to redefine the getStyle and setStyle methods;
this
> > of course is still valid for all other attributes.
> >
> > It is maybe better to extend one of the tags i want to use, and
then add
> > code, as suggested by Nicolas...
> > What I don't like in this solution is I don't really reuse code
(In the
> > Nicolas example, code from SelectTag is reused, but for writing a
Submit
> > button I have to copy, or write my own code ...)
> >
> > ____________________________________
> > Renato Romano
> > Sistemi e Telematica S.p.A.
> > Calata Grazie - Vial Al Molo Giano
> > 16127 - GENOVA
> >
> > e-mail: r.romano@set-network.com
> > Tel.:   010 2712603
> > _____________________________________
> >
> >
> > -----Original Message-----
> > From: Noureddine Bekrar [mailto:nbekrar@rennes.jouve.fr]
> > Sent: venerdì 14 marzo 2003 16.06
> > To: Struts Users Mailing List; r.romano@set-network.com
> > Subject: Re: Tag Extension
> >
> >
> > exactely
> >
> >
> >
> > ----- Original Message -----
> > From: "Renato Romano" <r....@set-network.com>
> > To: "'Noureddine Bekrar'" <nb...@jouve.fr>; "'Struts Users
Mailing
> > List'" <st...@jakarta.apache.org>
> > Sent: Friday, March 14, 2003 4:10 PM
> > Subject: RE: Tag Extension
> >
> >
> > > You mean something like: ??
> > >
> > > Public class SelectPlusButton extends TagSupport
> > > {
> > >
> > >
> > > doStartTag(...)
> > > {
> > > // Write out a table definition...
> > > SelectTag st = new SelectTag();
> > > st.doStartTag(..);
> > > ...
> > > ButtonTag bt = new ButtonTag();
> > > bt.doStartTag();
> > > ....
> > > }
> > > }
> > >
> > > ____________________________________
> > > Renato Romano
> > > Sistemi e Telematica S.p.A.
> > > Calata Grazie - Vial Al Molo Giano
> > > 16127 - GENOVA
> > >
> > > e-mail: r.romano@set-network.com
> > > Tel.:   010 2712603
> > > _____________________________________
> > >
> > >
> > > -----Original Message-----
> > > From: Noureddine Bekrar [mailto:nbekrar@rennes.jouve.fr]
> > > Sent: venerdì 14 marzo 2003 15.52
> > > To: Struts Users Mailing List; r.romano@set-network.com
> > > Subject: Re: Tag Extension
> > >
> > >
> > > i think to do that , you must write a new tag java class
(extends
> > > "TagSupport" class)and in this class you will use a java code of
the 2
> >
> > > other classes ( select and option).
> > >
> > > and after this you will declare your new tag in the tld file.
> > >
> > > ----- Original Message -----
> > > From: "Renato Romano" <r....@set-network.com>
> > > To: "'Struts Users Mailing List'"
<st...@jakarta.apache.org>
> > > Sent: Friday, March 14, 2003 3:24 PM
> > > Subject: Tag Extension
> > >
> > >
> > > > What is the standard way to "extend" a struts tag, or
generally
> > > > whatever jsp tag ? Do I have to extend the Java class
Implementing
> > > > that tag ? To be more clear: in my application I have to often
use a
> >
> > > > select/options struts tag, together with a button, so it would
be
> > > > useful in the jsp page to only use one construct. Any ideas ?
Thanks
> >
> > > > a lot.
> > > >
> > > > Renato
> > > >
> > > > P.S.: I know, this is not really a struts question, but I
think it
> > > > would be of interest ...
> > > >
> > > > ____________________________________
> > > > Renato Romano
> > > > Sistemi e Telematica S.p.A.
> > > > Calata Grazie - Vial Al Molo Giano
> > > > 16127 - GENOVA
> > > >
> > > > e-mail: r.romano@set-network.com
> > > > Tel.:   010 2712603
> > > > _____________________________________
> > > >
> > > >
> > > >
> > >
> --------------------------------------------------------------------
> > > > -
> > > > 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
> > >
> > >
> >
> >
> >
> >
>
> --------------------------------------------------------------------
-
> > 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


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


Re: Tag Extension

Posted by Noureddine Bekrar <nb...@rennes.jouve.fr>.
Yes i think too that the Nicolas's and James solution is better.

----- Original Message -----
From: "Renato Romano" <r....@set-network.com>
To: "'Noureddine Bekrar'" <nb...@jouve.fr>; "'Struts Users Mailing List'"
<st...@jakarta.apache.org>
Sent: Friday, March 14, 2003 4:26 PM
Subject: RE: Tag Extension


> I was looking at that possibility, but, if doing so, my own tag should
> redefine all setter property for the original tags: the html:select tag,
> for example has a style attribute; If I use it as a private object
> inside mine, I have to redefine the getStyle and setStyle methods; this
> of course is still valid for all other attributes.
>
> It is maybe better to extend one of the tags i want to use, and then add
> code, as suggested by Nicolas...
> What I don't like in this solution is I don't really reuse code (In the
> Nicolas example, code from SelectTag is reused, but for writing a Submit
> button I have to copy, or write my own code ...)
>
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
>
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
>
>
> -----Original Message-----
> From: Noureddine Bekrar [mailto:nbekrar@rennes.jouve.fr]
> Sent: venerdì 14 marzo 2003 16.06
> To: Struts Users Mailing List; r.romano@set-network.com
> Subject: Re: Tag Extension
>
>
> exactely
>
>
>
> ----- Original Message -----
> From: "Renato Romano" <r....@set-network.com>
> To: "'Noureddine Bekrar'" <nb...@jouve.fr>; "'Struts Users Mailing
> List'" <st...@jakarta.apache.org>
> Sent: Friday, March 14, 2003 4:10 PM
> Subject: RE: Tag Extension
>
>
> > You mean something like: ??
> >
> > Public class SelectPlusButton extends TagSupport
> > {
> >
> >
> > doStartTag(...)
> > {
> > // Write out a table definition...
> > SelectTag st = new SelectTag();
> > st.doStartTag(..);
> > ...
> > ButtonTag bt = new ButtonTag();
> > bt.doStartTag();
> > ....
> > }
> > }
> >
> > ____________________________________
> > Renato Romano
> > Sistemi e Telematica S.p.A.
> > Calata Grazie - Vial Al Molo Giano
> > 16127 - GENOVA
> >
> > e-mail: r.romano@set-network.com
> > Tel.:   010 2712603
> > _____________________________________
> >
> >
> > -----Original Message-----
> > From: Noureddine Bekrar [mailto:nbekrar@rennes.jouve.fr]
> > Sent: venerdì 14 marzo 2003 15.52
> > To: Struts Users Mailing List; r.romano@set-network.com
> > Subject: Re: Tag Extension
> >
> >
> > i think to do that , you must write a new tag java class (extends
> > "TagSupport" class)and in this class you will use a java code of the 2
>
> > other classes ( select and option).
> >
> > and after this you will declare your new tag in the tld file.
> >
> > ----- Original Message -----
> > From: "Renato Romano" <r....@set-network.com>
> > To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
> > Sent: Friday, March 14, 2003 3:24 PM
> > Subject: Tag Extension
> >
> >
> > > What is the standard way to "extend" a struts tag, or generally
> > > whatever jsp tag ? Do I have to extend the Java class Implementing
> > > that tag ? To be more clear: in my application I have to often use a
>
> > > select/options struts tag, together with a button, so it would be
> > > useful in the jsp page to only use one construct. Any ideas ? Thanks
>
> > > a lot.
> > >
> > > Renato
> > >
> > > P.S.: I know, this is not really a struts question, but I think it
> > > would be of interest ...
> > >
> > > ____________________________________
> > > Renato Romano
> > > Sistemi e Telematica S.p.A.
> > > Calata Grazie - Vial Al Molo Giano
> > > 16127 - GENOVA
> > >
> > > e-mail: r.romano@set-network.com
> > > Tel.:   010 2712603
> > > _____________________________________
> > >
> > >
> > >
> > > --------------------------------------------------------------------
> > > -
> > > 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
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> 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


RE: Tag Extension

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 14 Mar 2003, Renato Romano wrote:

> Date: Fri, 14 Mar 2003 16:26:49 +0100
> From: Renato Romano <r....@set-network.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>,
>      r.romano@set-network.com
> To: 'Noureddine Bekrar' <nb...@rennes.jouve.fr>,
>      'Struts Users Mailing List' <st...@jakarta.apache.org>
> Subject: RE: Tag Extension
>
> I was looking at that possibility, but, if doing so, my own tag should
> redefine all setter property for the original tags: the html:select tag,
> for example has a style attribute; If I use it as a private object
> inside mine, I have to redefine the getStyle and setStyle methods; this
> of course is still valid for all other attributes.
>

A large number of the standard Struts tag implementations follow the
"extend via subclass" approach.  For example, many of the HTML tags have a
common set of attributes for all the CSS and JavaScript features, and the
tag attribute properties for these are defined in a common base class
(org.apache.struts.taglib.html.BaseHandlerClass).

> It is maybe better to extend one of the tags i want to use, and then add
> code, as suggested by Nicolas...
> What I don't like in this solution is I don't really reuse code (In the
> Nicolas example, code from SelectTag is reused, but for writing a Submit
> button I have to copy, or write my own code ...)
>

When subclassing tag classes, I have found it most convenient to
completely re-implement the doStartTag() and doEndTag() methods.  The
value of the subclass is not having to redo the property getter/setter
methods, or the utility methods that are usually in protected scope.  Some
of the Struts tag implementations split out important stuff into such
utility methods (for example, LinkTag splits out the creation of the
actual URL into a calculateURL() method), but the factoring could be
improved in future versions of the implementations.

Craig

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


RE: Tag Extension

Posted by Renato Romano <r....@set-network.com>.
I was looking at that possibility, but, if doing so, my own tag should
redefine all setter property for the original tags: the html:select tag,
for example has a style attribute; If I use it as a private object
inside mine, I have to redefine the getStyle and setStyle methods; this
of course is still valid for all other attributes. 

It is maybe better to extend one of the tags i want to use, and then add
code, as suggested by Nicolas...
What I don't like in this solution is I don't really reuse code (In the
Nicolas example, code from SelectTag is reused, but for writing a Submit
button I have to copy, or write my own code ...)

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________


-----Original Message-----
From: Noureddine Bekrar [mailto:nbekrar@rennes.jouve.fr] 
Sent: venerdì 14 marzo 2003 16.06
To: Struts Users Mailing List; r.romano@set-network.com
Subject: Re: Tag Extension


exactely



----- Original Message -----
From: "Renato Romano" <r....@set-network.com>
To: "'Noureddine Bekrar'" <nb...@jouve.fr>; "'Struts Users Mailing
List'" <st...@jakarta.apache.org>
Sent: Friday, March 14, 2003 4:10 PM
Subject: RE: Tag Extension


> You mean something like: ??
>
> Public class SelectPlusButton extends TagSupport
> {
>
>
> doStartTag(...)
> {
> // Write out a table definition...
> SelectTag st = new SelectTag();
> st.doStartTag(..);
> ...
> ButtonTag bt = new ButtonTag();
> bt.doStartTag();
> ....
> }
> }
>
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
>
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
>
>
> -----Original Message-----
> From: Noureddine Bekrar [mailto:nbekrar@rennes.jouve.fr]
> Sent: venerdì 14 marzo 2003 15.52
> To: Struts Users Mailing List; r.romano@set-network.com
> Subject: Re: Tag Extension
>
>
> i think to do that , you must write a new tag java class (extends 
> "TagSupport" class)and in this class you will use a java code of the 2

> other classes ( select and option).
>
> and after this you will declare your new tag in the tld file.
>
> ----- Original Message -----
> From: "Renato Romano" <r....@set-network.com>
> To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
> Sent: Friday, March 14, 2003 3:24 PM
> Subject: Tag Extension
>
>
> > What is the standard way to "extend" a struts tag, or generally 
> > whatever jsp tag ? Do I have to extend the Java class Implementing 
> > that tag ? To be more clear: in my application I have to often use a

> > select/options struts tag, together with a button, so it would be 
> > useful in the jsp page to only use one construct. Any ideas ? Thanks

> > a lot.
> >
> > Renato
> >
> > P.S.: I know, this is not really a struts question, but I think it 
> > would be of interest ...
> >
> > ____________________________________
> > Renato Romano
> > Sistemi e Telematica S.p.A.
> > Calata Grazie - Vial Al Molo Giano
> > 16127 - GENOVA
> >
> > e-mail: r.romano@set-network.com
> > Tel.:   010 2712603
> > _____________________________________
> >
> >
> >
> > --------------------------------------------------------------------
> > -
> > 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
>
>




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


Re: Tag Extension

Posted by Noureddine Bekrar <nb...@rennes.jouve.fr>.
exactely



----- Original Message -----
From: "Renato Romano" <r....@set-network.com>
To: "'Noureddine Bekrar'" <nb...@jouve.fr>; "'Struts Users Mailing List'"
<st...@jakarta.apache.org>
Sent: Friday, March 14, 2003 4:10 PM
Subject: RE: Tag Extension


> You mean something like: ??
>
> Public class SelectPlusButton extends TagSupport
> {
>
>
> doStartTag(...)
> {
> // Write out a table definition...
> SelectTag st = new SelectTag();
> st.doStartTag(..);
> ...
> ButtonTag bt = new ButtonTag();
> bt.doStartTag();
> ....
> }
> }
>
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
>
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
>
>
> -----Original Message-----
> From: Noureddine Bekrar [mailto:nbekrar@rennes.jouve.fr]
> Sent: venerdì 14 marzo 2003 15.52
> To: Struts Users Mailing List; r.romano@set-network.com
> Subject: Re: Tag Extension
>
>
> i think to do that , you must write a new tag java class (extends
> "TagSupport" class)and in this class you will use a java code of the 2
> other classes ( select and option).
>
> and after this you will declare your new tag in the tld file.
>
> ----- Original Message -----
> From: "Renato Romano" <r....@set-network.com>
> To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
> Sent: Friday, March 14, 2003 3:24 PM
> Subject: Tag Extension
>
>
> > What is the standard way to "extend" a struts tag, or generally
> > whatever jsp tag ? Do I have to extend the Java class Implementing
> > that tag ? To be more clear: in my application I have to often use a
> > select/options struts tag, together with a button, so it would be
> > useful in the jsp page to only use one construct. Any ideas ?
> > Thanks a lot.
> >
> > Renato
> >
> > P.S.: I know, this is not really a struts question, but I think it
> > would be of interest ...
> >
> > ____________________________________
> > Renato Romano
> > Sistemi e Telematica S.p.A.
> > Calata Grazie - Vial Al Molo Giano
> > 16127 - GENOVA
> >
> > e-mail: r.romano@set-network.com
> > Tel.:   010 2712603
> > _____________________________________
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>


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


RE: Tag Extension

Posted by Renato Romano <r....@set-network.com>.
You mean something like: ??

Public class SelectPlusButton extends TagSupport
{


	doStartTag(...)
	{
		// Write out a table definition...
		SelectTag st = new SelectTag();
		st.doStartTag(..);
		...
		ButtonTag bt = new ButtonTag();
		bt.doStartTag();
		....
	}
}

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________


-----Original Message-----
From: Noureddine Bekrar [mailto:nbekrar@rennes.jouve.fr] 
Sent: venerdì 14 marzo 2003 15.52
To: Struts Users Mailing List; r.romano@set-network.com
Subject: Re: Tag Extension


i think to do that , you must write a new tag java class (extends
"TagSupport" class)and in this class you will use a java code of the 2
other classes ( select and option).

and after this you will declare your new tag in the tld file.

----- Original Message -----
From: "Renato Romano" <r....@set-network.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Friday, March 14, 2003 3:24 PM
Subject: Tag Extension


> What is the standard way to "extend" a struts tag, or generally 
> whatever jsp tag ? Do I have to extend the Java class Implementing 
> that tag ? To be more clear: in my application I have to often use a 
> select/options struts tag, together with a button, so it would be 
> useful in the jsp page to only use one construct. Any ideas ?
> Thanks a lot.
>
> Renato
>
> P.S.: I know, this is not really a struts question, but I think it 
> would be of interest ...
>
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
>
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
>
>
>
> ---------------------------------------------------------------------
> 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


Re: Tag Extension

Posted by Noureddine Bekrar <nb...@rennes.jouve.fr>.
i think to do that , you must write a new tag java class (extends
"TagSupport" class)and in this class you will use a java code of the 2 other
classes ( select and option).

and after this you will declare your new tag in the tld file.

----- Original Message -----
From: "Renato Romano" <r....@set-network.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Friday, March 14, 2003 3:24 PM
Subject: Tag Extension


> What is the standard way to "extend" a struts tag, or generally whatever
> jsp tag ? Do I have to extend the Java class Implementing that tag ? To
> be more clear: in my application I have to often use a select/options
> struts tag, together with a button, so it would be useful in the jsp
> page to only use one construct.
> Any ideas ?
> Thanks a lot.
>
> Renato
>
> P.S.: I know, this is not really a struts question, but I think it would
> be of interest ...
>
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
>
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
>
>
>
> ---------------------------------------------------------------------
> 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


RE: Tag Extension

Posted by apachep2 <ap...@hotmail.com>.
Take a look at sub folders under struts
src/shared/org/apache/struts/taglib. You might want to subclass some of
the tag classes + all the necessary work for defining a tag, e.g. tld.

-----Original Message-----
From: Renato Romano [mailto:r.romano@set-network.com] 
Sent: March 14, 2003 9:25 AM
To: 'Struts Users Mailing List'
Subject: Tag Extension

What is the standard way to "extend" a struts tag, or generally whatever
jsp tag ? Do I have to extend the Java class Implementing that tag ? To
be more clear: in my application I have to often use a select/options
struts tag, together with a button, so it would be useful in the jsp
page to only use one construct.
Any ideas ?
Thanks a lot.

Renato

P.S.: I know, this is not really a struts question, but I think it would
be of interest ...

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________



---------------------------------------------------------------------
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


Tag Extension

Posted by Renato Romano <r....@set-network.com>.
What is the standard way to "extend" a struts tag, or generally whatever
jsp tag ? Do I have to extend the Java class Implementing that tag ? To
be more clear: in my application I have to often use a select/options
struts tag, together with a button, so it would be useful in the jsp
page to only use one construct.
Any ideas ?
Thanks a lot.

Renato

P.S.: I know, this is not really a struts question, but I think it would
be of interest ...

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________



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