From https://issues.apache.org/struts/browse/WW-1458

<@s.textfield name="user.userName"
 value="%{user.userName}"
 label="%{getText('user.userName')}"/>

As discussed on the mailing list, the value is already defaulted to
the name, so the (very common) idiom in question is

<@s.textfield name="user.userName" label="%{getText('user.userName')}"/>


The three use cases I can think of are

1. The name and label key token match

2. The name and label key tokens do not match

3. The label is meant to be empty


(1) If the label key matches the name, then the simplest possible form might be

<@s.textfield key="user.userName" />

which implies that there is a i18n key like

* user.username = "User Name"

and where we search for the i18n message key in all the usual places.

(2) If the label key cannot be made to match the name, the next
simplest form might be something like

<@s.textfield  name="user.userName"  key= "payables.login.username" >

So, if the name attribute is specified we use it verbatim, and we
still use the key attribute to obtain  the label text.

(3) But, what is there is no label to lookup? In that case, we would
specify name, but not label or key.

<@s.textfield name="user.userName" />

Now, this strategy could be the intent of the patch. I couldn't be
sure without applying the patch and running some tests. But, I thought
addressing the use cases one by one would be helpful in any event.

-Ted.

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

Reply via email to