You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@hlmksw.com> on 2007/02/09 22:45:59 UTC

Form Widget Kudos

I just spent the last two days working closely with the form widget and I'd like 
to take the time to offer my appreciation and admiration to its author.

At first I didn't care for it because it produced a very simplistic form. After 
digging into the HtmlFormRenderer.java code, I discovered it has tremendous 
styling ability that isn't used by default. So, if you take the time to create a 
decent form widget CSS style, then you can get the form widget's output to look 
quite fancy.

One glaring omission in HtmlFormRenderer.java - there is no way to specify a 
style for the layout table it contains. Otherwise, it's an awesome piece of code.

-Adrian


Re: Form Widget Kudos

Posted by Adrian Crum <ad...@hlmksw.com>.
Leon - that's a good tip! Since I was already in the java code doing cleanups, I 
just hardcoded it to use a "basicTable" style - which is in my style sheet. I'd 
like to get some help with converting that to a parameter though.


Leon Torres wrote:

> Quick and dirty way to accomplish this:  Wrap your form call in a 
> <container id="something">
> 
> Then you can use CSS selectors to select that particular form table:
> 
> #someting table {}
> 
> I think we do this trick in crmsfa, where the form widget is probably 
> most intensively used.
> 
> Cheers,
> 
> - Leon
> 
> Adrian Crum wrote:
> 
>> I just spent the last two days working closely with the form widget 
>> and I'd like to take the time to offer my appreciation and admiration 
>> to its author.
>>
>> At first I didn't care for it because it produced a very simplistic 
>> form. After digging into the HtmlFormRenderer.java code, I discovered 
>> it has tremendous styling ability that isn't used by default. So, if 
>> you take the time to create a decent form widget CSS style, then you 
>> can get the form widget's output to look quite fancy.
>>
>> One glaring omission in HtmlFormRenderer.java - there is no way to 
>> specify a style for the layout table it contains. Otherwise, it's an 
>> awesome piece of code.
>>
>> -Adrian
>>
>>
> 

Re: Form Widget Kudos

Posted by Adrian Crum <ad...@hlmksw.com>.
Leon,

Quick question: in crmsfa, did you use that trick to style just the table or all 
of its elements too? The reason I ask is, I modified the form renderer to only 
use the <span> element when a style is specified in the xml file, otherwise the 
element just appears in its container.

Example:

Existing form renderer outputs

<td width="20%" align="right"><span>First Name</span></td>

My modification outputs

<td>First Name</td>

I'm concerned my improvements might break your styling, should they make their 
way into the project.



Leon Torres wrote:

> Quick and dirty way to accomplish this:  Wrap your form call in a 
> <container id="something">
> 
> Then you can use CSS selectors to select that particular form table:
> 
> #someting table {}
> 
> I think we do this trick in crmsfa, where the form widget is probably 
> most intensively used.
> 
> Cheers,
> 
> - Leon
> 
> Adrian Crum wrote:
> 
>> I just spent the last two days working closely with the form widget 
>> and I'd like to take the time to offer my appreciation and admiration 
>> to its author.
>>
>> At first I didn't care for it because it produced a very simplistic 
>> form. After digging into the HtmlFormRenderer.java code, I discovered 
>> it has tremendous styling ability that isn't used by default. So, if 
>> you take the time to create a decent form widget CSS style, then you 
>> can get the form widget's output to look quite fancy.
>>
>> One glaring omission in HtmlFormRenderer.java - there is no way to 
>> specify a style for the layout table it contains. Otherwise, it's an 
>> awesome piece of code.
>>
>> -Adrian
>>
>>
> 

Re: Form Widget Kudos

Posted by Leon Torres <le...@oss.minimetria.com>.
Quick and dirty way to accomplish this:  Wrap your form call in a <container 
id="something">

Then you can use CSS selectors to select that particular form table:

#someting table {}

I think we do this trick in crmsfa, where the form widget is probably most 
intensively used.

Cheers,

- Leon

Adrian Crum wrote:
> I just spent the last two days working closely with the form widget and 
> I'd like to take the time to offer my appreciation and admiration to its 
> author.
> 
> At first I didn't care for it because it produced a very simplistic 
> form. After digging into the HtmlFormRenderer.java code, I discovered it 
> has tremendous styling ability that isn't used by default. So, if you 
> take the time to create a decent form widget CSS style, then you can get 
> the form widget's output to look quite fancy.
> 
> One glaring omission in HtmlFormRenderer.java - there is no way to 
> specify a style for the layout table it contains. Otherwise, it's an 
> awesome piece of code.
> 
> -Adrian
> 
>