diff options
author | cbateman | 2008-05-29 00:05:56 +0000 |
---|---|---|
committer | cbateman | 2008-05-29 00:05:56 +0000 |
commit | b9a5a0aff4085db3673caa43120b3e32ab203b6c (patch) | |
tree | 12fef34d11d24f7e87cc8d8a167e24dfa2a10bd1 | |
parent | adca38642781b66651db96cb93d6e2dfc93935af (diff) | |
download | webtools.jsf-b9a5a0aff4085db3673caa43120b3e32ab203b6c.tar.gz webtools.jsf-b9a5a0aff4085db3673caa43120b3e32ab203b6c.tar.xz webtools.jsf-b9a5a0aff4085db3673caa43120b3e32ab203b6c.zip |
Fix for pmc_approved bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=234457.
-rw-r--r-- | jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java index 983fd7f80..a30295a21 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java @@ -332,25 +332,35 @@ public class XMLViewObjectConstructionStrategy extends private void maybeUpdateViewObject(final ComponentInfo bestComponent, final Element srcElement, final ITagElement tagElement) { + if (srcElement.getAttributes() == null) + return; + for (int i = 0; i < srcElement.getAttributes().getLength(); i++) { final Attr attr = (Attr) srcElement.getAttributes().item(i); final Map<String, ITagAttributeHandler> attributeHandlers = tagElement .getAttributeHandlers(); - + if (attributeHandlers != null) { - final String id = attributeHandlers.get(attr.getLocalName()) - .getCustomHandler(); - - ICustomViewMapper mapper = null; - - if (id != null) + final ITagAttributeHandler handler = attributeHandlers.get(attr + .getLocalName()); + + if (handler != null) { - mapper = CustomViewMapperExtensionLoader.getCustomViewMapper(id); - if (mapper != null) + final String id = handler.getCustomHandler(); + + ICustomViewMapper mapper = null; + + if (id != null) { - mapper.doAttributeActions(bestComponent, srcElement, attr); + mapper = CustomViewMapperExtensionLoader + .getCustomViewMapper(id); + if (mapper != null) + { + mapper.doAttributeActions(bestComponent, + srcElement, attr); + } } } } |