Re: component with duplicate id exception since 2.1.11

2013-04-11 Thread Thomas Andraschko
Issue created - https://issues.apache.org/jira/browse/MYFACES-3709


2013/4/10 Deryk Sinotte deryk.sino...@icesoft.com

 We just moved our testing from 2.1.10 to 2.1.11 and we are seeing the same
 exception in our showcase application.  It's also using f:metadata and
 f:viewParam tags:

 …
 ui:define name=metadata
 f:metadata
 f:viewParam name=grp required=false
  value=#{navigationModel.componentGroup}/
 f:viewParam name=exp required=false
  value=#{navigationModel.componentExample}/
 f:event type=postValidate
  listener=#{navigationController.navigate}/
 /f:metadata
 /ui:define

 ui:define name=suite-select-menu
 h:panelGroup layout=block styleClass=headerCenter
 …

 Deryk

 On 2013-04-10, at 8:32 AM, Leonardo Uribe lu4...@gmail.com wrote:

  Hi Thomas
 
  2013/4/10 Thomas Andraschko andraschko.tho...@gmail.com
 
  Hi Leonardo,
 
  on the first GET request.
  I will provide the example + issue later.
 
 
  Ok, I'll review it as soon as it is available.
 
  regards
 
  Leonardo
 
 
  Thanks.
 
  Regards,
  Thomas
 
 
  2013/4/10 Leonardo Uribe lu4...@gmail.com
 
  Hi
 
  There was a change due to a bug found:
 
  https://issues.apache.org/jira/browse/MYFACES-3665
 
  f:metadata section removed when refresh view and is not included in the
  template directly
 
  The problem was that the f:viewParam was removed and added to the tree,
  destroying the state. The fix done exclude the content of f:metadata
 from
  mark/delete algorithm.
 
  When do this happen? in a postback? ajax? or the first time the view is
  rendered. Could you provide a test case to reproduce it? The strange
 part
  is I used a similar test case for this one and there was no bug.
 
  regards,
 
  Leonardo Uribe
 
  2013/4/10 Howard W. Smith, Jr. smithh032...@gmail.com
 
  On Wed, Apr 10, 2013 at 8:42 AM, Thomas Andraschko 
  andraschko.tho...@gmail.com wrote:
 
  Hi,
 
  i get following exception after upgrading from 2.1.10 to 2.1.11:
 
  java.lang.IllegalStateException: component with duplicate id
  j_id__md_1
  found
 at
 
 
 
 
 org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
 
  If i remove the f:viewParam, it works fine.
  Is anything wrong with my code or is it a bug?
 
 
  From MyFaces 2.1.11 release notes, I would assume that the bug was
  introduced, possibly, by one of the following bugs listed in the
  bugs-resolved list.
 
 
  Release Notes - MyFaces Core - Version 2.1.11
 
  Bug
 
 * [MYFACES-3659] - Conditional include of scripts and stylesheets
 * [MYFACES-3663] - UIViewRoot.createUniqueId() should generate
  unique ids for all the component tree.
 * [MYFACES-3665] - f:metadata section removed when refresh view
  and is not included in the template directly
 * [MYFACES-3668] - CLONE - UIForm.createUniqueId should take into
  account prependId logic
 
 
 




Re: component with duplicate id exception since 2.1.11

2013-04-11 Thread Leonardo Uribe
Hi

The fix in MYFACES-3665 is correct, it seems the problem is caused because
the id generation algorithm does not take into account that f:metadata is
an special section that requires the ids to be generated in a unique way
per view, so the code is attaching the suffix used for templates. Since
there are two facelets that are executed on the same page (view metadata
facelet and normal facelet) the component is duplicated.

regards,

Leonardo Uribe

2013/4/11 Thomas Andraschko andraschko.tho...@gmail.com

 Issue created - https://issues.apache.org/jira/browse/MYFACES-3709


 2013/4/10 Deryk Sinotte deryk.sino...@icesoft.com

  We just moved our testing from 2.1.10 to 2.1.11 and we are seeing the
 same
  exception in our showcase application.  It's also using f:metadata and
  f:viewParam tags:
 
  …
  ui:define name=metadata
  f:metadata
  f:viewParam name=grp required=false
   value=#{navigationModel.componentGroup}/
  f:viewParam name=exp required=false
   value=#{navigationModel.componentExample}/
  f:event type=postValidate
   listener=#{navigationController.navigate}/
  /f:metadata
  /ui:define
 
  ui:define name=suite-select-menu
  h:panelGroup layout=block styleClass=headerCenter
  …
 
  Deryk
 
  On 2013-04-10, at 8:32 AM, Leonardo Uribe lu4...@gmail.com wrote:
 
   Hi Thomas
  
   2013/4/10 Thomas Andraschko andraschko.tho...@gmail.com
  
   Hi Leonardo,
  
   on the first GET request.
   I will provide the example + issue later.
  
  
   Ok, I'll review it as soon as it is available.
  
   regards
  
   Leonardo
  
  
   Thanks.
  
   Regards,
   Thomas
  
  
   2013/4/10 Leonardo Uribe lu4...@gmail.com
  
   Hi
  
   There was a change due to a bug found:
  
   https://issues.apache.org/jira/browse/MYFACES-3665
  
   f:metadata section removed when refresh view and is not included in
 the
   template directly
  
   The problem was that the f:viewParam was removed and added to the
 tree,
   destroying the state. The fix done exclude the content of f:metadata
  from
   mark/delete algorithm.
  
   When do this happen? in a postback? ajax? or the first time the view
 is
   rendered. Could you provide a test case to reproduce it? The strange
  part
   is I used a similar test case for this one and there was no bug.
  
   regards,
  
   Leonardo Uribe
  
   2013/4/10 Howard W. Smith, Jr. smithh032...@gmail.com
  
   On Wed, Apr 10, 2013 at 8:42 AM, Thomas Andraschko 
   andraschko.tho...@gmail.com wrote:
  
   Hi,
  
   i get following exception after upgrading from 2.1.10 to 2.1.11:
  
   java.lang.IllegalStateException: component with duplicate id
   j_id__md_1
   found
  at
  
  
  
  
 
 org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
  
   If i remove the f:viewParam, it works fine.
   Is anything wrong with my code or is it a bug?
  
  
   From MyFaces 2.1.11 release notes, I would assume that the bug was
   introduced, possibly, by one of the following bugs listed in the
   bugs-resolved list.
  
  
   Release Notes - MyFaces Core - Version 2.1.11
  
   Bug
  
  * [MYFACES-3659] - Conditional include of scripts and stylesheets
  * [MYFACES-3663] - UIViewRoot.createUniqueId() should generate
   unique ids for all the component tree.
  * [MYFACES-3665] - f:metadata section removed when refresh view
   and is not included in the template directly
  * [MYFACES-3668] - CLONE - UIForm.createUniqueId should take into
   account prependId logic
  
  
  
 
 



component with duplicate id exception since 2.1.11

2013-04-10 Thread Thomas Andraschko
Hi,

i get following exception after upgrading from 2.1.10 to 2.1.11:

java.lang.IllegalStateException: component with duplicate id j_id__md_1 found
at 
org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
at 
org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:116)
at 
org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:110)
at 
org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:82)
at 
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.saveView(DefaultFaceletsStateManagementStrategy.java:558)
at 
org.apache.myfaces.application.StateManagerImpl.saveView(StateManagerImpl.java:188)
at 
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:2052)
at 
org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
at 
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
at 
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:116)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)

I just have a simple template with:

-
?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE html
html xmlns=http://www.w3.org/1999/xhtml;
  xmlns:f=http://java.sun.com/jsf/core;
  xmlns:h=http://java.sun.com/jsf/html;
  xmlns:ui=http://java.sun.com/jsf/facelets;
  xmlns:p=http://primefaces.org/ui;
  xmlns:pe=http://primefaces.org/ui/extensions;

ui:insert name=metadata

/ui:insert

f:view contentType=text/html;charset=UTF-8 encoding=UTF-8
-

and a page where i define the metadata:

-
ui:composition template=/template/template.xhtml
xmlns=http://www.w3.org/1999/xhtml;
xmlns:f=http://java.sun.com/jsf/core;
xmlns:h=http://java.sun.com/jsf/html;
xmlns:ui=http://java.sun.com/jsf/facelets;
xmlns:p=http://primefaces.org/ui;
xmlns:pe=http://primefaces.org/ui/extensions;
xmlns:cc=http://java.sun.com/jsf/composite/components;

ui:define name=metadata
f:metadata
f:viewParam name=dataStoreId 
value=#{indexController.dataStoreId} /
f:event type=preRenderView 
listener=#{indexController.init()} /
/f:metadata
/ui:define

-

If i remove the f:viewParam, it works fine.
Is anything wrong with my code or is it a bug?

Thanks.

Regards,
Thomas


Re: component with duplicate id exception since 2.1.11

2013-04-10 Thread Howard W. Smith, Jr.
On Wed, Apr 10, 2013 at 8:42 AM, Thomas Andraschko 
andraschko.tho...@gmail.com wrote:

 Hi,

 i get following exception after upgrading from 2.1.10 to 2.1.11:

 java.lang.IllegalStateException: component with duplicate id j_id__md_1
 found
 at
 org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)

 If i remove the f:viewParam, it works fine.
 Is anything wrong with my code or is it a bug?


From MyFaces 2.1.11 release notes, I would assume that the bug was
introduced, possibly, by one of the following bugs listed in the
bugs-resolved list.


Release Notes - MyFaces Core - Version 2.1.11

Bug

* [MYFACES-3659] - Conditional include of scripts and stylesheets
* [MYFACES-3663] - UIViewRoot.createUniqueId() should generate
unique ids for all the component tree.
* [MYFACES-3665] - f:metadata section removed when refresh view
and is not included in the template directly
* [MYFACES-3668] - CLONE - UIForm.createUniqueId should take into
account prependId logic


Re: component with duplicate id exception since 2.1.11

2013-04-10 Thread Leonardo Uribe
Hi

There was a change due to a bug found:

https://issues.apache.org/jira/browse/MYFACES-3665

f:metadata section removed when refresh view and is not included in the
template directly

The problem was that the f:viewParam was removed and added to the tree,
destroying the state. The fix done exclude the content of f:metadata from
mark/delete algorithm.

When do this happen? in a postback? ajax? or the first time the view is
rendered. Could you provide a test case to reproduce it? The strange part
is I used a similar test case for this one and there was no bug.

regards,

Leonardo Uribe

2013/4/10 Howard W. Smith, Jr. smithh032...@gmail.com

 On Wed, Apr 10, 2013 at 8:42 AM, Thomas Andraschko 
 andraschko.tho...@gmail.com wrote:

  Hi,
 
  i get following exception after upgrading from 2.1.10 to 2.1.11:
 
  java.lang.IllegalStateException: component with duplicate id j_id__md_1
  found
  at
 
 org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
 
  If i remove the f:viewParam, it works fine.
  Is anything wrong with my code or is it a bug?
 
 
 From MyFaces 2.1.11 release notes, I would assume that the bug was
 introduced, possibly, by one of the following bugs listed in the
 bugs-resolved list.


 Release Notes - MyFaces Core - Version 2.1.11

 Bug

 * [MYFACES-3659] - Conditional include of scripts and stylesheets
 * [MYFACES-3663] - UIViewRoot.createUniqueId() should generate
 unique ids for all the component tree.
 * [MYFACES-3665] - f:metadata section removed when refresh view
 and is not included in the template directly
 * [MYFACES-3668] - CLONE - UIForm.createUniqueId should take into
 account prependId logic



Re: component with duplicate id exception since 2.1.11

2013-04-10 Thread Thomas Andraschko
Hi Leonardo,

on the first GET request.
I will provide the example + issue later.

Thanks.

Regards,
Thomas


2013/4/10 Leonardo Uribe lu4...@gmail.com

 Hi

 There was a change due to a bug found:

 https://issues.apache.org/jira/browse/MYFACES-3665

 f:metadata section removed when refresh view and is not included in the
 template directly

 The problem was that the f:viewParam was removed and added to the tree,
 destroying the state. The fix done exclude the content of f:metadata from
 mark/delete algorithm.

 When do this happen? in a postback? ajax? or the first time the view is
 rendered. Could you provide a test case to reproduce it? The strange part
 is I used a similar test case for this one and there was no bug.

 regards,

 Leonardo Uribe

 2013/4/10 Howard W. Smith, Jr. smithh032...@gmail.com

  On Wed, Apr 10, 2013 at 8:42 AM, Thomas Andraschko 
  andraschko.tho...@gmail.com wrote:
 
   Hi,
  
   i get following exception after upgrading from 2.1.10 to 2.1.11:
  
   java.lang.IllegalStateException: component with duplicate id
 j_id__md_1
   found
   at
  
 
 org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
  
   If i remove the f:viewParam, it works fine.
   Is anything wrong with my code or is it a bug?
  
  
  From MyFaces 2.1.11 release notes, I would assume that the bug was
  introduced, possibly, by one of the following bugs listed in the
  bugs-resolved list.
 
 
  Release Notes - MyFaces Core - Version 2.1.11
 
  Bug
 
  * [MYFACES-3659] - Conditional include of scripts and stylesheets
  * [MYFACES-3663] - UIViewRoot.createUniqueId() should generate
  unique ids for all the component tree.
  * [MYFACES-3665] - f:metadata section removed when refresh view
  and is not included in the template directly
  * [MYFACES-3668] - CLONE - UIForm.createUniqueId should take into
  account prependId logic
 



Re: component with duplicate id exception since 2.1.11

2013-04-10 Thread Leonardo Uribe
Hi Thomas

2013/4/10 Thomas Andraschko andraschko.tho...@gmail.com

 Hi Leonardo,

 on the first GET request.
 I will provide the example + issue later.


Ok, I'll review it as soon as it is available.

regards

Leonardo


 Thanks.

 Regards,
 Thomas


 2013/4/10 Leonardo Uribe lu4...@gmail.com

  Hi
 
  There was a change due to a bug found:
 
  https://issues.apache.org/jira/browse/MYFACES-3665
 
  f:metadata section removed when refresh view and is not included in the
  template directly
 
  The problem was that the f:viewParam was removed and added to the tree,
  destroying the state. The fix done exclude the content of f:metadata from
  mark/delete algorithm.
 
  When do this happen? in a postback? ajax? or the first time the view is
  rendered. Could you provide a test case to reproduce it? The strange part
  is I used a similar test case for this one and there was no bug.
 
  regards,
 
  Leonardo Uribe
 
  2013/4/10 Howard W. Smith, Jr. smithh032...@gmail.com
 
   On Wed, Apr 10, 2013 at 8:42 AM, Thomas Andraschko 
   andraschko.tho...@gmail.com wrote:
  
Hi,
   
i get following exception after upgrading from 2.1.10 to 2.1.11:
   
java.lang.IllegalStateException: component with duplicate id
  j_id__md_1
found
at
   
  
 
 org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
   
If i remove the f:viewParam, it works fine.
Is anything wrong with my code or is it a bug?
   
   
   From MyFaces 2.1.11 release notes, I would assume that the bug was
   introduced, possibly, by one of the following bugs listed in the
   bugs-resolved list.
  
  
   Release Notes - MyFaces Core - Version 2.1.11
  
   Bug
  
   * [MYFACES-3659] - Conditional include of scripts and stylesheets
   * [MYFACES-3663] - UIViewRoot.createUniqueId() should generate
   unique ids for all the component tree.
   * [MYFACES-3665] - f:metadata section removed when refresh view
   and is not included in the template directly
   * [MYFACES-3668] - CLONE - UIForm.createUniqueId should take into
   account prependId logic
  
 



Re: component with duplicate id exception since 2.1.11

2013-04-10 Thread Deryk Sinotte
We just moved our testing from 2.1.10 to 2.1.11 and we are seeing the same 
exception in our showcase application.  It's also using f:metadata and 
f:viewParam tags:

…
ui:define name=metadata
f:metadata
f:viewParam name=grp required=false
 value=#{navigationModel.componentGroup}/
f:viewParam name=exp required=false
 value=#{navigationModel.componentExample}/
f:event type=postValidate
 listener=#{navigationController.navigate}/
/f:metadata
/ui:define

ui:define name=suite-select-menu
h:panelGroup layout=block styleClass=headerCenter
… 

Deryk

On 2013-04-10, at 8:32 AM, Leonardo Uribe lu4...@gmail.com wrote:

 Hi Thomas
 
 2013/4/10 Thomas Andraschko andraschko.tho...@gmail.com
 
 Hi Leonardo,
 
 on the first GET request.
 I will provide the example + issue later.
 
 
 Ok, I'll review it as soon as it is available.
 
 regards
 
 Leonardo
 
 
 Thanks.
 
 Regards,
 Thomas
 
 
 2013/4/10 Leonardo Uribe lu4...@gmail.com
 
 Hi
 
 There was a change due to a bug found:
 
 https://issues.apache.org/jira/browse/MYFACES-3665
 
 f:metadata section removed when refresh view and is not included in the
 template directly
 
 The problem was that the f:viewParam was removed and added to the tree,
 destroying the state. The fix done exclude the content of f:metadata from
 mark/delete algorithm.
 
 When do this happen? in a postback? ajax? or the first time the view is
 rendered. Could you provide a test case to reproduce it? The strange part
 is I used a similar test case for this one and there was no bug.
 
 regards,
 
 Leonardo Uribe
 
 2013/4/10 Howard W. Smith, Jr. smithh032...@gmail.com
 
 On Wed, Apr 10, 2013 at 8:42 AM, Thomas Andraschko 
 andraschko.tho...@gmail.com wrote:
 
 Hi,
 
 i get following exception after upgrading from 2.1.10 to 2.1.11:
 
 java.lang.IllegalStateException: component with duplicate id
 j_id__md_1
 found
at
 
 
 
 org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
 
 If i remove the f:viewParam, it works fine.
 Is anything wrong with my code or is it a bug?
 
 
 From MyFaces 2.1.11 release notes, I would assume that the bug was
 introduced, possibly, by one of the following bugs listed in the
 bugs-resolved list.
 
 
 Release Notes - MyFaces Core - Version 2.1.11
 
 Bug
 
* [MYFACES-3659] - Conditional include of scripts and stylesheets
* [MYFACES-3663] - UIViewRoot.createUniqueId() should generate
 unique ids for all the component tree.
* [MYFACES-3665] - f:metadata section removed when refresh view
 and is not included in the template directly
* [MYFACES-3668] - CLONE - UIForm.createUniqueId should take into
 account prependId logic