Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 20496 invoked from network); 12 Jun 2008 20:29:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jun 2008 20:29:55 -0000 Received: (qmail 22042 invoked by uid 500); 12 Jun 2008 20:29:57 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 21993 invoked by uid 500); 12 Jun 2008 20:29:57 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 21982 invoked by uid 99); 12 Jun 2008 20:29:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2008 13:29:57 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lu4242@gmail.com designates 74.125.46.154 as permitted sender) Received: from [74.125.46.154] (HELO yw-out-1718.google.com) (74.125.46.154) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2008 20:29:07 +0000 Received: by yw-out-1718.google.com with SMTP id 9so2674703ywk.36 for ; Thu, 12 Jun 2008 13:29:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=7gSaVokM3yGoR9XZrOlGcsEqSoDdxmPvWM0l3SwCu+Y=; b=NT4slc5X1S1p6eBSY/rFEnHobpEtBlYZgJja7wj8nzHQJMLHRSTRwaaocfpxe9tSZl 7phR6ler1PJZbN5oGwrzIeurf5rArHx9mhD29LqMsJqTmIIZVs+pKOnK3uEhdWElMC5V uqGYHJmMnZjI5O0QU5GhZv0SjBW4ma6FdDAzs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=j4eWYgX4vKtX6/tYeP/61XKZ7ADyDZce24+u2WTbPa7pc1eCh4yoro3ZNyUThxr9an GnWbXAdqATE8kTi0vs34l7iIP6j4j8fHGIu7OqBMKDiLSttnuHpkyIDX4DqwzohxUjBF kY5vvrEh83PWf/ybdrXTyfEqrtUlc+c3UorQo= Received: by 10.151.142.2 with SMTP id u2mr2981032ybn.108.1213302559320; Thu, 12 Jun 2008 13:29:19 -0700 (PDT) Received: by 10.150.216.5 with HTTP; Thu, 12 Jun 2008 13:29:19 -0700 (PDT) Message-ID: Date: Thu, 12 Jun 2008 15:29:19 -0500 From: "Leonardo Uribe" To: "MyFaces Development" Subject: Re: [trinidad] Why MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_27945_7213695.1213302559292" References: <71235db40806112124o47ae80d8ifbfd86e4bf62e9df@mail.gmail.com> <485129DB.70004@chello.at> <71235db40806120727i21b63288gc25f5ae0e0d805ad@mail.gmail.com> <4851344A.8050602@chello.at> <485138DF.90509@ops.co.at> <48513B31.2040405@chello.at> <48513ED5.8090600@ops.co.at> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_27945_7213695.1213302559292 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi myfaces portlet bridge + myfaces 1.2.3 using jetty and pluto (using the portlet archetype) render this as ViewState param: > page contains a form that was rendered via JSF from host A, and a >> different form that was rendered via JSF from host B? >> > I'd say yes. You might be right. > Don't know much about protlets either, but, I guess one solution can be to > replace only those ViewState fields with the same value as the one > associated with the form the component is embedded in. > > Lets speak code: > > var enclosingForm = findEnclosingForm(theComponent); > var oldViewState = enclosingForm["ViewState"].value; > for (form : forms) > { > if (form["ViewState"].value == oldViewState) > { > form["ViewState"].value = newViewState; > } > } > > Or do any portlet have its own namespace reflected into the element id? > Then this could be checked too, though, this will be a portlet specific > solution then. > > Ciao, > Mario > > ------=_Part_27945_7213695.1213302559292 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi

myfaces portlet bridge + myfaces 1.2.3 using jetty and pluto (using the portlet archetype) render this as ViewState param:

<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="ImubpcgkK/otI292kHnd8m............

I ignore what happens when use multiple jsf portlets in the same page, or when the page is using multiple forms on the same page (normal submits should work on both environmets, but ajaxified components?).

I will take a look in deep about this, at this point the idea of use a getElementsByName to send the view state in ajax calls is the most compatible to apply in tomahawk.

regards

Leonardo Uribe


On Thu, Jun 12, 2008 at 10:20 AM, Mario Ivankovits <mario@ops.co.at> wrote:
Hi!

And also ensure that every ViewState will be replaced and not only the
first [0] one.
When you do have multiple JSF forms (which is valid) each ViewState
needs to be replaced.
   
Yes, but only when they came from the same view!

I don't know much about JSF "portal bridge" stuff. Can this result in a
page contains a form that was rendered via JSF from host A, and a
different form that was rendered via JSF from host B?
I'd say yes. You might be right.
Don't know much about protlets either, but, I guess one solution can be to replace only those ViewState fields with the same value as the one associated with the form the component is embedded in.

Lets speak code:

var enclosingForm = findEnclosingForm(theComponent);
var oldViewState = enclosingForm["ViewState"].value;
for (form : forms)
{
      if (form["ViewState"].value == oldViewState)
      {
           form["ViewState"].value = newViewState;
      }
}

Or do any portlet have its own namespace reflected into the element id?
Then this could be checked too, though, this will be a portlet specific solution then.

Ciao,
Mario


------=_Part_27945_7213695.1213302559292--