0 Replies Latest reply on Mar 8, 2010 2:48 AM by astodin

    Problem with rich:page rich:toolbar and modalpanel in a second page

    astodin

      hi there,

       

      i have a problem using rich:page and a rich:toolbar in it. i create the rich:page as template like this:

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <rich:page  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:rich="http://richfaces.org/rich"
                  xmlns:a4j="http://richfaces.org/a4j"
                  markupType="xhtml"
                  contentType="text/html"           
                  pageTitle="Title"
                  theme="smooth"
                  width="1024"
                  sidebarWidth="0">
       
        <f:facet name="pageHeader">
          <h:panelGroup> 
            <f:loadBundle basename="messageresource.resources" var="msg"/>   
            <title><ui:insert name="pageTitle"/></title> 
          </h:panelGroup>
        </f:facet>

       

        <f:view contentType="text/html"> <!-- safari compatibility -->
       
          <f:facet name="header">
            <h:form>       
              <rich:toolBar>
                <rich:dropDownMenu>
                  <f:facet name="label">
                    <h:panelGrid  cellpadding="0"
                                  cellspacing="0"
                                  columns="2"
                                  style="vertical-align:middle">
                      <h:outputText styleClass="sc_data120"
                                    value="#{msg.MAINMENU_HEAD_PLANNING}" />
                    </h:panelGrid>
                  </f:facet>
                  <rich:menuItem  action="#{menuBean.doEventplaning_pl}"
                                  styleClass="sc_data120"                               
                                  submitMode="ajax"
                                  value="#{msg.MAINMENU_TERMINPLANUNG}">

                </rich:menuItem>         
             
                </rich:dropDownMenu>
              </rich:toolBar>
              <rich:panel>
                <div style="font: 140% georgia, sans-serif; text-align:center;"><ui:insert name="Headline"/></div>
              </rich:panel>
             
            </h:form>                         
          </f:facet>
         
          <ui:insert name="contextbody"/>
           
        </f:view> 
      </rich:page>

       

      now i have a page using this template:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition template="/templates/mainMenu_pl.xhtml"
                      xmlns="http://www.w3.org/1999/xhtml"
                      xmlns:ui="http://java.sun.com/jsf/facelets"
                      xmlns:h="http://java.sun.com/jsf/html"
                      xmlns:f="http://java.sun.com/jsf/core"
                      xmlns:a4j="http://richfaces.org/a4j"
                      xmlns:rich="http://richfaces.org/rich">
           
        <f:loadBundle basename="messageresource.resources" var="msg"/>
        <ui:define name="pageTitle">#{msg.BROWSER_TAB_EVENTPLANNING}</ui:define> 
        <ui:define name="Headline">#{msg.PAGE_HEADLINE_EVENTPLANNING}</ui:define>
         
        <ui:define name="contextbody">  
          <link rel="stylesheet" type="text/css" href="../../CSS/general.css" />
          <link rel="stylesheet" type="text/css" href="../../CSS/eventplanning.css" />
          <h:form>
            <rich:panel style="margin-left:-1px; margin-right:-1px;margin-top:-1px;">            
              <table width="100%">
                <tbody>
                  <tr>
                    <td style="width:1%"/>
                    <td align="center">
                      <h:panelGrid  columns="1"> 
                        <rich:dataTable align="center"
                                        cellpadding="0"
                                        cellspacing="0"
                                        id="dt_events"                         
                                        rendered="true"
                                        rows="#{playerEventsBean.showrows}"
                                        value="#{playerEventsBean.allEvents}"
                                        var="event">
                          <f:facet name="header">
                            <rich:columnGroup style="text-align:center">
                              <rich:column colspan="7">
                                <h:outputText styleClass="sc_data100"
                                              value="#{calendarBean.monthAsStringForEvent}"/>        
                              </rich:column>
                            </rich:columnGroup>
                          </f:facet>

      columns here...


                          <f:facet name="footer">
                            <rich:columnGroup >
                           
                              <rich:column style="text-align:right">
                                <h:panelGrid columns="2" style="text-align:right">                        
                                  <rich:datascroller  renderIfSinglePage="false"
                                                      for="dt_events"/>
                                  <a4j:commandLink  action="#{menuBean.doPrinteventlist_pl}"
                                                    ajaxSingle="true"
                                                    id="printlink"
                                                    styleClass="sc_comlink">                          
                                    <h:graphicImage style="border:0"
                                                    value="/images/navigation/print.png"/>
                                  </a4j:commandLink>
                                  <rich:toolTip for="printlink"
                                                styleClass="sc_data100"
                                                value="#{msg.TOOLTIP_EVENTPRINT}"/>
                                </h:panelGrid>                                           
                              </rich:column>             
                            </rich:columnGroup>
                          </f:facet>           
                        </rich:dataTable>
                      </h:panelGrid>        
                    </td>
                    <td style="width:1%"/>
                  </tr>
                </tbody>
              </table>                            
            </rich:panel>
          </h:form>
        </ui:define>                            
      </ui:composition>

       

      so, if i use the datascroller to show the next page i'm not able to use the toolbar anymore. no action is fired! if i hit the refreshbutton of the

      browser the menu is working again!

       

      can anybody show me a way to fix this problem or tell me how to use rich:page with rich:toolbar correctly?

       

      thanks for help!