[ http://issues.apache.org/jira/browse/MYFACES-437?page=all ]

Michal Borowiecki updated MYFACES-437:
--------------------------------------

    Status: Patch Available  (was: Reopened)

> <f:attribute> does not work  with  <x:dataTable>
> ------------------------------------------------
>
>          Key: MYFACES-437
>          URL: http://issues.apache.org/jira/browse/MYFACES-437
>      Project: MyFaces Core
>         Type: Bug

>   Components: General
>     Versions: 1.0.9m9
>  Environment: jdk1.4.2  ,tomcat 5.0
>     Reporter: lantian
>     Assignee: Manfred Geiler

>
> 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