You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by sudeivas <su...@gmail.com> on 2011/12/12 21:39:59 UTC

When to use setRenderBodyOnly(true) ?

Hello,
      I am using deployment configuration in my web.xml. But if I remove
setRenderBodyOnly(true) for some of the containers and components, then I am
getting some issues with CSS styles. 

Does it really make sense to use setRenderBodyOnly(true) when I am in
deployment mode already?

I am not sure when to use setRenderBodyOnly(true) and when not to? 

Thanks,
Suresh

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4187518.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: When to use setRenderBodyOnly(true) ?

Posted by sudeivas <su...@gmail.com>.
Ya, I just noticed some issues if I setRenderBodyOnly(true) to all the
components. It seems some components need the wicket markups to be displayed
properly. For now I think I will go through each component and then decide
whether they need markups or not. 

Thanks All

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4188122.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: When to use setRenderBodyOnly(true) ?

Posted by Dan Retzlaff <dr...@gmail.com>.
Hi Suresh,

Without renderBodyOnly=true, you will have an extra element in your HTML
hierarchy. How that affects your page layout depends on what that element
is, and whether you have CSS selectors that depend on it not being there
(such as child selectors A>B). It's hard to be more specific without seeing
the markup and CSS.

On Mon, Dec 12, 2011 at 3:12 PM, sudeivas <su...@gmail.com> wrote:

> I did include the code
>
> getMarkupSettings().setStripWicketTags(true);
>
> in my Application's init() method.
>
> But after removing .setRenderBodyOnly(true) in couple of panels, I am
> getting CSS issues. But it works fine if I include .setRenderBodyOnly(true)
> to the components.
>
> Am I missing something?
>
> Currently using Apache Wicket - 1.5.3
> -Suresh
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4188072.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: When to use setRenderBodyOnly(true) ?

Posted by sudeivas <su...@gmail.com>.
I did include the code 

getMarkupSettings().setStripWicketTags(true);

in my Application's init() method.

But after removing .setRenderBodyOnly(true) in couple of panels, I am
getting CSS issues. But it works fine if I include .setRenderBodyOnly(true)
to the components. 

Am I missing something?

Currently using Apache Wicket - 1.5.3
-Suresh

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4188072.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: When to use setRenderBodyOnly(true) ?

Posted by Bertrand Guay-Paquet <be...@step.polymtl.ca>.
Maybe you have a misunderstanding. setRenderBodyOnly(true) does not 
depend at all on deployment or development mode.

What _does_ depend on it though is the rendering of <wicket:container> 
tags and other wicket attributes. Personally, I use the following in my 
application init method:
getMarkupSettings().setStripWicketTags(true);

This is because I also had inconsistent styling between the 2 modes.

On 12/12/2011 4:17 PM, sudeivas wrote:
> Thanks..
>
> But do I need to specify setRenderBodyOnly(true) for each component even in
> the 'deployment' mode? Is there a better way to strip these markups for all
> the components of a page? As we have lot of nested components for a page.
>
>
> -Suresh
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4187651.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: When to use setRenderBodyOnly(true) ?

Posted by sudeivas <su...@gmail.com>.
Thanks..

But do I need to specify setRenderBodyOnly(true) for each component even in
the 'deployment' mode? Is there a better way to strip these markups for all
the components of a page? As we have lot of nested components for a page. 


-Suresh

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4187651.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: When to use setRenderBodyOnly(true) ?

Posted by Bertrand Guay-Paquet <be...@step.polymtl.ca>.
Hi,

With the following markup:
<li wicket:id="item"><span wicket:id="content">Content</span></li>

using setRenderBodyOnly(true) on the span element would yield something 
like :
<li>The Content</li>

Besides having to match a specific markup structure, I am not sure when 
and why this should be used. Maybe for "cleaner" markup?

Bertrand

On 12/12/2011 3:39 PM, sudeivas wrote:
> Hello,
>        I am using deployment configuration in my web.xml. But if I remove
> setRenderBodyOnly(true) for some of the containers and components, then I am
> getting some issues with CSS styles.
>
> Does it really make sense to use setRenderBodyOnly(true) when I am in
> deployment mode already?
>
> I am not sure when to use setRenderBodyOnly(true) and when not to?
>
> Thanks,
> Suresh
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4187518.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org