Manuel Fehlhammer created RF-12825:
--------------------------------------

             Summary: rich:column does not create unique IDs when included in 
rich:pickList
                 Key: RF-12825
                 URL: https://issues.jboss.org/browse/RF-12825
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: component-tables
    Affects Versions: 4.3.0.Final
            Reporter: Manuel Fehlhammer


The following artefact, where I use rich:tooltip inside rich:column of a 
rich:pickList shows the bug.
Only for the first entry of the source picklist a tooltip is displayed on mouse 
over.
Reason (see linked forum thread) is, that the rich:column does not correctly 
generate the ID of the included h:output when iterating over the select items.
Since this works ok, when rich:column is inside a rich:table it is obviously a 
problem, when rich:column is included in rich:pickList. 

{code:xml}
<h:body>
    <f:view>
        <h:form>
            <rich:pickList value="#{backBean.pickListTargetCol}"
                           var="item"
                           listsHeight="100"
                           listWidth="100"
                           sourceCaption="SourceItems"
                           targetCaption="PickedItems">
                <f:selectItems value="#{backBean.pickListSourceCol}"/>
                <rich:column id="myCol">
                    <h:outputText id="item" value="Item_#{item}"/>
                    <rich:tooltip target="item" value="Tooltip_#{item}"/>
                </rich:column>
            </rich:pickList>
        </h:form>
    </f:view>
</h:body>
{code}

managed bean for this example:

{code}
@ManagedBean(name = "backBean")
@SessionScoped
public class TestBean {
    private Collection<Integer> pickListTargetCol;
    private Collection<Integer> pickListSourceCol;
    
    public Collection<Integer> getPickListTargetCol()
    {        
        return pickListTargetCol;
    }
    public void setPickListTargetCol(Collection<Integer> pickListTargetCol)
    {        
        this.pickListTargetCol = pickListTargetCol;    
    }
    
    public Collection<Integer> getPickListSourceCol() 
    {
        Collection<Integer> result = new ArrayList();
        for(int i = 1; i<=10; i++)
        {            
                result.add(i);        
        }
        return result;
    }
    
    public void setPickListSourceCol(Collection<Integer> pickListSourceCol) 
    {
        this.pickListSourceCol = pickListSourceCol;
    }
}
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to