Ok, this might be a bug... 

Everything on the page was always rendered, so that wasn't it.  By process of 
elimination I identified the code causing the problem.

This worked: (action method app.setTimecardWorker was called when item changed)

  |                     <h:outputLabel styleClass="textLabel2" 
for="worker">Worker</h:outputLabel>
  |                     <s:decorate>
  |                                             <h:selectOneMenu id="worker"
  |                                                     
value="#{timecardHome.instance.workerName}">
  |                                                <f:selectItems 
value="#{app.activeWorkers}" />
  |                                                <a4j:support 
event="onchange" 
  |                                                             
action="#{app.setTimecardWorker(timecardHome.instance)}" 
  |                                                             reRender="rate" 
  |                                                             
ajaxSingle="true"/>
  |                                             </h:selectOneMenu>
  |                     </s:decorate>
  |                     <h:outputLabel styleclass="textLabel2" for="rate">Rate 
$</h:outputLabel>
  |                     <s:decorate>
  |                         <h:inputText id="rate"
  |                                required="true"
  |                                  size="3"
  |                                   
value="#{timecardHome.instance.hourlyRate}"/>
  |                     </s:decorate>
  |                     <h:outputLabel styleClass="textLabel2" 
for="hours">Hours</h:outputLabel>
  |                     <s:decorate>
  |                         <h:inputText id="hours"
  |                                required="true"
  |                                    size="3"
  |                                   value="#{timecardHome.instance.hours}"/>
  |                     </s:decorate>
  |                     <h:outputLabel styleclass="textLabel2" 
for="description">Description</h:outputLabel>
  |                     <s:decorate>
  |                         <h:inputText id="description"
  |                                required="true"
  |                                  size="40"
  |                                   
value="#{timecardHome.instance.description}"/>
  |                     </s:decorate>
  | 

This didn't (no action method was called when same item was changed)

  |                     <h:outputLabel styleClass="textLabel2" 
for="worker">Worker</h:outputLabel>
  |                     <s:decorate>
  |                                             <h:selectOneMenu id="worker"
  |                                                     
value="#{timecardHome.instance.workerName}">
  |                                                <f:selectItems 
value="#{app.activeWorkers}" />
  |                                                <a:support event="onchange" 
  |                                                             
action="#{app.setTimecardWorker(timecardHome.instance)}" 
  |                                                             reRender="rate" 
  |                                                             
ajaxSingle="true"/>
  |                                             </h:selectOneMenu>
  |                     </s:decorate>
  |                     <h:outputLabel styleclass="textLabel2" for="rate">Rate 
$</h:outputLabel>
  |                     <s:decorate>
  |                         <h:inputText id="rate"
  |                                required="true"
  |                                  size="3"
  |                                   
value="#{timecardHome.instance.hourlyRate}"/>
  |                     </s:decorate>
  |                     <h:outputLabel styleClass="textLabel2" 
for="month">Month</h:outputLabel>
  |                     <s:decorate>
  |                                             <h:selectOneMenu id="month" 
  |                                                     
converter="#{monthconverter}"
  |                                                     
value="#{timecardHome.instance.month}">
  |                                                <f:selectItems 
value="#{app.months}" />
  |                                             </h:selectOneMenu>
  |                     </s:decorate>
  |                     <h:outputLabel styleClass="textLabel2" 
for="hours">Hours</h:outputLabel>
  |                     <s:decorate>
  |                         <h:inputText id="hours"
  |                                required="true"
  |                                    size="3"
  |                                   value="#{timecardHome.instance.hours}"/>
  |                     </s:decorate>
  |                     <h:outputLabel styleclass="textLabel2" 
for="description">Description</h:outputLabel>
  |                     <s:decorate>
  |                         <h:inputText id="description"
  |                                required="true"
  |                                  size="40"
  |                                   
value="#{timecardHome.instance.description}"/>
  |                     </s:decorate>
  | 

It seems adding the second select list did something to interfere with 
a4j:support calling the action method on the first select list.  Bizarre!

Any clues?
Greg

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034787
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to