primefaces-extensions / primefaces-extensions.github.com

Organization repo, only for homepage, wiki and issue tracker
https://primefaces-extensions.github.io/
70 stars 22 forks source link

DynaForm should support columnClasses #380

Closed Rapster closed 8 years ago

Rapster commented 8 years ago

DynaForm is like a table (e.g h:panelGrid), what do you think of having columnClassesattribute alowing to define style for label and control. Let me explain my case, my labels should use label-container class and control should use field-container class.

You'd tell me, you can override css by doing this:

#dynaForm .pe-dynaform-label {
    // awesome style
}

And you're right, this is what I did so far, but what about control?

What I want to do, is to avoid to define for each dynaFormControl the same styleClass, I have 20 cases to support!

So to make it the simplest as possible, I was thinking by doing this like a h:panelGrid, with columnClasses, what do you think? The format must contain maximum two classes, one for the label and the other the control. Exemple:

<pe:dynaForm columnClasses="label-container, field-container" >
</pe:dynaForm>
ova2 commented 8 years ago

Feel free to provide a patch. The idea is good.

Rapster commented 8 years ago

Okay I'm working on it ;)

ova2 commented 8 years ago

Fixed with https://github.com/primefaces-extensions/core/pull/28 and https://github.com/primefaces-extensions/showcase/pull/2