<!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...&nbsp; The TransientStateHelper extends StateHelper.&nbsp; Is
this necessary?&nbsp; 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.&nbsp; 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.&nbsp; 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.&nbsp; 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.&nbsp; There are no public
get/putTransient() methods on UIComponent.&nbsp; getTransientStateHelper()
is protected.&nbsp; This means that arbitrary external access to transient
properties is not supported.&nbsp; Is this by design?<br>
  <br>
Also, looking at TransientStateHelper, I see that the property keys are
declared as Serializable.&nbsp; However, isn't the point that these
transient properties are per-request and will not be state saved?&nbsp; Who
is serializing this data?&nbsp; 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>
&nbsp;&nbsp;&nbsp; public Object getTransient(Serializable key)<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TransientStateHelper helper = getTransientStateHelper(false);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (helper != null)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return helper.get(key);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return null;<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; public Object putTransient(Serializable key, Object value)<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return getTransientStateHelper().put(key, value);<br>
&nbsp;&nbsp;&nbsp; }<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>
&gt;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">&lt;<a moz-do-not-send="true"
 href="mailto:mmarinschek@apache.org">mmarinschek@apache.org</a>&gt;</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>
&gt; I was thinking if the interface provided for handle transient
properties<br>
&gt; should be exposed in some<br>
&gt; way, adding some methods (getter/setter) on UIComponent, to make
possible<br>
&gt; manipulate them from "outside"<br>
&gt; 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>