JamesBranam's Blog
JSF 1.2 Markup Component
Hi all,
I've been going through the Help for 6.5, and I have to say that visiting some of the topics is like seeing an old friend again. Today I thought I write about a little known component: the Markup component.
The Markup component enables you to insert HTML elements into the JSP page in places that HTML is not permitted by JavaServer Pages coding restrictions. When you drop this component on a page in the Visual Designer, you cannot see it on the page until you set the tag property. You can see it in the Navigator window and you can select it there to edit its properties in the Properties window. A lot of "hidden components" are like this. It's good to know that the Navigator window is there.
Use the tag property to specify the type of HTML element to insert. For instance, to insert an "hr" tag, set the tag property to hr with no angle brackets and select the singleton property.
To provide compliance with XHTML, if the HTML element you are inserting is a singleton element, you must specify the singleton property, which causes a trailing "/>" to be generated in the rendered.
If you want to specify HTML attributes in addition to id and style for the element you are inserting, use the extraAttributes property.
See you tomorrow.
--James
Posted at 07:37PM Jul 28, 2008 by branajam in NetBeans |