Thanks for sharing that tip.  You can also simply make a JSP 2.0 tag
and bypass the whole Struts 2 tag system if you'd like.  That is a
simple way to create your own tags that encapsulate common HTML.  The
main thing the Struts 2 tags add is the ability to call them from JSP,
Velocity, and Freemarker, but if you are just working with JSP, you
can use it and its tag system directly.

Don

On 5/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Kikoolol.

Thanks for your help, but if you had read my question, you will have
understood that we don't care what will be in my tag. In do know that
displayTag is not Struts...

By the way, I found my mistake. Tags does'nt more exist, it is themes and
templates.

So here is my JSP :
<s:component template="crmTable" theme="xhtml">
        <s:param name="title" value="%{'accueil.mesInterventions'}"/>
        <s:param name="table">
                                <display:table name="interventions">
                                        <display:column title=
"Heure&nbsp;&nbsp;" property="heure" sortable="true"/>
                                        ...
                                </display:table>
        </s:param>
</s:component>

and my template :
<table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
                <td colspan="3">
                        <table border="0" cellpadding="0" cellspacing="0"
width="100%">
                                <tr>
                                        <td><img src="<@s.url
value="img/tableauArrondiTitreGauche.gif"/>"></td>
                                        <td width="100%" class=
"tableauArrondiTitre">
${stack.findValue("getText('"+parameters.title+"')")}</td>
                                        <td><img src="<@s.url
value="img/tableauArrondiTitreDroite.gif"/>"></td>
                                </tr>
                        </table>
                </td>
        </tr>
        <tr>
                <td class="tableauLateral"><img src="<@s.url
value="img/vide.gif"/>" width="1"></td>
                <td width="100%">

                        <div id="display">
                                ${parameters.table}
                        </div>

                </td>

                <td class="tableauLateral"><img src="<@s.url
value="img/vide.gif"/>" width="1"></td>
        </tr>

        <tr>
                <td colspan="3">
                        <table border="0" cellpadding="0" cellspacing="0"
width="100%">
                                <tr>
                                        <td><img src="<@s.url
value="img/tableauArrondiBasGauche.gif"/>"></td>
                                        <td width="100%" class=
"tableauArrondiBas"></td>
                                        <td><img src="<@s.url
value="img/tableauArrondiBasDroite.gif"/>"></td>
                                </tr>
                        </table>
                </td>
        </tr>
</table>

If it could be helpfull for someone...

Michaël.




"Antonio Petrelli" <[EMAIL PROTECTED]>
10/05/2007 15:35
Veuillez répondre à
"Struts Users Mailing List" <user@struts.apache.org>


A
"Struts Users Mailing List" <user@struts.apache.org>
cc

Objet
Re: [S2] Creating my own tag






2007/5/10, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> In fact I would like to put some HTML around displayTag.

DisplayTag IS NOT part of Struts:
http://displaytag.sourceforge.net/

Antonio

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




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

Reply via email to