You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2008/10/24 04:41:44 UTC

[jira] Resolved: (WICKET-1892) FeedbackPanel can't be conditionally wrapped with background -- problem with isVisible propagation

     [ https://issues.apache.org/jira/browse/WICKET-1892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1892.
-----------------------------------

    Resolution: Won't Fix
      Assignee: Igor Vaynberg

this is not a bug, this is how the feedback panel is meant to work.

there is nothing stopping you from creating your own subclass that works the way you want

class myfeedbackpanel extends feedbackpanel {
  public boolean isvisible() {
        return anymessage();
  }
}


> FeedbackPanel can't be conditionally wrapped with background -- problem with isVisible propagation
> --------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1892
>                 URL: https://issues.apache.org/jira/browse/WICKET-1892
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-M3
>            Reporter: Brian Topping
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> Our UI person developed a UI where the feedback list was rendered on a light red background.  The idea is if there is a problem, a large red box would visually highlight the rendered list.  
> I set a breakpoint at the anonymous implementation of Component.isVisible() in the constructor for FeedbackPanel and it is correctly returning false when there are no items in the feedback list.  And if the code from WIA is used with a CSS class, we might presume:
> <div wicket:id="feedback" class="errorBackground"/>
> But this is not the component that is made invisible, it is the child (the component with id "feedbackul").  So I tried to wrap this with an enclosure using the feedbackul as a child, but I presume because of the special late-rendering nature of a feedback panel, it could not be found (chicken-egg).  
> It seems like the ideal solution is to have the feedbackul component look to it's parent and also make it invisible if it's child is invisible, or some variety of that.  For now, I am going to try subclassing FeedbackPanel and have it guess at the child to check visibility.  But that's got it's own set of ugly... it's a large constructor that needs to be duplicated since the code we care about is in the anonymous component created in the constructor (so we can't call super and then patch up the returned remains).
> Please let me know if I can provide any other information!  :-)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.