This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 124991 - Regression: New jsfsupport does not support portlet
Summary: Regression: New jsfsupport does not support portlet
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ sandipchitale
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2008-01-09 21:43 UTC by _ potingwu
Modified: 2008-01-10 17:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ potingwu 2008-01-09 21:43:45 UTC
Recent update for jsfsupport makes all the portlet projects failed to open the designer! The JSP file looks like the
following. It was working under NB6 release. Looks like it does not accept the portlet spec and cause 'Unrecognized
taglib uri - http://java.sun.com/jsf/portlet/components'!

<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
xmlns:p="http://java.sun.com/jsf/portlet/components">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <p:portletPage>
            <div style="-rave-layout: grid; position: relative; height: 400px; width: 400px;">
                <webuijsf:themeLinks binding="#{PortletPage1.themeLinks1}" id="themeLinks1"/>
                <webuijsf:form binding="#{PortletPage1.form1}" id="form1">
                </webuijsf:form>
            </div>
        </p:portletPage>
    </f:view>
</jsp:root>

From Winston's comment, insync needs to ignore the portlet checking:
Winston Prakash wrote:
> Ah! OK I understand now. This is not due to my changes in JsfTagSupport. Actually the exception you are getting is
correct. insync should not call JsfTagSupport for portletPage, since this is not a JSF tag at all.
>
> We need to find out how insync should ignore this tag, just like how it ignores <jsp:directive> and not asking
JsfTagSupport for it.
>
> I've added Deva and Sandip to this thread.
>
> Let me explain what we are doing. The exercise is part of removing the mandatory binding
>
> Earlier we used to have something like
>
> <webuijsf:button binding="#{PortletPage1.buton1}"
>
> This creates an unnecessary getter/setter in the Java.  If there are hundreds of component in the page, then hundreds
of getter/setter will be created and 99 of them may not be used.
>
> So, we introduced the concept of "On Demand binding". By default, no binding will  be generated.  If needed, user can
create a binding, by right clicking on the  component and invoke the action "Create Binding". This is explained in the
document.
>
> http://wiki.netbeans.org/wiki/view/VW_binding_removal
>
> However, insync needs to find the JSF component at design time. It can not find the corresponding JSF component with
out binding. It asks  JsfTagSupport to find the component by passing a taglib uri and tag name.
>
> insync  thinks that <p:portletPage> is a JSF component and tries to ask JsfTagSupport to find the component passing
the taglib UI (http://java.sun.com/jsf/portlet/components) tag name portletPage. Since JsfTagSupport can not understand
it, it simply throws the exception.
>
> Deva, Sandip, do you have any idea how we can handle such situation. How is the prefix "jsp" ignored?. Same way we
need to ignore portlet namespace uri also.

The exception I got:
SEVERE [global]
java.lang.IllegalArgumentException: Unrecognized taglib uri - http://java.sun.com/jsf/portlet/components
   at org.netbeans.modules.visualweb.jsfsupport.container.JsfTagSupport.<init>(JsfTagSupport.java:167)
   at org.netbeans.modules.visualweb.jsfsupport.container.JsfTagSupport.getInstance(JsfTagSupport.java:121)
   at org.netbeans.modules.visualweb.jsfsupport.container.FacesContainer.findComponentClass(FacesContainer.java:373)
   at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.bindMarkupBeans(FacesPageUnit.java:396)
   at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.bindMarkupBeans(FacesPageUnit.java:420)
   at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.bindMarkupBeans(FacesPageUnit.java:420)
   at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.bind(FacesPageUnit.java:432)
   at org.netbeans.modules.visualweb.insync.beans.BeansUnit.sync(BeansUnit.java:215)
   at org.netbeans.modules.visualweb.insync.live.LiveUnitWrapper.sync(LiveUnitWrapper.java:152)
   at org.netbeans.modules.visualweb.insync.models.FacesModel.syncImpl(FacesModel.java:1081)
   at org.netbeans.modules.visualweb.insync.Model.sync(Model.java:219)
   at org.netbeans.modules.visualweb.insync.ModelSet.syncAll(ModelSet.java:646)
   at org.netbeans.modules.visualweb.insync.models.FacesModelSet.syncAll(FacesModelSet.java:1391)
   at org.netbeans.modules.visualweb.insync.models.FacesModelSet.doModeling(FacesModelSet.java:446)
   at org.netbeans.modules.visualweb.insync.models.FacesModelSet.<init>(FacesModelSet.java:408)
Caused: java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at org.netbeans.modules.visualweb.insync.ModelSet.createInstance(ModelSet.java:257)
Caused: java.lang.RuntimeException
   at org.netbeans.modules.visualweb.insync.ModelSet.createInstance(ModelSet.java:261)
   at org.netbeans.modules.visualweb.insync.ModelSet.getInstance(ModelSet.java:242)
   at org.netbeans.modules.visualweb.insync.ModelSet$1.run(ModelSet.java:209)
[catch] at java.lang.Thread.run(Thread.java:619)
Comment 1 _ potingwu 2008-01-09 21:46:13 UTC
Please fix this as soon as possible because the VisualWeb Portlet support is now under critical release schedule! Thanks!
Comment 2 Winston Prakash 2008-01-10 17:08:38 UTC
Po-Ting, my fix for 124990, should have fixed this too (need to checkout insync).
Do you still see the problem?
Comment 3 _ potingwu 2008-01-10 17:58:03 UTC
Yes, it's working now.
Comment 4 _ potingwu 2008-01-10 17:58:26 UTC
Verified.