1.1 --- a/visualweb.insync/src/org/netbeans/modules/visualweb/insync/faces/FacesPageUnit.java Thu Jan 10 01:52:44 2008 +0000
1.2 +++ b/visualweb.insync/src/org/netbeans/modules/visualweb/insync/faces/FacesPageUnit.java Thu Jan 10 02:19:26 2008 +0000
1.3 @@ -61,11 +61,13 @@
1.4 import javax.faces.component.UIForm;
1.5 import javax.faces.component.UIViewRoot;
1.6 import javax.faces.context.FacesContext;
1.7 +import org.netbeans.modules.visualweb.jsfsupport.container.JsfTagSupportException;
1.8 import org.netbeans.modules.visualweb.project.jsf.api.JsfProjectUtils;
1.9 import org.openide.ErrorManager;
1.10 import org.openide.loaders.DataObject;
1.11
1.12 import org.netbeans.modules.visualweb.extension.openide.util.Trace;
1.13 +import org.openide.util.Exceptions;
1.14 import org.w3c.dom.Document;
1.15 import org.w3c.dom.DocumentFragment;
1.16 import org.w3c.dom.Element;
1.17 @@ -392,18 +394,22 @@
1.18 String tagName = e.getLocalName();
1.19 String name = e.getAttribute(FacesBean.ID_ATTR);
1.20 String tagLibUri = pgunit.findTaglibUri(e.getPrefix());
1.21 - // Get the bean class via TLD using JSF Designtime container
1.22 - type = container.findComponentClass(tagName, tagLibUri);
1.23 - assert Trace.trace("insync.faces", "FU.bindMarkupBeans type:" + type +
1.24 - " tag:" + tagName + " tagLibUri:" + tagLibUri);
1.25 - BeanInfo bi = getBeanInfo(type);
1.26 - mbean = new FacesBean(this, bi, name, e);
1.27 - // snag the form bean as it goes by for later use as the default parent
1.28 - if (defaultParent == null && tagName.equals(HtmlTag.FORM.name)) {
1.29 - defaultParent = mbean;
1.30 - }
1.31 - mbean.setInserted(true);
1.32 - beans.add(mbean);
1.33 + try {
1.34 + type = container.findComponentClass(tagName, tagLibUri);
1.35 +
1.36 + assert Trace.trace("insync.faces", "FU.bindMarkupBeans type:" + type +
1.37 + " tag:" + tagName + " tagLibUri:" + tagLibUri);
1.38 + BeanInfo bi = getBeanInfo(type);
1.39 + mbean = new FacesBean(this, bi, name, e);
1.40 + // snag the form bean as it goes by for later use as the default parent
1.41 + if (defaultParent == null && tagName.equals(HtmlTag.FORM.name)) {
1.42 + defaultParent = mbean;
1.43 + }
1.44 + mbean.setInserted(true);
1.45 + beans.add(mbean);
1.46 + } catch (JsfTagSupportException ex) {
1.47 + ErrorManager.getDefault().log(ex.getLocalizedMessage());
1.48 + }
1.49 }
1.50 }
1.51 if (mbean != null) {
2.1 --- a/visualweb.jsfsupport/src/org/netbeans/modules/visualweb/jsfsupport/container/JsfTagSupport.java Thu Jan 10 01:52:44 2008 +0000
2.2 +++ b/visualweb.jsfsupport/src/org/netbeans/modules/visualweb/jsfsupport/container/JsfTagSupport.java Thu Jan 10 02:19:26 2008 +0000
2.3 @@ -50,7 +50,7 @@
2.4 */
2.5 public static synchronized void initialize(ClassLoader classLoader) {
2.6 try {
2.7 - Enumeration<URL> urls = ((URLClassLoader) classLoader).getResources("META-INF/faces-config.xml");
2.8 + Enumeration<URL> urls = classLoader.getResources("META-INF/faces-config.xml");
2.9 while (urls.hasMoreElements()) {
2.10 URL url = urls.nextElement();
2.11 if (!url.getPath().contains("jsfcl.jar")) {
2.12 @@ -60,8 +60,7 @@
2.13
2.14 // Bug Fix 124610 - Unfortunately the JSF RI component informations are not kept
2.15 // in the standard location (META-INF/faces-config.xml)
2.16 - urls = ((URLClassLoader) classLoader).getResources("com/sun/faces/jsf-ri-runtime.xml");
2.17 - URL facesConfigUrl = urls.nextElement();
2.18 + URL facesConfigUrl = classLoader.getResource("com/sun/faces/jsf-ri-runtime.xml");
2.19 URL tagLibUrl = new URL(facesConfigUrl.toString().split("!")[0] + "!/META-INF/html_basic.tld");
2.20 String taglibUri = "http://java.sun.com/jsf/html";
2.21 TagLibFacesConfigInfo tagLibFacesConfigInfo = new TagLibFacesConfigInfo(taglibUri);