On 12/2/06 12:29 AM, "Don Brown" <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]> wrote: > On 12/1/06, Mark Menard <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]