• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

rich spacer issue in Richfaces 4

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 28313
207
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Saloon Keeper
Posts: 28313
207
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim.
 
No holds barred. And no bars holed. Except this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic