As of right now nothing is passed through getText() at the moment – 1.3 was the same way. I know at one point this was happening, but it was changed back due to some complications. I think the simplest thing to do here is to have a copy of the xhtml templates that do this for you.

 

As for your example, label=”getText(name.middle)” would work after this change took effect. Right now the way we have it is the worst of both worlds – no automatic way to handle resource keys and no way to make a call to getText() (and not to mention not backwards compatible).

 

I’ll start the migration to making all attributes evaluated by the VS.

 

-Pat

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Drew McAuliffe
Sent:
Thursday, October 09, 2003 11:11 AM
To: [EMAIL PROTECTED]
Subject: RE: [OS-webwork] Compatibility for Tag Attributes

 

Is there support for providing a resource key instead of a text label, so that the label comes from a getText() call? If I'm understanding your proposed change correctly, you could just say

<ww:textfield label="getText(name.middle)" name="name.middle"/>

 

Or does that work? Will "name.middle" in the getText() call get picked up as a string?

 

If this doesn't work, is there another way to do localized labels? This seems like something that should be part of the tag, perhaps using some sort of "resourceKey" attribute. I know that Struts supports this feature, but I can't tell if ww does or not.

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Lightbody
Sent:
Thursday, October 09, 2003 8:48 AM
To: WebWork
Subject: [OS-webwork] Compatibility for Tag Attributes

I just noticed (actually, I’ve known it for a while, but now I need to do something about it) that the UI tags all take plain strings for their labels and a few other attributes. In WebWork 1.3 all attributes were parsed through the ValueStack and so I’m going to switch this back to the original behavior. If there is a great outcry against it, I can offer a config switch that by default would be off and would go back to this behavior. But I’d rather not do that and just keep things compatible. Any large objections? Remember, compatibility may not be a big deal for some people, but for others it’s a deal breaker. Also, 1.3 compatibility was one of the primary goals set forward when creating 2.0.

 

Example of change:

 

<ww:textfield label="Middle Name" name="name.middle" />

vs

<ww:textfield label="’Middle Name’" name="name.middle" />

 

-Pat

 

Reply via email to