<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Another thought... The TransientStateHelper extends StateHelper. Is
this necessary? I would prefer to be able to provide an implementation
of TransientStateHelper (eg. in Trinidad's UIXComponentBase) without
also having to implement the very extensive StateHelper contract. Can
we separate these two?<br>
<br>
BTW, if we consider adding back the public get/putTransient() methods
on UIComponent as Leonardo proposed originally, I kind of wonder
whether we actually need a public TransientStateHelper contract at
all. The details of transient state storage could be handled
internally.<br>
<br>
Andy<br>
<br>
On 10/19/10 3:19 PM, Andy Schwartz wrote:
<blockquote cite="mid:4CBDEF42.7050400@oracle.com" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Gang -<br>
<br>
According to the discussion in this thread, it sounds as if we were
looking for a way to be able to set arbitrary transient
(non-state-saved) properties on UIComponent instances. In particular,
Leonardo stated that:<br>
<br>
<blockquote type="cite">these methods will be used by the vdl or
renderers</blockquote>
<br>
Martin also mentioned:<br>
<br>
<blockquote type="cite">adding some methods (getter/setter) on
UIComponent, to make possible<br>
manipulate them from "outside"the component instance</blockquote>
<br>
Leonardo's original proposal - adding public get/putTransient() method
on UIComponent - accomplishes this goal.<br>
<br>
However, while reviewing the 20101013 API doc for UIComponent, I see
that access to these transient properties from "outside" of the
component instance is no longer possible. There are no public
get/putTransient() methods on UIComponent. getTransientStateHelper()
is protected. This means that arbitrary external access to transient
properties is not supported. Is this by design?<br>
<br>
Also, looking at TransientStateHelper, I see that the property keys are
declared as Serializable. However, isn't the point that these
transient properties are per-request and will not be state saved? Who
is serializing this data? Unless I am missing some reason why this
transient data is being serialized, we should change the type of the
property key to Object.<br>
<br>
Andy<br>
<br>
On 9/20/10 9:12 PM, Leonardo Uribe wrote:
<blockquote
cite="mid:AANLkTi=KNu1t+cEVhSDY7dffqzXVoJ9WAp6df_CugcoE@mail.gmail.com"
type="cite">Hi Martin<br>
<br>
I have been thinking a lot about it and for this one just add two
simple methods on UIComponent could do the job:<br>
<br>
public Object getTransient(Serializable key)<br>
{<br>
TransientStateHelper helper = getTransientStateHelper(false);<br>
if (helper != null)<br>
{<br>
return helper.get(key);<br>
}<br>
return null;<br>
}<br>
<br>
public Object putTransient(Serializable key, Object value)<br>
{<br>
return getTransientStateHelper().put(key, value);<br>
}<br>
<br>
<br>
Just like TransientStateHelper. <br>
<br>
In theory, these methods will be used by the vdl or renderers, so this
two simple methods will handle these cases correctly.<br>
<br>
>From my point of view, these methods in some way looks similar to
the
ones used for handle ValueBinding / ValueExpression on UIComponent.<br>
<br>
best regards,<br>
<br>
Leonardo Uribe<br>
<br>
<div class="gmail_quote">2010/9/16 Martin Marinschek <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:mmarinschek@apache.org">mmarinschek@apache.org</a>></span><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi
Leo,<br>
<div class="im"><br>
> I was thinking if the interface provided for handle transient
properties<br>
> should be exposed in some<br>
> way, adding some methods (getter/setter) on UIComponent, to make
possible<br>
> manipulate them from "outside"<br>
> the component instance. It will be very useful, specially for
UIViewRoot.<br>
<br>
</div>
+1!<br>
<br>
what would be your proposed API?<br>
<br>
best regards,<br>
<br>
Martin<br>
<font color="#888888"><br>
<br>
--<br>
</font>
<div>
<div class="h5"><br>
<a moz-do-not-send="true" href="http://www.irian.at"
target="_blank">http://www.irian.at</a><br>
<br>
Your JSF powerhouse -<br>
JSF Consulting, Development and<br>
Courses in English and German<br>
<br>
Professional Support for Apache MyFaces<br>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>