You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by membersound <me...@web.de> on 2012/10/31 20:50:18 UTC

[Bug] t:zone update loses background style

Sometimes if a t:zone is updated, I'm losing any background styling. Firebug
then shows:
<div id="myId" class="t-zone" style="background-image: none;
background-color: rgb(255, 255, 255);">

Very strange, is somebody else having this issue? Or moreover: HOW can i
prevent this? What do I maybe have to override with css?

Thanks



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Bug-t-zone-update-loses-background-style-tp5717469.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: [Bug] t:zone update loses background style

Posted by membersound <me...@web.de>.
Great!! I did not specify the update attribute. with update="show" the style
is not lost anymore!

Though I'm unsure if this is a bug or not. Is the behavior expected if
update attribute is omitted?



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Bug-t-zone-update-loses-background-style-tp5717469p5717479.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: [Bug] t:zone update loses background style

Posted by Muhammad Gelbana <m....@gmail.com>.
Does it occur randomly ? You said "sometimes".

http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Zone.html
I suppose you need to specify the *update* attribute with the value *show*.

On Wed, Oct 31, 2012 at 9:50 PM, membersound <me...@web.de> wrote:

> Sometimes if a t:zone is updated, I'm losing any background styling.
> Firebug
> then shows:
> <div id="myId" class="t-zone" style="background-image: none;
> background-color: rgb(255, 255, 255);">
>
> Very strange, is somebody else having this issue? Or moreover: HOW can i
> prevent this? What do I maybe have to override with css?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Bug-t-zone-update-loses-background-style-tp5717469.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [Bug] t:zone update loses background style

Posted by Geoff Callender <ge...@gmail.com>.
Please vote for this issue:  https://issues.apache.org/jira/browse/TAP5-2014  
AKA "Zone highlight leaves behind an explicit background-color which overrides css background-color"

On 01/11/2012, at 8:45 AM, membersound wrote:

> Yes zone.getBody().
> 
> And I too use CSS, the style ...background-color is the result that is
> somehow changed by tapestry in the back, and overwrites my css styles. I did
> not specify this myself!
> 
> 
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Bug-t-zone-update-loses-background-style-tp5717469p5717480.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


Re: [Bug] t:zone update loses background style

Posted by membersound <me...@web.de>.
Yes zone.getBody().

And I too use CSS, the style ...background-color is the result that is
somehow changed by tapestry in the back, and overwrites my css styles. I did
not specify this myself!



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Bug-t-zone-update-loses-background-style-tp5717469p5717480.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: [Bug] t:zone update loses background style

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Wed, 31 Oct 2012 17:50:18 -0200, membersound <me...@web.de> wrote:

> Sometimes if a t:zone is updated, I'm losing any background styling.  
> Firebug
> then shows:
> <div id="myId" class="t-zone" style="background-image: none;
> background-color: rgb(255, 255, 255);">

Do you return zone or zone.getBody()? The last one is the correct one.

> Very strange, is somebody else having this issue? Or moreover: HOW can i
> prevent this? What do I maybe have to override with css?

I'd use CSS instead of the style attribute anyway.

-- 
Thiago H. de Paula Figueiredo

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


Re: [Bug] t:zone update loses background style

Posted by Rural Hunter <ru...@gmail.com>.
I've seen an simlar case. We used a js tab lib which opens new page in 
tab in iframe way. if I switch to other tab before the tab completes 
loading, the zone manager is not initialized because of this bug. 
Strangely I didn't see any error in firebug. I have to do manual trace 
and get the same spot and use the exact same fix.

于 2012/11/1 5:57, Bryan Lewis 写道:
> Which reminds me...  I sent a closely related question to the list two
> weeks ago (which is why your question caught my eye) but for some reason it
> never made it.  I'll repeat it here:
>
> In Tapestry 5.3.6 I've created a page using the new Tree component.  The
> tree is inside a zone and the page is inside an iframe to serve as the
> content of a subModal window.  When the modal window is dismissed (hidden),
> I see an error in Firebug:
> this.element.getStyle("background-color") is null.
>
> It points to line 1796 of tapestry.js:
>
>      /*
>       * TAP5-707: store the old background color of the element or take white
>       * as a default
>       */
>      this.endcolor =
> this.element.getStyle('background-color').parseColor('#ffffff');
>
> I can avoid the error by changing that line to:
>
>      this.endcolor = '#ffffff';  // default
>      if (this.element.getStyle('background-color'))
>          this.endcolor =
> this.element.getStyle('background-color').parseColor('#ffffff');
>
>
>
>
> On Wed, Oct 31, 2012 at 5:53 PM, Bryan Lewis <jb...@gmail.com> wrote:
>
>> I wonder if it's related to this issue:
>> https://issues.apache.org/jira/browse/TAP5-707
>>
>> As of version 5.2, tapestry.js sets the background color inside a zone,
>> trying to prevent a partially faded yellow.
>>
>>
>> On Wed, Oct 31, 2012 at 3:50 PM, membersound <me...@web.de> wrote:
>>
>>> Sometimes if a t:zone is updated, I'm losing any background styling.
>>> Firebug
>>> then shows:
>>> <div id="myId" class="t-zone" style="background-image: none;
>>> background-color: rgb(255, 255, 255);">
>>>
>>> Very strange, is somebody else having this issue? Or moreover: HOW can i
>>> prevent this? What do I maybe have to override with css?
>>>
>>> Thanks
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://tapestry.1045711.n5.nabble.com/Bug-t-zone-update-loses-background-style-tp5717469.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>


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


Re: [Bug] t:zone update loses background style

Posted by Rural Hunter <ru...@gmail.com>.
I created jira issue for this:
https://issues.apache.org/jira/browse/TAP5-2043

于 2012/11/1 5:57, Bryan Lewis 写道:
> Which reminds me...  I sent a closely related question to the list two
> weeks ago (which is why your question caught my eye) but for some reason it
> never made it.  I'll repeat it here:
>
> In Tapestry 5.3.6 I've created a page using the new Tree component.  The
> tree is inside a zone and the page is inside an iframe to serve as the
> content of a subModal window.  When the modal window is dismissed (hidden),
> I see an error in Firebug:
> this.element.getStyle("background-color") is null.
>
> It points to line 1796 of tapestry.js:
>
>      /*
>       * TAP5-707: store the old background color of the element or take white
>       * as a default
>       */
>      this.endcolor =
> this.element.getStyle('background-color').parseColor('#ffffff');
>
> I can avoid the error by changing that line to:
>
>      this.endcolor = '#ffffff';  // default
>      if (this.element.getStyle('background-color'))
>          this.endcolor =
> this.element.getStyle('background-color').parseColor('#ffffff');
>
>
>
>
> On Wed, Oct 31, 2012 at 5:53 PM, Bryan Lewis <jb...@gmail.com> wrote:
>
>> I wonder if it's related to this issue:
>> https://issues.apache.org/jira/browse/TAP5-707
>>
>> As of version 5.2, tapestry.js sets the background color inside a zone,
>> trying to prevent a partially faded yellow.
>>
>>
>> On Wed, Oct 31, 2012 at 3:50 PM, membersound <me...@web.de> wrote:
>>
>>> Sometimes if a t:zone is updated, I'm losing any background styling.
>>> Firebug
>>> then shows:
>>> <div id="myId" class="t-zone" style="background-image: none;
>>> background-color: rgb(255, 255, 255);">
>>>
>>> Very strange, is somebody else having this issue? Or moreover: HOW can i
>>> prevent this? What do I maybe have to override with css?
>>>
>>> Thanks
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://tapestry.1045711.n5.nabble.com/Bug-t-zone-update-loses-background-style-tp5717469.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>


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


Re: [Bug] t:zone update loses background style

Posted by Bryan Lewis <jb...@gmail.com>.
Which reminds me...  I sent a closely related question to the list two
weeks ago (which is why your question caught my eye) but for some reason it
never made it.  I'll repeat it here:

In Tapestry 5.3.6 I've created a page using the new Tree component.  The
tree is inside a zone and the page is inside an iframe to serve as the
content of a subModal window.  When the modal window is dismissed (hidden),
I see an error in Firebug:
this.element.getStyle("background-color") is null.

It points to line 1796 of tapestry.js:

    /*
     * TAP5-707: store the old background color of the element or take white
     * as a default
     */
    this.endcolor =
this.element.getStyle('background-color').parseColor('#ffffff');

I can avoid the error by changing that line to:

    this.endcolor = '#ffffff';  // default
    if (this.element.getStyle('background-color'))
        this.endcolor =
this.element.getStyle('background-color').parseColor('#ffffff');




On Wed, Oct 31, 2012 at 5:53 PM, Bryan Lewis <jb...@gmail.com> wrote:

> I wonder if it's related to this issue:
> https://issues.apache.org/jira/browse/TAP5-707
>
> As of version 5.2, tapestry.js sets the background color inside a zone,
> trying to prevent a partially faded yellow.
>
>
> On Wed, Oct 31, 2012 at 3:50 PM, membersound <me...@web.de> wrote:
>
>> Sometimes if a t:zone is updated, I'm losing any background styling.
>> Firebug
>> then shows:
>> <div id="myId" class="t-zone" style="background-image: none;
>> background-color: rgb(255, 255, 255);">
>>
>> Very strange, is somebody else having this issue? Or moreover: HOW can i
>> prevent this? What do I maybe have to override with css?
>>
>> Thanks
>>
>>
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Bug-t-zone-update-loses-background-style-tp5717469.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>

Re: [Bug] t:zone update loses background style

Posted by Bryan Lewis <jb...@gmail.com>.
I wonder if it's related to this issue:
https://issues.apache.org/jira/browse/TAP5-707

As of version 5.2, tapestry.js sets the background color inside a zone,
trying to prevent a partially faded yellow.


On Wed, Oct 31, 2012 at 3:50 PM, membersound <me...@web.de> wrote:

> Sometimes if a t:zone is updated, I'm losing any background styling.
> Firebug
> then shows:
> <div id="myId" class="t-zone" style="background-image: none;
> background-color: rgb(255, 255, 255);">
>
> Very strange, is somebody else having this issue? Or moreover: HOW can i
> prevent this? What do I maybe have to override with css?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Bug-t-zone-update-loses-background-style-tp5717469.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>