<f:attribute> does not work  with  <x:dataTable> 
-------------------------------------------------

         Key: MYFACES-437
         URL: http://issues.apache.org/jira/browse/MYFACES-437
     Project: MyFaces
        Type: Bug
  Components: General  
    Versions: 1.0.9 beta    
 Environment: jdk1.4.2  ,tomcat 5.0
    Reporter: lantian


I found that  <f:attribute>  doese not work with <x:dataTable> .
the following is my JSF page Code:

<x:dataTable id="dt_account"     headerClass="standardTable_Header"
        footerClass="standardTable_Header"
        rowClasses="standardTable_Row1,standardTable_Row2"
        
columnClasses="standardTable_ColumnCentered,standardTable_ColumnCentered"
        value="#{pc_GrantFunctionHasOperate.functionOperateListToGrant}"
        var="row" 
         preserveDataModel="true">
         <f:facet name="header">
                               <h:outputText value="可授权操作及已授权操作(被选中的操作)列表" 
style="font-size:9pt" />
                       </f:facet>
          <h:column>
                <h:selectBooleanCheckbox id="sbc_operate" 
value="#{row.selected}"  
                       
valueChangeListener="#{pc_GrantFunctionHasOperate.onOperateSelectedChange}"
                   onclick="submit();">
                    <f:attribute name="operateCode" value="#{row.operateCode}" 
/>
               </h:selectBooleanCheckbox>
            </h:column>
            <h:column >
               <f:facet name="header">
                  <h:outputLabel for="sbc_operate" id="header_funName" 
style="font-size:9pt"  value="操作名称" />
                             </f:facet>
           <h:outputText id="opt_accountCode" value="#{row.operateName}"  />
           </h:column>
         </x:dataTable>

 the following code is backingBean's method of  valueChangeListener :
 public  void onOperateSelectedChange(ValueChangeEvent event)
    { 
                
         String 
operateCode=(String)event.getComponent().getAttributes().get("operateCode");
         return;
                 
    }
 i found that the operateCode is null  when the valueChange Event occured .

but if i set the value of <f:attribute> to a const value ,then i can got it 
when the valueChange Event occured .
for example :
                          <h:column>
                <h:selectBooleanCheckbox id="sbc_operate" 
value="#{row.selected}"  
                       
valueChangeListener="#{pc_GrantFunctionHasOperate.onOperateSelectedChange}"
                   onclick="submit();">
                    <f:attribute name="operateCode" value="0001" />
               </h:selectBooleanCheckbox>
            </h:column>

    

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to