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 Menard <ma...@mjm.net> on 2006/12/02 05:10:10 UTC
[s2] Theme Tutorial
After extending the xhtml theme to handle multi-column layouts I wrote up a
tutorial covering how I did it, and a sample project illustrating it. Anyone
interested in extending the S2 GUI tags might find this helpful. There were
several things that I stumbled on in the process, so you can learn from my
mistakes.
http://www.vitarara.org/cms/node/85
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [s2] Theme Tutorial
Posted by Mark Menard <ma...@mjm.net>.
On 12/2/06 12:29 AM, "Don Brown" <do...@gmail.com> wrote:
> This is very impressive. Would you be interested in donating it to
> the official Struts 2 documentation, or at least, allowing us to link
> to it?
Absolutely. Either would work. I'm in the process of making a cook book as I
go along learning Struts 2. (http://www.vitarara.org/cms/struts2cookbook)
It's only three articles at the moment, but I'm trying to add an article a
week, of similar scope as this tutorial. So, I don't know what would be
better incorporate the article into the S2 documentation, link to it, or
link to the cook book. Thoughts?
Now, to resume a thread from earlier this week.
On 12/1/06 1:53 PM, "Don Brown" <do...@gmail.com> wrote:
> On 12/1/06, Mark Menard <ma...@mjm.net> wrote:
>> In a related vein I would like to add some default properties to the UI
>> tags. Currently I'm passing these things into my template using <s:param>
>> tags. I'd like to be able to do the following though:
>>
>> <s:textfield name="someProperty" inputcolspan="2" />
>>
>> Any idea where I would start with this?
>
> This is a trickier problem. With JSP 2.0 IIRC, they support the
> concept of attributes that aren't defined in the TLD. The problem
> here is that then the tag becomes less useful to tools that provide
> autocompletion. Stripes solves this problem by providing two sets of
> tags - same tags but different TLDs - so you can use the non-varargs
> ones by default but then switch to the varargs when necessary. If you
> think Struts 2 should have this, start a thread on dev@.
So, now do you see my interest in this feature of being able to add
properties to the tags without having to use param.
The following:
<s:textfield name="firstName" label="First Name">
<s:param name="labelcolspan" vaue="%{2}" />
<s:param name="inputcolspan" value="%{2}" />
</s:textfield>
Could be simplified down to:
<s:textfield name="firstName" label="First Name" labelcolspan="%{2}"
inputcolspan="%{2}" />
Then I could also do the following on the form tag:
<s:form action="some.action" colspan="%{8}">
<s:textfield name="firstName" label="First Name" labelcolspan="%{2}"
inputcolspan="%{6}" />
</s:form>
I haven't dug into this deeper. I spent most of last night writing the
tutorial as a means of illustrating how it could be made easier to read with
that extension to the tags.
Take care,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [s2] Theme Tutorial
Posted by Don Brown <do...@gmail.com>.
This is very impressive. Would you be interested in donating it to
the official Struts 2 documentation, or at least, allowing us to link
to it?
Don
On 12/1/06, Mark Menard <ma...@mjm.net> wrote:
> After extending the xhtml theme to handle multi-column layouts I wrote up a
> tutorial covering how I did it, and a sample project illustrating it. Anyone
> interested in extending the S2 GUI tags might find this helpful. There were
> several things that I stumbled on in the process, so you can learn from my
> mistakes.
>
> http://www.vitarara.org/cms/node/85
>
> Mark
>
> ---------------------------------------------------------------------
> 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