+1

regards,
gerhard



2012/10/5 Mark Struberg <[email protected]>

> Hi folks!
>
> I thought quite some time about how we could do the typesafe messging for
> JSF. Today I had the following idea.
>
>
> Imagine a typesafe message
>
> @MessageBundle
> public interface SimpleMessage
> {
>     @MessageTemplate("Welcome to %s")
>     Message welcomeTo(String name);
> }
>
> This is nice but it's hard to use it for creating FacesMessages that way.
>
> Now imagine the following
>
> @Inject
> JsfMessage<SimpleMessge> message;
>
> ...
>
> message.addInfo().welcomeTo("DeltaSpike);
>
>
>
> public interface JsfMessage<T> {
>   T addInfo();
>   T addWarning();
>   T addError();
>   void clear();
> }
>
>
> I think it is possible to implement this, right?
>
> Wdyt from a users perspective?
>
> LieGrue,
> strub
>
>

Reply via email to