5 Replies Latest reply on Jan 7, 2011 12:17 PM by slouma123

    open a pop up windows page with seam and jsf

    slouma123
      I have a difficult problem,
      I use a seam  framework version 2.0.0.GA and jsf framework version 1.2_08.
      I would open a new page (schedulerequest.xhtml) in pop up form after a click on commandbutton in page generatedqueries.xhtml.I use a javascript code,
      But an error has happened. for more explication :
      The page  schedulerequest.xhtml contain a datatable there are 4 colomn the 4th colomn containe a button, when the user click the page schedulerequest.xhtml opened with pop up page.
      the code of generatedqueries.xhtml:
      ******

      <h:form id="generatedquerieslist">
                     <script language="javascript">

      function openScheduleRequest()
      {

        Fenetre = window.open("../bookingrequest/schedulerequest.seam","sss:"," width= 500,height=500, left=520, top=250 ");
        Fenetre.focus();
      }

      </script>
      .........
      <rich:dataTable var="queries" id="queriesTable"
                               onRowMouseOver="this.style.backgroundColor='#F1F1FF'"
                               onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
                               value="#{generatedQueriesHelperList}"
                               columnClasses="col1,col2,col3,col4" width="100%">

      <rich:column id="col4">

      <f:facet name="header">
        #{messages['queries_action']}
      </f:facet>
      <h:commandButton id="open" title="#{messages['reservation']}"                          image="/img/navigator.ico" immediate="true"                                   onclick="openScheduleRequest(); return false" />
      </rich:column>
      </rich:dataTable>
      </h:form>
      .........
      the code of Bean QueriesAction.java of  generatedqueries.xhtm:
      ******

      @Name("queriesAction")
      @Scope(ScopeType.SESSION)
      public class QueriesAction implements Serializable {

           /**
            * The serial
            */
           private static final long serialVersionUID = -2918702043991823052L;

           @Logger
           private Log LOG;

              // for selected row of data table
           @DataModelSelection
           @In(required = false)
           @Out(required = false, value = "generatedQueriesHelper")
           private GeneratedQueriesHelper generatedQueriesHelper;
           
           private GeneratedQueries generatedQueries;

           @DataModel
           private List<GeneratedQueriesHelper> generatedQueriesHelperList;
           private List<GeneratedQueries> generatedQueriesList;
      .........

      the code of Bean schedulerequestAction.java of  page schedulerequest.xhtm:
      ******

      @Name("scheduleRequestAction")
      @Scope(ScopeType.SESSION)
      public class ScheduleRequestAction implements Serializable {

           /**
            *
            */

           private static final long serialVersionUID = 6754592381447807533L;

           @Logger
           private Log LOG;

              //Injection to give the current line
           /** object generatedQueriesHelper to give the current lines */
           @In(value = "generatedQueriesHelper")
           private GeneratedQueriesHelper queryHelper;

      the code of schedulerequest.xhtm the pop up page :
      ******
      <h:outputText
                                              value="#{scheduleRequestAction.queryHelper.generatedQueries.ferry.name}"
                                              style="color:#6699CC;"></h:outputText>

      **************
      the error when click on button  is :

      @In attribute requires non-null value: scheduleRequestAction.generatedQueriesHelper

      some help please how I open schedulerequest.xhtml contaned an information from selected row in the data table in the page generatedqueries.xhtml with pop up form ?
      thanks a lot.