0 Replies Latest reply on Jun 15, 2009 11:17 AM by Osian Hughes

    Pageflow and EntityQuery

    Osian Hughes Newbie

      Hi,


      I have a pageflow, where the first page is a search page, but unfortunately, it doesn't allow me to select any values to be submitted into the query, i.e. whatever selection is made, the http submit isn't performed, and therefore the selected value for the search criteria is never set.


      Here is my pageflow:



      <?xml version="1.0" encoding="UTF-8"?>
      <pageflow-definition
           xmlns="http://jboss.com/products/seam/pageflow"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="
                http://jboss.com/products/seam/pageflow
                http://jboss.com/products/seam/pageflow-2.0.xsd" 
           name="Error Correction Wizard">
           
           <start-page name="dataSourceSelection" view-id="/error-correction/data-source-selection.seam">
                
                <transition name="next" to="cdrSelection">
                     <action expression="#{errorDataSourceSearch.selectDataSource}"/>
                </transition>
                <transition name="searchDataSource" to="dataSourceSelection">
                     <action expression="#{errorDataSourceSearch.performSearch}" />
                </transition>
                <transition name="clearDataSourceSearch" to="dataSourceSelection">
                     <action expression="#{errorDataSourceSearch.clearSearch}" />
                </transition>
           </start-page> 
           
           <page name="cdrSelection" view-id="/error-correction/cdr-selection.seam">
                
           </page>
           
           
           <page name="cancelTest" view-id="/home.seam">
                <end-conversation before-redirect="yes"/>
                <redirect />
           </page>
      
      </pageflow-definition>



      And the actions specified in the jspx file:


                      <s:link action="#{errorDataSourceSearch.performSearch}" style="text-decoration: none;">
                          <medComp:graphicImage 
                               style="border: 0; padding: 2px;" 
                               actionButton="#{errorDataSourceSearch.searchButton}" 
                               url="#{errorDataSourceSearch.searchButton.getImagePath(disabled)}" 
                               fullImageURL="#{errorDataSourceSearch.searchButton.getFullImagePath(disabled)}"
                               title="#{messages[errorDataSourceSearch.searchButton.imageDescription]}"/>
                     </s:link>
      
                      <s:link action="#{errorDataSourceSearch.clearSearch}" style="text-decoration: none;">
                          <medComp:graphicImage 
                               style="border: 0; padding: 2px;" 
                               actionButton="#{errorDataSourceSearch.resetButton}" 
                               url="#{errorDataSourceSearch.resetButton.getImagePath(disabled)}" 
                               fullImageURL="#{errorDataSourceSearch.resetButton.getFullImagePath(disabled)}"
                               title="#{messages[errorDataSourceSearch.resetButton.imageDescription]}"/>
                     </s:link>
      
      



      and the backing methods:



      @Name("errorDataSourceSearch")
      @Scope(ScopeType.CONVERSATION)
      public class DataSourceSearch extends HibernateEntityQuery<DataSource> implements ActionButtonListener {
           ......
      
           @Conversational
           @Begin(join=true, pageflow=ERROR_CORRECTION_WIZARD_PAGEFLOW, flushMode=FlushModeType.MANUAL)
           public String performSearch() {
                searchDataModel.clear();
                super.refresh();
                searchDataModel.addAll(getResultList());
                return "searchDataSource";
           }
      
           @Conversational
           @Begin(join=true, pageflow=ERROR_CORRECTION_WIZARD_PAGEFLOW, flushMode=FlushModeType.MANUAL)
           public String clearSearch() {
                super.refresh();
                getName().setDataCaptureValue("");
                getComment().setDataCaptureValue("");
                getTypes().setDataCaptureValue(null);
                getDataFormats().setDataCaptureValue(null);
                searchDataModel.clear();
                return "clearDataSourceSearch";
           }
      
           ......
      }



      Thanks,


      Osian.


      Also, whenever a navigation is made, the navigation is succesful, but the log file always displays a warning 'Illegal navigation'.