Hello,

I would like to add a behavior to a component which alters the HTML output 
related to that component.  I know that you can use setComponentBorder but I 
saw a posting that mentioned behaviors were the more appropriate way to do this 
as explicit component borders might become deprecated.

I am trying to do something simple like wrap a form component with a label.
For example:
Instead of a form component rendering as:
 <input type="text" .../>

I would like the behavior to help the component to render as
<li><label>Some Label</label> <input type="text" .../></li>

So, the label component would be responsible for wrapping the inner content 
with:
<li><label>Some Label</label> {inner content} </li>

Here is where I am at:

-          I know I probably want to extend AbstractBehavior

-          I know I probably want to use the beforeRender and afterRender 
methods to do this

Would anyone be able to give me some pointers to get started on this?  Thank 
you very much.


Regards,

Joe

Reply via email to