0 Replies Latest reply on Jul 16, 2010 5:24 AM by klhoste2

    JS and CSS bugs with Richfaces in Oracle WCI Portal

    klhoste2

      Hello,

       

      I have a simple application with Richfaces, and I'm having some trouble when I run it in Oracle WCI portal.

       

      The code is the following:

       

      <?xml version='1.0' encoding='utf-8'?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:a4j="http://richfaces.org/a4j"
            xmlns:rich="http://richfaces.org/rich">
        <head>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
          <link href="css/default.css" rel="stylesheet" type="text/css" />
        </head>
        <f:view>
          <body>
            <div style="mainpanel">
              <rich:modalPanel id="panel" width="350" height="300" showWhenRendered="true">
                <f:facet name="header">
                  <h:panelGroup>
                    <h:outputText value="Test Case 3"></h:outputText>
                  </h:panelGroup>
                </f:facet>
                <f:facet name="controls">
                  <h:panelGroup>
                    <h:graphicImage value="/images/close.png" styleClass="hidelink" id="hidelink" />
                    <rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick" />
                  </h:panelGroup>
                </f:facet>
                <hr />
                <rich:tabPanel switchType="ajax">
                  <rich:tab label="One">
                    <h:form>
                      <rich:dataTable width="483" id="richTable" rows="10" value="#{TableBean.arrItems}" var="item">
                        <f:facet name="header">
                          <h:outputText value="Testing..." />
                        </f:facet>
                        <h:column sortable="true">
                          <f:facet name="header">
                            <h:outputText value="ID" />
                          </f:facet>
                          <h:outputText value="#{item.id}">
                          </h:outputText>
                        </h:column>
                        <h:column>
                          <f:facet name="header">
                            <h:outputText value="Random String" />
                          </f:facet>
                          <h:outputText value="#{item.rndString}" />
                        </h:column>
                        <h:column>
                          <f:facet name="header">
                            <h:outputText value="Random Number" />
                          </f:facet>
                          <h:outputText value="#{item.rndNumber}" />
                        </h:column>
                      </rich:dataTable>
                      <rich:spacer height="30" />
                      <rich:datascroller id="richTableScroller" for="richTable" maxPages="20" align="center" />
                    </h:form>
                  </rich:tab>
                  <rich:tab label="Two">Content of tab two</rich:tab>
                  <rich:tab label="Three">Content of tab three</rich:tab>
                  <rich:tab label="Four"></rich:tab>
                  <rich:tab label="Five"></rich:tab>
                </rich:tabPanel>
              </rich:modalPanel>
            </div>
          </body>
        </f:view>
      </html>
      

       

      The page is displayed and works correctly when I call it directly.

      But, when I pass through the portal, some features not work:

      - tab change fails and throw this error: A4J.AJAX.onsubmit is not a function

      - pagination (rich:datascroller): clicking on page 2 do nothing and no errors.

      - the css is not loaded (call of a relative URL instead of absolute).

       

      I search in the documentation how to load CSS and JS manually with an absolute URL (to be gatewayable...) but I did not find anything.

       

      Please someone could help me on this issue, I'm also asking to the Oracle community if there is a possibility to make it in portlet configuration.

       

      Thanks by advance

       

      K.L.