Hi all.

I would like to create a tc:sheet as follows:

In want add a panel to a Colmun, which has many command elements for
each row in the sheet.
I have written a method to create a panel for the row object of the
sheet, but 
i need help to bind the method with jstl or java to the panel. 



JSP:

   <tc:sheet value="#{controller.objects}" id="objectSheet" var="object"
>
       <tc:column id="col1" sortable="false">
          <tc:out value="#{object.attribut}" id="t_out" />
       </tc:column>
        <tc:column id="col2" sortable="false">
          <tc:panel binding="#{.....}"  id="t_panel" />
       </tc:column>
   </tc:sheet>



Controller:

 public UIComponent createPanel(Object obj) {

        FacesContext facesContext = FacesContext.getCurrentInstance();

        UIPanel panel = (UIPanel)
ComponentUtil.createComponent(facesContext,
 
UIPanel.COMPONENT_TYPE,
 
TobagoConstants.RENDERER_TYPE_PANEL,
 
"img_panel");
        for (int i = 0; i < ob.getImgObjects.size(); i++) {
            ImgObj img = ob.getImgObjects.get(i);
            UILinkCommand linkCommand = (UILinkCommand)
ComponentUtil.createComponent(facesContext,
 
UILinkCommand.COMPONENT_TYPE,
 
TobagoConstants.RENDERER_TYPE_LINK,
 
"link" + i);
            ComponentUtil.setStringProperty(linkCommand,
TobagoConstants.ATTR_IMAGE, img.getIconUrl());
            panel.getChildren().add(linkCommand);
        }
        
        return panel;
    }


Any suggestions?


Regards

Hani

Reply via email to