8 Replies Latest reply on Jan 10, 2007 2:38 PM by bsmithjj

    Can't use myfaces tomahawk inputSuggestedAjax control in JBo

    simplex-software

      Here is an JSP excerpt extracted from Tomahawk sandbox samples 1.1.5-SNAPSHOT nightly build:



      <f:view>
      <h:form>
      <f:verbatim></f:verbatim>
      <h:panelGrid columns="9">
      <h:outputText value="default suggest"/>
      <s:inputSuggestAjax suggestedItemsMethod="#{customer.getSuggestion}"
      value="#{customer.name}" charset="utf-8"/>
      <h:outputText value="suggest without autoComplete"/>
      <s:inputSuggestAjax suggestedItemsMethod="#{customer.getSuggestion}"
      value="#{customer.name}" autoComplete="false"/>
      <h:outputText value="suggest with limited suggested items"/>
      <s:inputSuggestAjax suggestedItemsMethod="#{customer.getSuggestion}"
      maxSuggestedItems="2" value="#{customer.name}"/>
      </h:panelGrid>
      </h:form>
      </f:view>



      It works properly while deployed as a simple webapp in JBoss Portal 2.4. But as soon as the same code is deployed as an JSP exposed in an JSF portlet, it raises the following exception:

      org.apache.myfaces.portlet.MyFacesGenericPortlet: javax.faces.FacesException: org.apache.jasper.JasperException: org.jboss.portlet.JBossRenderRequest

      Is there anything which could prevent stuff working properly in a simple webapp to work identically in a portlet ?

      Many thanks in advance,

      Nicolas

        • 1. Re: Can't use myfaces tomahawk inputSuggestedAjax control in
          theute

           

          Is there anything which could prevent stuff working properly in a simple webapp to work identically in a portlet ?


          Yes, too many Tomahawk components cast the Request to an HttpServletRequest instead of working with the abstract ExternalRequest. It leads to a class cast exception when used in a portlet environment

          • 2. Re: Can't use myfaces tomahawk inputSuggestedAjax control in
            simplex-software

            And is there anything to do ?

            • 3. Re: Can't use myfaces tomahawk inputSuggestedAjax control in
              theute

              Either fix the Tomahawk component bugs if it is the case or use other components that works in both environment.

              • 4. Re: Can't use myfaces tomahawk inputSuggestedAjax control in
                simplex-software

                My understanding is that JBoss Portal is here in order to let developers develop portals. Developers develop webapps using, beside others, JSF libraries. They want to expose these webapps, or parts of them, as portlets in JBoss Portal. So, my question is simple: if Apache's myfaces Tomahawk is not supported by JBoss Portal, as you said, what is the JSF implementation which is supported and recommanded ? There must be one, they didn't develop something that doesn't work with any existing JSF implementation. And I think that this supported implementation must be known, I don't beleive that I have to test all the existent implementations, one by one.

                • 5. Re: Can't use myfaces tomahawk inputSuggestedAjax control in
                  theute

                  Don't get me wrong, JBoss Portal supports JSF components.

                  It is out of our responsibility when it comes to JSF components written by other parties that are broken in a portlet environment (for any portal not only JBoss Portal).

                  Obviously *some* tomahawks components have never been tested in a portlet environment and *some* developers didn't care about supporting this environment (just because the portlet bridge didn't exist at that time probably). Thos components may work perfectly in a servlet environment.

                  If you find a JSF component that doesn't work in a portlet environment, you should report it to the developers of the component, they may not even know. You can also propose them a patch to speed it's inclusion in the codebase.


                  • 6. Re: Can't use myfaces tomahawk inputSuggestedAjax control in
                    simplex-software

                    Thomas,
                    Just FYI, I already reported on tomahawk jira the fact that the inputSuggestAjax component doesn't seem to work in JBoss portlets. Some other guys already reported the same with other portal containers. But they assign in this moment defects registered in jan 2006 ! You're probably kidding when you're saying that I should propose a patch. Do you think I have a couple of weeks in front of me to start digging into the source code ? But what about a fully supported JSF library ? Is there anyone fully tested with JBoss Portal ? And what about GWT, is there any chances for it to work in a portlet environment ?

                    • 7. Re: Can't use myfaces tomahawk inputSuggestedAjax control in
                      theute

                       

                      "simplex-software" wrote:
                      Thomas,
                      Just FYI, I already reported on tomahawk jira the fact that the inputSuggestAjax component doesn't seem to work in JBoss portlets. Some other guys already reported the same with other portal containers. But they assign in this moment defects registered in jan 2006 !



                      I just answered your question by saying that components may or may not work, I am not the one to blame... FYI i already fixed one of the Tomahawk components to be used in a portlet environment.

                      Since when open source is only about taking ?

                      • 8. Re: Can't use myfaces tomahawk inputSuggestedAjax control in

                        You can use JSF or you can use JSR168 portlets with JSP's, however using JSF + JBoss Portal will present some fun challenges.

                        Read here:

                        http://www.jboss.com/index.html?module=bb&op=viewtopic&t=98395