On 9/21/07, Simon Lessard <[EMAIL PROTECTED]> wrote:
> Hello Jeanne,
>
> I could live with that as long as the XSD should prevents the usage of both
> a bundle and a map at the same time. However, I would prefer a
> "resource-bundle" element than a "translation-map". For one, it's much
> easier to create a ResourceBundle from a Map than the other way around.

It's easy enough to do either, but its not really a ResourceBundle instance
unless you can get it via ResourceBundle.getBundle().

IMO, the real point here is just saying "let's get it from EL, instead of
loading a ResourceBundle ourselves, so it can be anything, ResourceBundle,
Map, we don't care".  So name the element <translation-source> perhaps?

-- Adam


> Also, that would be more aligned with JSF 1.2 since its include a way to
> define resource-bundle with a var name within the faces-config.xml.
>
> ~ Simon
>
>
> On 9/21/07, Jeanne Waldman < [EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I have a new issue I need to resolve and I wanted to run by my solution --
> > https://issues.apache.org/jira/browse/TRINIDAD-728
> > "support for el to be used in a skin to bind to other translation data
> sources"
> >
> > Currently, a SkinExtension and SkinAddition can have resource bundles
> associated with them so that a person can "skin" text.
> > We have customers who want to use a Map that is EL-accessible instead of a
> ResourceBundle.
> >
> > I'd like to add a  'translation-map' element to the <skin> and
> <skin-addition> elements in trinidad-skins.xml.
> > I'd add new constructors to SkinExtension and SkinAddition to accept a
> translationMap ValueExpression.
> >
> > Let me know what you think and if you think 'translation-map' is a good
> name for the new element.
> > See below for an example.
> >
> > Thanks,
> > Jeanne
> >
> > from trinidad-skins.xml:
> >     <skin>
> >         <id>
> >             purple.desktop
> >         </id>
> >         <family>
> >             purple
> >         </family>
> >         <render-kit-id>
> >             org.apache.myfaces.trinidad.desktop
> >         </render-kit-id>
> >         <style-sheet-name>
> >             skins/purple/purpleSkin.css
> >         </style-sheet-name>
> >         <bundle-name>
> >
> org.apache.myfaces.trinidaddemo.resource.SkinBundle
> >         </bundle-name>
> >     </skin>
> >     <!-- You can extend any skin you want. Here we want the purple
> >     skin, but with a bigger font size -->
> >     <skin>
> >         <id>
> >             purpleBigFont.desktop
> >         </id>
> >         <family>
> >             purpleBigFont
> >         </family>
> >         <extends>
> >             purple.desktop
> >         </extends>
> >         <render-kit-id>
> >             org.apache.myfaces.trinidad.desktop
> >         </render-kit-id>
> >         <style-sheet-name>
> >             skins/purple/purpleBigFontSkin.css
> >         </style-sheet-name>
> >         <translation-map>#{skinTranslationMap.contents}</translation-map>
> >     </skin>
> >
>
>

Reply via email to