Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 32990 invoked from network); 3 Nov 2006 09:12:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Nov 2006 09:12:41 -0000 Received: (qmail 50527 invoked by uid 500); 3 Nov 2006 09:12:51 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 50250 invoked by uid 500); 3 Nov 2006 09:12:50 -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 50239 invoked by uid 99); 3 Nov 2006 09:12:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Nov 2006 01:12:50 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Nov 2006 01:12:38 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D432E7142F0 for ; Fri, 3 Nov 2006 01:12:17 -0800 (PST) Message-ID: <25865066.1162545137866.JavaMail.root@brutus> Date: Fri, 3 Nov 2006 01:12:17 -0800 (PST) From: "Matija Mazi (JIRA)" To: dev@myfaces.apache.org Subject: [jira] Commented: (MYFACES-1359) PortletExternalContextImpl.encodeNamespace called during portlet ActionRequest In-Reply-To: <9749911.1152521429860.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/MYFACES-1359?page=comments#action_12446874 ] Matija Mazi commented on MYFACES-1359: -------------------------------------- I accidentally clicked the "Provide patch" link and changed the status of the issue; now I can't revert it. Sorry. Probably something should be done about it? > PortletExternalContextImpl.encodeNamespace called during portlet ActionRequest > ------------------------------------------------------------------------------ > > Key: MYFACES-1359 > URL: http://issues.apache.org/jira/browse/MYFACES-1359 > Project: MyFaces Core > Issue Type: Bug > Components: Portlet_Support > Affects Versions: 1.1.5-SNAPSHOT > Environment: Facelets + Liferay 4.0.0 > Reporter: John Singleton > Attachments: PortletExternalContextImpl.java.patch > > > Theis portlet fragment renders one of 2 components depending on the selection in the selectOneMenu: >
xmlns:h="http://java.sun.com/jsf/html"> > > foo > > > > > > > > > > >
> It's using this simple bean: > public class BooleanTest { > private List list = new ArrayList(); > private List emptyList = new ArrayList(); > private String choice = "Foo"; > private List selectList = null; > > public List getList() { > if (choice.equals("Foo")) { > return emptyList; > } else { > if (list.isEmpty()) { > list = new ArrayList(); > list.add("Hello"); > list.add("World"); > list.add("!!!!!"); > } > return list; > } > } > > public String doIt() { > return "success"; > } > public List getSelectList() { > if (selectList == null) { > selectList = new ArrayList(); > selectList.add(new SelectItem("Foo", "Foo")); > selectList.add(new SelectItem("bar", "bar")); > } > return selectList; > } > public String getChoice() { > return choice; > } > public void setChoice(String choice) { > this.choice = choice; > } > } > When I first add this portlet to a page, I get the drop down list, the submit button and the "empty" message. If I select the 'bar' entry in the list and click submit I get the error, " Can not call encodeNamespace() during a portlet ActionRequest" > It seems to be because MyFacesGenericPortlet.processAction calls lifecycle.execute, which in turn starts createing components for the table (which wasn't in the first call to the page). This calls encodeNamespace for the new componenet IDs and thats when it falls over. > I fixed this by changing PortletExternalContextImpl.encodeNamespace to return null instead of throwing an IllegalStateException. My application seems to be working well with this solution, but I don't know if it might have any knock on effects? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira