• Post Reply Bookmark Topic Watch Topic
  • New Topic

I have Facing proble in adding Facet in table through the Back -Bean in JSF.  RSS feed

 
sharad ahire
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created Table dynamically in Back-Bean of JSF page.I was creating table using table using following code
----------------------------------------
private Table table = new Table();
private TableRowGroup tableRowGroup = new TableRowGroup();
table.setId("table1");
// Create the Table Row group dynamically

tableRowGroup.setId("tableRowGroup1");
tableRowGroup.setSourceVar("currentRow");
tableRowGroup.setRows(5);
tableRowGroup.setValueBinding("sourceData", getApplication().createValueBinding("#{Page1.objectListDataProvider}"));
table.getChildren().add(tableRowGroup);

-------------------------------------------------------
there is method "table.getFacet()" but there in no method yo add the "Facet"
inside table.
the reason behind using facet is that i have to add panelGroup which will have three buttons .

Please help me....
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which component library are you usiung? The classes you mentioned are not recognizeable as a standard JSF implementation. All you need to do is to consult the API documentation of the JSF component library in question. There might be a setFooter() method where you can set the footer facet of the table.
 
Chris Tiearney
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem like this too. I'm using the ICEfaces framework and creating a collapsible panel in a kind of form generator class. My code is as follows:

After this there isn't any clear indication of how to set the facet needed for the header. No getHeader method. The only two methods that have anything to do with the facet is getFacet(String arg0) (returns UIComponent) and getFacets() (returns Map<String, UIComponent>.

Now there's two possibilities that I'm seeing here:
  • getFacet("header").getChildren().add(new UIComponent() or whatever);
  • getFacets().put("header", new ??? facet UIComponent object());


  • The questions that remain is does the header facet automatically get created in which case we can just use the first option or do we have to create it and what object do we then use to create that header facet.
     
    Keith Hudson
    Greenhorn
    Posts: 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Chris Tiearney wrote:
    Now there's two possibilities that I'm seeing here:
  • getFacet("header").getChildren().add(new UIComponent() or whatever);
  • getFacets().put("header", new ??? facet UIComponent object());




  • I was stuck on this all morning but finally figured it out.

    Yes, the second suggestion is how you want to do it:

    Here is a code example:



    That will put the Text and the Image on the tab together like this: Here is my label[image].

    Hope this helps.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!