You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ana Tatavu <an...@yahoo.ca> on 2008/01/29 18:39:42 UTC

Sandbox - fishEye - embedded into a table cell

Hi,
 
I am using myFaces, Trinidad, Tomahawk and Sandbox.
I need to embed the fishEye component in a table column. 
Each cell from each row and one specific column will have 4 icons in a fish eye component.
The fishEye should look the same, but it should trigger actions with different parameters depending on the row.
 
Assume the table is :
 
row_0          fishItem
row_1          fishItem
 
When click fishItem on row_0 ,just  the actionListener for fishItem from row_0 should be invoked.
 
What happens now: When click on a fishItem all the actionListeners are called for all the displayed rows in the table.
For 20 visible rows , it will be called 20 times, not just for the row I clicked on.
 
 
 
Jsp code:
 
<tr:table value="#{BBean.tableData}" var="row" width="100%" 
            rowSelection="multiple" horizontalGridVisible="true" id="jobTable">
<f:facet name="header">
        <tr:outputText value="Test"/>
</f:facet>
<f:facet name="actions">
    <tr:panelButtonBar>
        < tr:commandButton text="Customize..."/>
        <tr:commandButton text="Auto Refresh Off"/>
        <tr:commandButton text="Refresh"/>
    </tr:panelButtonBar>
</f:facet>
<tr:column headerText="Name" sortable="true" sortProperty="name">
    <tr:outputText value="#{row.name}"/>
</tr:column>
<tr:column headerText="Status" sortable="true" sortProperty="status">
    <tr:outputText value="#{row.status}"/>
</tr:column>
<tr:column headerText="Actions" id="tableAction"> 
    <s:fishEyeNavigationMenu 
            rendered="true"
            itemWidth="16" 
            itemHeight="16"
            itemMaxWidth="32" 
            itemMaxHeight="32" 
            orientation="horizontal"
            var="item" 
            value="#{row.items}"
            itemPadding="2" 
            attachEdge="top" 
           labelEdge="left"
        effectUnits="4"
    >
<s:fishEyeCommandLink 
    caption="#{item.caption}" 
    iconSrc="#{item.iconSrc}" 
    target="#{item.target}"
    actionListener="#{item.action}" />
</s:fishEyeNavigationMenu>
</tr:column>
</tr:table>


      Get a sneak peak at messages with a handy reading pane with All new Yahoo! Mail: http://ca.promos.yahoo.com/newmail/overview2/