Page 1 of 1

add title to dynaform label

Posted: 17 Sep 2012, 14:16
by evaleah
I have a need for hover tips on the label portion of a dynaform. Any suggestions of how I could acheive this? I had thought I could add a title attribute but it seems that is not available from the dynaform control portion or the label portion.

Thanks!

Re: add title to dynaform label

Posted: 17 Sep 2012, 14:35
by Oleg
Simple. You normally pass an arbitrary Object to controls in Java. If your object has "title" attribute, you can use it for corresponding label (its title). Look this example please http://fractalsoft.net/primeext-showcas ... atures.jsf You can see that you can use pe:dynaFormControl without "type" attribute. E.g. as

Code: Select all

<pe:dynaFormControl styleClass="pe-dynaform-label">  
    <h:outputText value="#{data.value}" title="#{data.title}"/>  
</pe:dynaFormControl>
That will be used for label. On the server-side you can create a label as a quite normally control. Like

Code: Select all

row = model.createExtendedRow();  
  
row.addControl(new SomeDataObject("My Value", "My Title"), 1, 1);   // label (without "type", but you can specify "type" too)
row.addControl(new InventoryProperty("(4,2)", false), "input", 1, 1);  // control with type "input"
If you want to have a built-in "title" support for built-in labels, please create an issue ticket in our issue tracker http://code.google.com/p/primefaces-ext ... ssues/list Thanks.

Re: add title to dynaform label

Posted: 17 Sep 2012, 22:06
by evaleah
Of course, I can just add a control of an output text and not bother with the label at all. I have no idea why I had not thought of it before. Obvious :)

Thank you!