File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Any idea what could cause new <br> tags to get added to the rendered code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Any idea what could cause new <br> tags to get added to the rendered code?" Watch "Any idea what could cause new <br> tags to get added to the rendered code?" New topic
Author

Any idea what could cause new <br> tags to get added to the rendered code?

Dan Acuff
Ranch Hand

Joined: Jul 13, 2009
Posts: 62
The following happens. I am defaulted to the Credit Card radio button. I decide I want to click the PayPal radio button. I again decide to click the Credit Card radio button. At that very moment 2 extra break tags are inserted right below this intended br element. They are just two plain br tags with no style or class.



What could be causing this? This is a JSF, SEAM RichFaces application. I should add the inserted br tags look like <br> so they would not pass the xhtml requirements of facelets.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16137
    
  21

No way I can tell - it's probably generated by the <s:div> tag, whatever that is - but there's no need for <p/> or <br/> tags anyway. Use the margin-top and margin-bottom styles on your <div;> element to get the blank "lines" above and below the div content. Merely employing a div element causes the same effect as a br element, since the difference between div and span is that span doesn't do a line break.


Customer surveys are for companies who didn't pay proper attention to begin with.
Dan Acuff
Ranch Hand

Joined: Jul 13, 2009
Posts: 62
Turned out by changing the <P> tags to <s:div> tags around each section. The mysterious problem went away. Well most of it anyway.

In Internet Explorer If you click the Paypal radio button then Credit Card radio button then Paypal radio button, at that point it will automatically shift back to the Credit Card radio button on its own.

Something to do with the Ajax calls I am guessing..
Dan Acuff
Ranch Hand

Joined: Jul 13, 2009
Posts: 62
BUG:
When you select paypal it is fine, when you go back to credit card it is fine.. when you click yet again on PayPal's radio button it will automatically reselect the Credit card radio button. This only happens in IE browsers; Chrome and FF are fine.



and the 2 pieces that call the function:



and

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Any idea what could cause new <br> tags to get added to the rendered code?