What will be the Pattern for the Following url?

Splash Forums PrettyFaces Users What will be the Pattern for the Following url?

This topic contains 22 replies, has 4 voices, and was last updated by  Subodh 7 years ago.

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #17730

    Subodh
    Participant

    Hello,I wiil want to write a Pattern For this Url

    http://www.askkuber.com/IndianStock/ST/FeatureDetail.jsf?featureName=undervalued_companies_detail

    What will be the Pattern?

    I tried with this but Value of bean Not Set it was cominf Null

    <url-mapping id=”interestingNumbersOld”>

    <pattern> /ST/FeatureDetail.jsf/ </pattern>

    <query-param name=”featureName”>#{FeatureBean.featureName}</query-param>

    <view-id>/ST/FeatureDetail.jsf</view-id>

    </url-mapping>

    What i m doing Wrong Can anyone Tell me

    Thanks To u in Advance

    Subodh

    #19827

    Your pattern has an extra ‘/’ in it:

    <pattern> /ST/FeatureDetail.jsf/ </pattern>

    should be:

    <pattern> /ST/FeatureDetail.jsf </pattern>

    #19828

    Subodh
    Participant

    Will this Url Mapping will work where <view id> and <pattern> is same actually is it going to infinite loop

    <url-mapping id=”interestingNumbersOld”>

    <pattern> /ST/FeatureDetail.jsf </pattern>

    <query-param name=”featureName”>#{FeatureBean.featureName}</query-param>

    <view-id>/ST/FeatureDetail.jsf</view-id>

    </url-mapping>

    Thanks

    #19829

    rafaeltc
    Participant

    not sure, but, if so, you could change your pattern to <pattern>/ST/FeatureDetail</pattern>

    #19830

    Yes, there is currently an infinite-loop bug in the 1.2.6 and 2.0.4 versions of the tool. I’d suggest doing what rafael suggets if you can. Don’t use the same <pattern> and <view-id> for now.

    #19831

    Subodh
    Participant

    <url-mapping id=”interestingNumbersOld”>

    <pattern> /ST/FeatureDetail </pattern>

    <query-param name=”featureName”>#{FeatureBean.featureName}</query-param>

    <view-id>/ST/FeatureDetail.jsf</view-id>

    </url-mapping>

    this is not going in Infinite loop But “FeatureBean” not able to set the “featureName” value.

    #19832

    rafaeltc
    Participant

    make sure that featuresName has its getter and setter.

    What is the error you get?

    #19833

    Subodh
    Participant

    yes Rafel featureName has its getter and setter .and i m getting nullPoniter Exception.

    Is any issue in My UrlPattern(I mean mainly in <query-param name=”featureName”>)

    #19834

    Could you post the exception stack-trace?

    Thanks.

    #19835

    Subodh
    Participant

    javax.el.ELException: /ST/FeatureDetail.jsp @53,145 binding=”#{FeatureBean.tabBasedOnFeatureName}”: Error reading ‘tabBasedOnFeatureName’ on type com.kuber.web.jsfbeans.FeatureBean

    com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)

    com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:240)

    com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:224)

    com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:139)

    com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

    com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)

    com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)

    com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

    com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:109)

    com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

    com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)

    com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:131)

    com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:337)

    com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:307)

    com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)

    com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

    com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

    com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

    com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)

    com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)

    com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)

    com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)

    com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)

    com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)

    com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

    com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)

    com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)

    com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)

    com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)

    org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)

    org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)

    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)

    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)

    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

    javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

    com.kuber.web.servlets.KuberFilter.doFilter(KuberFilter.java:164)

    org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

    org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

    org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)

    org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

    com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:71)

    root cause

    java.lang.NullPointerException

    com.kuber.web.jsfbeans.FeatureBean.showTab(FeatureBean.java:246)

    com.kuber.web.jsfbeans.FeatureBean.getTabBasedOnFeatureName(FeatureBean.java:215)

    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    java.lang.reflect.Method.invoke(Unknown Source)

    javax.el.BeanELResolver.getValue(BeanELResolver.java:62)

    javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)

    com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)

    org.apache.el.parser.AstValue.getValue(AstValue.java:114)

    org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)

    com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)

    com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:240)

    com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:224)

    com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:139)

    com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

    com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)

    com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)

    com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

    com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:109)

    com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

    com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)

    com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:131)

    com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:337)

    com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:307)

    com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)

    com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

    com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

    com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

    com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)

    com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)

    com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)

    com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)

    com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)

    com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)

    com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

    com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)

    com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)

    com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)

    com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)

    org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)

    org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)

    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)

    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)

    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

    javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

    com.kuber.web.servlets.KuberFilter.doFilter(KuberFilter.java:164)

    org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

    org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

    org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)

    org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

    com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:71)

    #19836

    domdorn
    Participant

    how have you defined “FeatureBean” ? normally bean names begin with a lowercase letter, except when you really name the bean FeatureBean

    so normally, class FeatureBean gets #{featureBean}

    #19837

    Subodh
    Participant

    this is my faces.config.xml entry

    <managed-bean>

    <managed-bean-name>FeatureBean</managed-bean-name>

    <managed-bean-class>com.kuber.web.jsfbeans.FeatureBean</managed-bean-class>

    <managed-bean-scope>request</managed-bean-scope>

    </managed-bean>

    #19847

    Could you paste your bean code here? I think something is wrong with your getter method.

    javax.el.ELException: /ST/FeatureDetail.jsp @53,145 binding=”#{FeatureBean.tabBasedOnFeatureName}”: Error reading ‘tabBasedOnFeatureName’ on type com.kuber.web.jsfbeans.FeatureBean

    #19848

    Subodh
    Participant

    public HtmlPanelGroup getTabBasedOnFeatureName() {

    if (!showTab()) {

    tabpanel = new HtmlPanelGroup();

    tabpanel.setRendered(false);

    return tabpanel;

    }

    WbFeatureInfoExtend featureInfo = getFeatureInfo(null, featureName);

    tabpanel = generateRichTab(featureInfo, true);

    return tabpanel;

    }

    #19849

    Please post the rest of the Class. Thanks.

Viewing 15 posts - 1 through 15 (of 23 total)

You must be logged in to reply to this topic.

Comments are closed.