Ah, I see.  You're using "server" state saving, so using the
underlying JSF implementation to save state.  The
Trinidad StateManager (used for client state saving) doesn't
use colons.

-- Adam


On 5/30/07, D. Cardon <[EMAIL PROTECTED]> wrote:
I was looking at the StateManagerImpl class of the com.sun.faces.application 
package, line number
116 in jsf-impl-1.2_03.  It seems like it uses a ':' separator character in 
restoring the view...

Anyway, it turns out I was able to get it working anyway.  After looking at the 
HTML generated,
some process inserted the view state variable as a hidden input of my GWT 
component's 'span'
element.  So, I just used GWT to find that element and add it to the request 
parameters on a GWT
event.  The HTML of the input looked like this:

<input type="hidden" name="org.apache.myfaces.trinidad.faces.STATE" 
value="!j_id25:j_id26">

So, as you can see, the colon is being used here in some way or another.  I'm 
not sure exactly
what role it plays, but it certainly appears to be necessary.

Thanks for your help!

--David


--- Adam Winer <[EMAIL PROTECTED]> wrote:

> That doesn't sound right - we don't expect a colon at all
> in the state token.  What line of code are you looking at?
>
> -- Adam
>
>
> On 5/30/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > Adam,
> >
> > Thanks for the info!
> >
> > Since I'm using the trunk, the org.apache.myfaces.trinidad.faces.STATE is 
what needs to be
> sent
> > (at least, that's what's listed in my CoreResponseStateManager class).
> >
> > So, I now have the GWT request send that variable set to its component's 
id.  I.e., the GWT
> widget
> > in the component tree looks like this:
> >
> > <UIGWTWidget id="j_id29" rendered="true" transient="false"/>
> >
> > When the GWT request is issued, then 
org.apache.myfaces.trinidad.faces.STATE=!j_id29 is sent.
> > However, this causes an index out of bounds error in the StateManagerImpl 
class--apparently,
> it is
> > looking for a string value that looks like:
> >
> > someId:anotherId
> >
> > Since the value I send does not have a colon in it, then I've confused it.  
I couldn't figure
> out
> > what the StateManager is expecting, even after some searching around.  As 
far as my
> requirements,
> > all I really need is for just the GWT component to be constructed on the 
postback.
> >
> > So, how should I format the state string in the request so that trinidad / 
JSF will understand
> it?
> >
> > Thanks again for your help,
> >
> > --David
> >
> > --- Adam Winer <[EMAIL PROTECTED]> wrote:
> >
> > > The Trinidad 1.2 code sends javax.faces.ViewState (the 1.2 spec
> > > requires this), but the trunk doesn't, instead sending
> > > org.apache.myfaces.trinidad.faces.STATE.  If you're using JSF 1.2,
> > > you could (and should) use the Trinidad 1.2 code.
> > >
> > > -- Adam
> > >
> > >
> > >
> > > On 5/29/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > > Thanks for your response, I looked into it and found out that when 
G4JSF builds its
> request,
> > > it
> > > > send the javax.faces.ViewState variable in the request.  Do I need to 
have it send
> something
> > > > different for Trinidad?
> > > >
> > > > --David
> > > >
> > > > --- Adam Winer <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > If there's no tree, I suspect that the state parameter is
> > > > > not getting submitted.  Check the G4JSF code to see if
> > > > > it has hardcoded a list of request parameters to submit.
> > > > >
> > > > > -- Adam
> > > > >
> > > > >
> > > > > On 5/29/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > > > > Hi all,
> > > > > >
> > > > > > I'm using MyFaces Trinidad and am integrating the Google Web 
Toolkit (GWT) to work
> along
> > > with
> > > > > it.
> > > > > > I am using the G4JSF project along with some of my own 
modifications.  So far,
> everything
> > > on
> > > > > the
> > > > > > client side is working just fine, but I am having difficulty 
communicating with the
> server
> > > > > when
> > > > > > the GWT fires an event.  Since the G4JSF project works just fine 
without Trinidad, I
> > > figured a
> > > > > > little  enlightenment on Trinidad's workings would be very helpful.
> > > > > >
> > > > > > Here's the part of the process that is having problems:
> > > > > >
> > > > > > 1. The G4JSF project latches correctly onto the GWT event, which is 
correctly parsed
> from
> > > the
> > > > > > client's request.
> > > > > >
> > > > > > 2. G4JSF implements a phase listener, which propagates the GWT 
event after the Restore
> > > View
> > > > > phase
> > > > > > has completed.
> > > > > >
> > > > > > 3. After the restore view phase completes, the phase listener's 
code correctly runs,
> but
> > > the
> > > > > > component tree is not "restored".  That is, there IS a view root 
available, but it has
> no
> > > > > > children.  So, when "invokeOnComponent" is called on the 
facesContext.getViewRoot(),
> the
> > > GWT
> > > > > event
> > > > > > never makes it to the GWT component.  Also, I noticed that the
> > > > > > 
org.apache.myfaces.trinidadinternal.context.AdfFacesPhaseListener.POSTBACK variable in
> the
> > > > > request
> > > > > > is set to 'false'.
> > > > > >
> > > > > > Now my questions:
> > > > > >
> > > > > > - Shouldn't the component tree be completely constructed by the end 
of the Restore
> View
> > > phase?
> > > > > > - If not, is there a better way to propagate the GWT event to a 
function in the
> backing
> > > bean?
> > > > > > - Since the G4JSF client-server communication works fine in JSF 
without Trinidad, how
> does
> > > > > > Trinidad modify the process?
> > > > > >
> > > > > > Thanks for any help!
> > > > > >
> > > > > > --David Cardon
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> 
____________________________________________________________________________________Choose
> > > the
> > > > > right car based on your needs.  Check out Yahoo! Autos new Car Finder 
tool.
> > > > > > http://autos.yahoo.com/carfinder/
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > 
____________________________________________________________________________________Need a
> > > vacation? Get great deals
> > > > to amazing places on Yahoo! Travel.
> > > > http://travel.yahoo.com/
> > > >
> > >
> >
> >
> >
> >
> > 
____________________________________________________________________________________
> > 8:00? 8:25? 8:40? Find a flick in no time
> > with the Yahoo! Search movie showtime shortcut.
> > http://tools.search.yahoo.com/shortcuts/#news
> >
>



      
____________________________________________________________________________________Fussy?
 Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay 
it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7


Reply via email to