[jboss-user] [JBoss Seam] - Full JSF Lifecycle, Action not invoked

monkeyden do-not-reply at jboss.com
Tue Jun 26 09:56:41 EDT 2007


I have a situation where the JSF lifecycle is being completed, including INVOKE_APPLICATION, but my action method is not being invoked.  <s:link> gets in there but I'd prefer a post.

Synopsis:
I basically have three conditionally rendered <s:div>s representing a movie filetype selector (WMV, Real).  The radio buttons just toggle the attribute used by <s:div>s rendered attribute, which is "selectedFileType".

public class MoviePopupAction implements Serializable{
  |     @Create
  |     @Begin(nested = true)
  |     public void create() {
  |         //some code to find the movie, see if it has both filetypes and set selectedFileType = 0 if it does
  |     }
  | 
  |     @End(ifOutcome = { "success" })
  |     public String close() {
  |         return "success";
  |     }
  | 
  |     public String playMovie() {
  |         
  |     }
  | 
  |     public Integer getSelectedFileType() {
  |         return selectedFileType;
  |     }
  |     
  |     public void setSelectedFileType(Integer selectedFileType) {
  |         this.selectedFileType = selectedFileType;
  |     }
  |     ....
  | }


<h:form id="moviePopupForm1">
  |     <s:div rendered="#{displayType == 0}">
  |             <!-- Display File Selector -->
  |             <table border="0" cellpadding="0" cellspacing="0">
  |                 <tr>
  |                     <td align="center"><h:graphicImage value="/images/home_movie_header.jpg"/></td>
  |                 </tr>
  |                 <tr>
  |                     <td><h:outputText value="#{messages['popup.movie.label.selectPlayer']}"/></td>
  |                 </tr>
  |                 <tr>
  |                     <td>
  |                         <h:selectOneRadio id="playerType" value="#{popupMovieAction.selectedFileType}" layout="pageDirection" required="true">
  |                             <f:selectItem itemValue="1" itemLabel ="#{messages['wmp.label']}"/>
  |                             <f:selectItem itemValue="2" itemLabel ="#{messages['rp.label']}"/>
  |                             <f:attribute name="fieldLabel" value="'File Type'"/>
  |                         </h:selectOneRadio>
  |                     </td>
  |                 </tr>
  |                 <tr>
  |                     <td align="center">
  |                         <s:link action="#{popupMovieAction.playMovie}" value="hit it"/>
  |                         <h:commandButton id="playMovieButton" value="#{messages['popup.homemovie.playMovie']}" 
  |                             action="#{popupMovieAction.playMovie}" image="/images/btn_play_homemovie.gif"
  |                             onmouseover="javascript:this.src='/images/btn_play_homemovie_hover.gif'"
  |                             onmouseout="javascript:this.src='/images/btn_play_homemovie.gif'"/>
  |                     </td>
  |                 </tr>
  |             </table>
  |         </s:div>
  |     <s:div rendered="#{displayType == 1}">
  |             <!-- Display REAL Movie -->
  |             <table border="0" cellpadding="0" cellspacing="0">
  |                 <tr>
  |                     <td align="center"><h:graphicImage value="/images/home_movie_header.jpg"/></td>
  |                 </tr>
  |                 <tr>
  |                     <td align="center">
  |                         <object id="RAOCX" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height="244" width="300" name="javaPlug1">
  |                           <param name="controls" value="ImageWindow"/>
  |                           <param name="console" value="Clip1"/>
  |                           <param name="autostart" value="-1"/>
  |                           <param name="src" value="#{popupMovieAction.movie.realURL}"/>
  |                           <param name="_ExtentX" value="8467"/>
  | 
  |                           <param name="_ExtentY" value="6350"/>
  |                           <param name="SHUFFLE" value="0"/>
  |                           <param name="PREFETCH" value="0"/>
  |                           <param name="NOLABELS" value="-1"/>
  |                           <param name="LOOP" value="0"/>
  |                           <param name="NUMLOOP" value="0"/>
  |                           <param name="CENTER" value="0"/>
  |                           <param name="MAINTAINASPECT" value="0"/>
  |                           <param name="BACKGROUNDCOLOR" value="#000000"/>
  | 
  |                           <embed name="javaPlug1" src="#{popupMovieAction.movie.realURL}" type="audio/x-pn-realaudio-plugin" console="Clip1" controls="ImageWindow" height="260" width="320" autostart="true" ></embed>
  |                         </object>
  |                         <br/>
  |                         <object id="video1" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height="50" width="320">
  |                           <param name="controls" value="ControlPanel"/>
  |                           <param name="console" value="Clip1"/>
  |                           <param name="_ExtentX" value="8467"/>
  |                           <param name="_ExtentY" value="609"/>
  |                           <param name="AUTOSTART" value="0"/>
  |                           <param name="SHUFFLE" value="0"/>
  |                           <param name="PREFETCH" value="0"/>
  |                           <param name="NOLABELS" value="0"/>
  |                           <param name="LOOP" value="0"/>
  |                           <param name="NUMLOOP" value="0"/>
  |                           <param name="CENTER" value="0"/>
  |                           <param name="MAINTAINASPECT" value="0"/>
  |                           <param name="BACKGROUNDCOLOR" value="#000000"/>
  |                           <embed name="javaPlug1" type="audio/x-pn-realaudio-plugin" console="Clip1" controls="ControlPanel" height="23" width="320"></embed>
  | 
  |                         </object>
  |                     </td>
  |                 </tr>
  |             </table>            
  |         </s:div>
  |         <s:div rendered="#{displayType == 2}"> 
  |             <!-- Display WMV Movie -->       
  |             <table border="0" cellpadding="0" cellspacing="0">
  |                 <tr>
  |                     <td align="center"><h:graphicImage value="/images/home_movie_header.jpg"/></td>
  |                 </tr>
  |                 <tr>
  |                     <td align="center">
  |                         <object id="Player" type="application/x-oleobject" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="320" height="305">
  |                            <param name="URL" value="#{popupMovieAction.movie.wmvURL}"/>
  |                            <param name="AutoSize" value="1" />
  |                            <param name="AutoStart" value="True" />                                                                                                                                                                
  |                            <embed name="MediaPlayer" 
  |                                  src="#{popupMovieAction.movie.wmvURL}" 
  |                                  type="application/x-mplayer2" showaudiocontrols="0" showcontrols="1" 
  |                                  autosize="0" showstatusbar="0" width="320" height="290" 
  |                                  pluginspage="http://www.microsoft.com/windows/windowsmedia/" >
  |                            </embed>
  |                          </object>      
  |                     </td>
  |                 </tr>
  |             </table>
  |         </s:div>
  | </h:form>

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057722#4057722

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057722



More information about the jboss-user mailing list