The solution with metadata inheritance sounds very nice. It would fit very well in the way things works now, if would prefer this way - but maybe there are any drawbacks i don't see, but in my opinion, inheritance for the view root would be fine.
Torsten ps: I will try the workarounds and post if they work ( i guess they do ). Am Mittwoch, den 18.10.2006, 15:38 +0000 schrieb Gary VanMatre: > >From: Torsten Krah <[EMAIL PROTECTED]> > > > > But this makes the assumption that the browsers preferences are used ( i > > dont want to make views for every language, one view for all - which > > changes lang according to a property ). > > But i want to use a locale which is "fixed" until a property changes - > > this must be bound to the rootView ( f:view ). > > > > Well, you could bind a hidden attribute to a backing bean and set the local > of the view root there by way of the facesContext. Or, you might be able to > set the local of the view root in the shale view controller's prerender > callback. > > However, I agree that this is something missing in Clay. JSF 1.2 adds a > couple important attributes to the view root that we will want to support > besides the locale. > > renderKitId, beforePhaseListener, afterPhaseListener > > Clay has a couple comment directives: > > <!-- ### clay:page charset="UTF-8" /### --> > <!-- ### clay:remove ### --> > <!-- ### /clay:remove ### --> > > What if we added another for the view root? > > <!-- ### clay:view locale="en_US" beforePhaseListener="@[EMAIL PROTECTED]" > /### --> > > However, if we made it a base component definition, we could take advantage > of the metadata inheritance. > > <component jsfid="f:view" componentType="javax.faces.ViewRoot"> > <attributes> > <set name="locale" bindingType="VB"/> > <set name="renderKitId" bindingType="VB"/> > <set name="beforePhaseListener" bindingType="MB"/> > <set name="afterPhaseListener" bindingType="MB"/> > <set name="afterPhaseListener" bindingType="MB"/> > <attributres> > </component> > > <component jsfid="page1" extends="f:view"> > <attributes> > <set name="locale" value="en_US"/> > </attributes> > </component> > > And, then use it in HTML. > > <span jsfid="page1"/> > > Or, we could do something like this: > <!-- ### clay:view jsfid="page1" /### --> > > What do you think? > > Gary > > > > In JSP thats no problem, but where to est this in xml/html views? > > > > Torsten > > > > Am Mittwoch, den 18.10.2006, 12:58 +0200 schrieb > > [EMAIL PROTECTED]: > > > Hi > > > > > > In html/xml views, this is handled by you in your backing beans, and when > > using resourcebundles by the message tag > > > > > > Hermod > > > > > > -----Original Message----- > > > From: Torsten Krah [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, October 18, 2006 12:54 PM > > > To: user@shale.apache.org > > > Subject: Clay - how to set locale Parameter for f:view in html/xml > > > views? > > > > > > > > > Is there a way to set the locale of the viewRoot? > > > > > > In the jsp: > > > > > > > > > ... > > > > > > > > > does the job. > > > > > > But where to do this in clay html/xml views? > > > > > > Torsten > > > > > > > > > > > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > > > * > > > > > > 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 anti virus programs used > > > in the DnB NOR Group. > > > > > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > > > * > > > > >