The suggested workaround works.

--- THIEN PHAM <[EMAIL PROTECTED]> wrote:

> BTW, this is on WAS 6.1 which I think is using JSF
> RI,
> but who knows, maybe IBM has its own implementation
> of
> JSF just like it does with JDK.
> 
> Upon further investigation, in the case of using
> Myfaces core, I found out that when
> HtmlSortCommandHeader.getClientId() is invoked, the
> call goes all the way up to MyFaces' UIComponentBase
> which corrrectly obtains the client ID from the
> container object HtmlColumns (which in turn calls
> UIData.getClientId()).
> 
> So it seems that UIData and/or UIComponentBase are
> implemented differently by IBM (or Sun) that doesn't
> return the expected client id. 
> 
> One way to work around this, I think, is to add an
> override method getClientId directly to HtmlColumns
> (basically, just copy the getClientId method from
> MyFaces' UIData to HtmlColumns).
> 
> --- THIEN PHAM <[EMAIL PROTECTED]> wrote:
> 
> > Yes. It looks something like this:
> > 
> > <t:dataTable id="sec_user_list_table"
> >     styleClass="scrollerTable"
> >     headerClass="standardTable_SortHeader"
> >     footerClass="standardTable_Header"
> >     rowClasses="tablellwhite,tablellsilver"
> >     columnClasses="standardTable_Column"
> >     rowOnMouseOver="hilite(this);"
> >     rowOnMouseOut="dehilite(this);"
> >     var="user"
> >     value="#{secUserListBean.data}"
> >     preserveDataModel="false"
> >     rows="#{commonBean.maxDisplayRow}"
> >     sortColumn="#{secUserListBean.sort}"
> >     sortAscending="#{secUserListBean.ascending}"
> >     preserveSort="true"
> >     renderedIfEmpty="false">
> >     
> >     <t:columns id="columns"
> > value="#{secUserListBean.columnHeaders}"
> > var="colHdr">
> >             <f:facet name="header">
> >                     <t:commandSortHeader
> columnName="#{colHdr.label}"
> > 
> >                             arrow="false" 
> >                             immediate="false" 
> >                             style="text-decoration:'none'">
> >                             <f:facet name="ascending">
> >                                     <t:graphicImage
> > value="images/ascending-arrow.gif" rendered="true"
> > border="0"/>
> >                             </f:facet>
> >                             <f:facet name="descending">
> >                                     <t:graphicImage
> > value="images/descending-arrow.gif"
> rendered="true"
> > border="0"/>
> >                             </f:facet>
> >                             <h:outputText value="#{res.delete}"
> > rendered="#{colHdr.label == 'Select'}"/>    
> >                             <h:outputText value="#{colHdr.label}"
> > rendered="#{colHdr.label != 'Select'}"/>                    
>  
> >  
> >                                                 
> >                     </t:commandSortHeader>
> >             </f:facet>
> >             <h:selectBooleanCheckbox id="sel_delete"
> > value="#{secUserListBean.columnValue}"
> > rendered="#{colHdr.label == 'Select'}"
> > disabled="#{user.systemElement}"/>
> >             <t:commandLink id="uid_lnk"
> > rendered="#{colHdr.label
> > == 'Username'}"
> >
>
actionListener="#{secUserInfoForm.onEnableUpdateUserForm}">
> >                     <h:outputText
> > value="#{secUserListBean.columnValue}"/>
> >             </t:commandLink>
> >             <h:outputText
> > value="#{secUserListBean.columnValue}"
> > rendered="#{colHdr.label != 'Select' and
> > colHdr.label
> > != 'Username'}"/>
> >     </t:columns>    
> > </t:dataTable>
> > 
> > 
> > --- Martin Marinschek
> <[EMAIL PROTECTED]>
> > wrote:
> > 
> > > Are you using t:columns in the table?
> > > 
> > > regards,
> > > 
> > > Martin
> > > 
> > > On 9/12/06, THIEN PHAM <[EMAIL PROTECTED]> wrote:
> > > > <t:sortCommandHeader> in Tomahawk 1.1.3
> doesn't
> > > work
> > > > with JSF RI, i.e. clicking on the column
> header
> > > > doesn't result in the column data to be
> sorted.
> > I
> > > > don't know if this is a MyFaces or JSF RI
> > problem,
> > > but
> > > > in comparing with the same webapp that uses
> > > MyFaces
> > > > core, I noticed the followings:
> > > >
> > > > - When using MyFaces core, each of the column
> > > header
> > > > is (correctly, I guess) generated as an HTML
> > > anchor
> > > > link with a sequential id like:
> > > >
> > > >   user_form:list_table:columns:0:_idJsp59
> > > >   user_form:list_table:columns:1:_idJsp59
> > > >   user_form:list_table:columns:2:_idJsp59
> > > >   ..etc..
> > > >
> > > > - When using JSF RI, all the column headers
> have
> > > the
> > > > same id:
> > > >   user_form:list_table:columns:_idJsp59
> > > >
> > > > Notice the column number is missing from the
> id.
> > > That
> > > > seems to explain why when I clicked on the
> > second
> > > > column header, the arrow always shows up with
> > the
> > > last
> > > > column header. Is this something that can be
> > > corrected
> > > > in MyFaces? Thanks.
> > > >
> > > >
> > > >
> > __________________________________________________
> > > > Do You Yahoo!?
> > > > Tired of spam?  Yahoo! Mail has the best spam
> > > protection around
> > > > http://mail.yahoo.com
> > > >
> > > 
> > > 
> > > -- 
> > > 
> > > http://www.irian.at
> > > 
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > > 
> > > Professional Support for Apache MyFaces
> > > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> > protection around 
> > http://mail.yahoo.com 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to