[ https://issues.apache.org/jira/browse/TRINIDAD-1229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631640#action_12631640 ]
pudupa edited comment on TRINIDAD-1229 at 9/16/08 9:01 PM: -------------------------------------------------------------------- This is a patch over 1.2.9.1 branch. The suggested changes is local to one file, which a.f.a.i.k was unchanged since 1.0 trunk. Hence this patch can be applied for all branches/trunk wherever this needs to go w.r.t. Apache Myfaces Trinidad process. I request that this patch be applied over 1.2.9.1 for immediate consumption. was (Author: pudupa): This is a patch over 1.2.9.1 branch. The suggested changes is local to one file, which a.f.a.i.k was unchanged since 1.0 trunk. Hence this patch can be applied for all branches/trunk wherever this needs to go w.r.t. Apache Myfaces Trinidad process. > SetFacetChildDocumentChange adds incomplete facet node to the document > ---------------------------------------------------------------------- > > Key: TRINIDAD-1229 > URL: https://issues.apache.org/jira/browse/TRINIDAD-1229 > Project: MyFaces Trinidad > Issue Type: Bug > Affects Versions: 1.2.9-core > Environment: All environments > Reporter: Prakash Udupa N > Attachments: TRINIDAD-1229_Patch_On_1_2_9_1.patch > > Original Estimate: 2h > Remaining Estimate: 2h > > The following is the current code in > org.apache.myfaces.trinidad.change.SetFacetChildDocumentChange class: > public void changeDocument(Node componentNode) > { > if (componentNode == null) > throw new IllegalArgumentException(_LOG.getMessage( > "NO_NODE_SPECIFIED")); > > // get the fragement, imported into the target document > DocumentFragment targetFragment = > getImportedComponentFragment(componentNode); > > Element facetElement = ChangeUtils.__getFacetElement(componentNode, > _facetName); > > if (facetElement != null) > { > // remove any current children > ChangeUtils.__removeAllChildren(facetElement); > } > else > { > Document targetDocument = componentNode.getOwnerDocument(); > > facetElement = targetDocument.createElementNS(_JSF_CORE_NAMESPACE, > "f:facet"); // ISSUE IS THAT THIS FACET ELEMENT DOES NOT HAVE 'name' > ATTRIBUTE ON IT > > // set the xmlns for the prefix to make sure that "f:" is the > // prefix for faces > // =-= bts TODO In theory, this could cause problems if the > // added component used the prefix "f:" for something other than > // the JSF core > facetElement.setAttributeNS(_XMLNS_NAMESPACE, "xmlns:f", > _JSF_CORE_NAMESPACE); > > componentNode.appendChild(facetElement); > } > > // add our new facet content > facetElement.appendChild(targetFragment); > } > When a new SetFacetChildDocumentChange is created and added to the change > manager, and in case the target component did not have a facet already, a new > facet element is created wrapping the supplied document fragment, and added. > The problem, is that the 'name' attribute is added on the element, as > indicated by comments in the code above. This results in parse exceptions by > JSP engines. > Fix is to add the 'name' attribute. I'll provide a patch soon. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.