1 Reply Latest reply on Dec 3, 2008 10:47 AM by Jens Mueller

    actionListener not called

    Jens Mueller Novice

      Hi,
      i'm using an editable table where the user can select elements that he wants to modify. a flag in the table dto determines whether the respecitve element's properties are rendered as non editable outputTexts or editable inputTexts. Adding new elements is no problem, however confirming (setting the flag to editable=false) via actionListener does not work. If somebode could shed some light on that matter i'd be very thankful. Here's the code:

      <a4j:outputPanel layout="block" styleClass="innerTabListBox" id="listPanel">
       <h:dataTable value="#{Bean.elementItemList}" var="Item" id="tab0Table">
      
       <h:column>
       <a4j:commandButton image="/protected/images/confirm.gif"
       actionListener="#{Bean.confirmElement}" id="cbEdit"
       reRender="tab0Table" eventsQueue="ViewQueue"
       rendered="#{Item.editableListItem}">
       <f:attribute name="targetNumber" value="#{Item.number}" />
       </a4j:commandButton>
       </h:column>
      
       <h:column>
       <f:facet name="header">
       <h:outputText value="#{msg.description}" />
       </f:facet>
       <h:outputText value="#{Item.name}"
       rendered="#{! Item.editableListItem}" />
       <h:inputText id="tab0Input" value="#{Item.name}"
       rendered="#{Item.editableListItem}" />
       <a4j:region>
       <rich:suggestionbox id="suggestionBoxCC" for="tab0Input"
       fetchValue="#{result.name}"
       suggestionAction="#{Bean.autocomplete}" var="result"
       selfRendered="true"
       nothingLabel="#{msg.emptyItemSuggestionBoxElement}">
       <a4j:support event="onselect"
       actionListener="#{Bean.elementChanged}" ajaxSingle="true">
       <f:attribute name="toStoreID" value="#{result.id}" />
       </a4j:support>
       <h:column>
       <h:outputText value="#{result.name}" id="outputName0" />
       </h:column>
       <h:column>
       <h:outputText value="#{result.number}" />
       </h:column>
       <h:column>
       <h:outputText value="#{result.id}"
       style="visibility: hidden; width: 2px; overflow: hidden" />
       </h:column>
       </rich:suggestionbox>
       </a4j:region>
       </h:column>
      
       <h:column>
       <f:facet name="header">
       <h:outputText value="#{msg.assignedNumber}" />
       </f:facet>
       <h:outputText value="#{Item.number}" />
       </h:column>
      
       <h:column>
       <f:facet name="header">
       <h:outputText value="#{msg.headNumber}" />
       </f:facet>
       <h:outputText value="#{Item.allocations}"/>
       </h:column>
      
       </h:dataTable>
      </a4j:outputPanel>

      i did this once before within a tab panel tab. everything worked fine there.