Hi Leo,
yes - or we just make the getTransientStateHelper() a public method.
Both is possible.
This we should only do, as Andy has mentioned, if the
TransientStateHelper interface is as clean and small as possible.
best regards,
Martin
On 9/21/10, Leonardo Uribe <lu4242(a)gmail.com> wrote:
Hi Martin
I have been thinking a lot about it and for this one just add two simple
methods on UIComponent could do the job:
public Object getTransient(Serializable key)
{
TransientStateHelper helper = getTransientStateHelper(false);
if (helper != null)
{
return helper.get(key);
}
return null;
}
public Object putTransient(Serializable key, Object value)
{
return getTransientStateHelper().put(key, value);
}
Just like TransientStateHelper.
In theory, these methods will be used by the vdl or renderers, so this two
simple methods will handle these cases correctly.
>From my point of view, these methods in some way looks similar to the ones
used for handle ValueBinding / ValueExpression on UIComponent.
best regards,
Leonardo Uribe
2010/9/16 Martin Marinschek <mmarinschek(a)apache.org>
> Hi Leo,
>
> > I was thinking if the interface provided for handle transient properties
> > should be exposed in some
> > way, adding some methods (getter/setter) on UIComponent, to make
> > possible
> > manipulate them from "outside"
> > the component instance. It will be very useful, specially for
> > UIViewRoot.
>
> +1!
>
> what would be your proposed API?
>
> best regards,
>
> Martin
>
>
> --
>
>
http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces