Hi There seems to be some problems with this aproach with respect to name resolving.
Scenario : @managed-bean-name is a backing bean X, the table that you want to display (see: Outer HTML template include) is from a bean Person as person on X, and has properties firstName and middleName and so on.... Now doing this: <tr jsfid="clay" clayJsfid="/widgets.html" label="First Name:" property="person.firstName" size="20" maxlength="30" required="true" immediate="false"/> results in: Subsequent characters of component identifier must be a letter, a digit, an underscore ('_'), or a dash ('-')! But component identifier contains "." trying property="['person.firstName']" it also complains Altering: <component jsfid="widgetsText" extends="inputText" id="@property"> <attributes> <set name="value" value="[EMAIL PROTECTED]@property}"/> .... To something like <component jsfid="widgetsText" extends="inputText" id="@property"> <attributes> <set name="value" value="[EMAIL PROTECTED]'@property']}"/> .... results in: java.lang.IllegalArgumentException: component identifier's first character must be a letter or an underscore ('_')! But it is "[" Any suggestions? Hermod -----Original Message----- From: Gary VanMatre [mailto:[EMAIL PROTECTED] Sent: Friday, January 13, 2006 4:12 PM To: Struts Users Mailing List Subject: Re: [shale] clay renderId >> Besides defining these in XML, you can do this sort of thing mixing in HTML templating. >> >> Common XML Config: >> >> <component jsfid="widgetsLabel" extends="baseLabel"> >> <attributes> >> <set name="value" value="@label" /> >> <set name="for" value="@property" /> >> </attributes> >> </component> >> <component jsfid="widgetsText" extends="inputText" id="@property"> >> <attributes> >> <set name="value" value="[EMAIL PROTECTED]@property}"/> >> <set name="size" value="@size" /> >> <set name="maxlength" value="@maxlength" /> >> <set name="required" value="@required" /> >> <set name="immediate" value="@immediate"/> >> </attributes> >> </component> >> <component jsfid="widgetsMessage" extends="baseMessage" > >> <attributes> >> <set name="for" value="@property" /> >> </attributes> >> </component> >> >> HTML template "/widgets.html": >> <tr> >> <td><label jsfid="widgetsLabel">Mock Label:</label></td> >> <td><input jsfid="widgetsText" type="text"/></td> >> <td><span jsfid="widgetsMessage">Mock Message</span><td> >> </tr> >> >> Outer HTML template include: >> <table> >> <tr> >> <td colspan="3"> >> <p>This example show how a pattern of components, label, input >> text and message can be abstracted into a common template. </p> >> </td> >> </tr> >> <tr jsfid="clay" clayJsfid="/widgets.html" label="First Name:" >> property="firstName" size="20" maxlength="30" >> required="true" immediate="false"/> >> <tr jsfid="clay" clayJsfid="/widgets.html" label="Middle Name:" >> property="middleName" size="20" maxlength="30" >> required="false" immediate="false"/> >> <tr jsfid="clay" clayJsfid="/widgets.html" label="Last Name:" >> property="lastName" size="30" maxlength="40" >> required="true" immediate="false"/> >> <tr jsfid="clay" clayJsfid="/widgets.html" label="Business Name:" >> property="lastName" size="40" maxlength="50" >> required="true" immediate="false"/> >> >> </table> >> > >That's really cool, Gary. How would I package widgets.html in a jar >so that it can be referenced in the application like you did in your >example? > Untill we resolve the bug ticket you posted, the html templates can only be loaded from the context root. http://issues.apache.org/bugzilla/show_bug.cgi?id=38168 We should be able to use the same syntax with html resources. <span jsfid="clay" clayJsfid="classpath*:org/acme/html/widgets.html"/> I'm going to make the syntax more simple for including html templates within html templates. <span jsfid="classpath*:org/acme/html/widgets.html"/> I'll try to take a look this weekend but the Broncos are playing and it's ski season here :-) Gary * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]