deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Struberg (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DELTASPIKE-228) Make @MessageBundle annotated type available via EL
Date Sun, 08 Jul 2012 09:38:34 GMT

    [ https://issues.apache.org/jira/browse/DELTASPIKE-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408883#comment-13408883
] 

Mark Struberg commented on DELTASPIKE-228:
------------------------------------------

not even needed, it's much simpler, will hack it quickly.
                
> Make @MessageBundle annotated type available via EL 
> ----------------------------------------------------
>
>                 Key: DELTASPIKE-228
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-228
>             Project: DeltaSpike
>          Issue Type: New Feature
>          Components: I18n-Module, JSF-Module
>    Affects Versions: 0.2-incubating
>            Reporter: Thomas Herzog
>             Fix For: 0.4-incubating
>
>
> After you defined an MessageBundle type, you wanna use it in the views as well without
wrapping the type into a @Named annotated cdi bean to be available to use it via EL.
> It would be fine if the implementation would be created and registrered as an cdi bean
at deployment time and therefore available via EL in the views.
> I think the main usage for the messages is in the views, at least in our usacases.
> Therefore it would also nice to define the name of the created cdi bean via maybe @MessageContextConfig
annotation and default should be the name of the type, but the name of the type could be same,
just placed in different packages.
> If this will be done the developer only has to define his MessageBundle type with the
getter for the messages and configuration via annotation if necessary, and use it in the views
right away.
> Regarding to issue DELTASPIKE-223 it would be necessary to think about follwing possible
issues.
> If there would be multiple choices for the convention of the getter methods for the messages
defined in the MessageBundle type, there could occur follwing problems.
> 1. String welcomeTo(); // Key: welcome_to
> 2. String getWelcomeTo();  // Key: welcome_to with get prefix
> 3  String getWelcomeTo();  // Key: get_welcome_to
> @1
> How will EL resolve the method if called via #{type.welcomeTo} ?
> As far as i know EL would try to invoke getWelcomeTo() method which could not be found
in this case !!
> @2 and 3
> How will it be distiguished if get prefix is part of the key or just the start of the
getter method? 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message