• Post Reply Bookmark Topic Watch Topic
  • New Topic

rich spacer issue in Richfaces 4  RSS feed

 
Santhosh Lakshmanan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

Need a solution for one of the issue we are facing in our application. The composite component approach fixes rich spacer issue in our application where all we used "<rich:spacer>" tag in .xhtml pages. But, we are facing one more scenario where we have custom component and inside the custom component we are using HtmlSpacer like below.

HtmlSpacer spacer = new HtmlSpacer();
spacer.setWidth("20");

We don't know how to replace this. What is an appropriate solution for this? Thanks in advance.

Thanks,
Santhosh
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Santosh!

RichFaces 4 removed the spacer and rule tags. I wasn't pleased about that, since it's just one more thing that makes upgrading from RichFaces 3 a non-trivial process, but they didn't ask me.

You can get spacing control by using the CSS padding and margin properties on the elements you want separated. Or, if you feel the need for a discrete element to replace the rich:spacer element, you can use a raw HTML DIV tag or its JSF equivalent: a 1-column panelGrid.
 
Santhosh Lakshmanan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,

Thanks for your reply. I'm new to CSS and if you could give me some example of accomplishing through CSS that would be helpful.

Thanks,
Santhosh
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have an HTML/CSS forum that should be able to help you with that.

JSF mostly uses CSS the same way that straight HTML does, although many of the custom JSF tagsets define their own CSS classes in order to make it easier to "skin" the look-and-feel of your site.

You can see generated CSS using your browser's "View Page Source" option. Some browsers, such as Firefox with the Firefly debugger installed also have the ability to see what CSS is being applied to selected elements and even to make changes to that CSS to see what happens.
 
Santhosh Lakshmanan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!