Re: FeedbackPanel customization
Hi Daniel, In such a case, you have to not use getCSSClass, but override newMessageDisplayComponent instead. You have a sample here: https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.java https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.html Hope this help, Sebastien. On Wed, Jul 17, 2013 at 10:54 PM, Daniel Watrous dwmaill...@gmail.comwrote: Hi, I'm working on a modification of the FeedbackPanel to work better with my theme. I would like to prevent the class for the actual message from being appended to. Right now MessageListView is a private final class and the populateItem adds an AttributeModifier to both the label and the listItem. I know I can override getCSSClass, but that still sets it for both the label and listItem. I can't extend just MessageListView since it's private and final. Even if I could subclass that, the FeedbackPanel constructor is called before my subclass of FeedbackPanel, so that it has already used the original MessageListView. Can you think of a clean way to eliminate the AttributeListener on listItem? Daniel
RE: FeedbackPanel customization
Of course you can always override them in CSS as well. /* FEEDBACK MESSAGES */ .feedbackMessages { padding-left: 0; padding-top: 0; text-align: left; margin-left: 0; margin-top: 0; padding-bottom: 1em; } .feedbackMessages div { padding: 0.5em; font-size: xx-small; border: none; } .feedbackMessages div.feedbackPanelERROR { background-color: lightsalmon; border: 1px solid darkred; } .feedbackMessages div.feedbackPanelWARNING { background-color: #FFB90F; border: 1px solid darkgoldenrod; } .feedbackMessages div.feedbackPanelINFO { background-color: lightgreen; border: 1px solid darkgreen; } ~ Thank you, Paul Bors -Original Message- From: Sebastien [mailto:seb...@gmail.com] Sent: Wednesday, July 17, 2013 5:21 PM To: users@wicket.apache.org Subject: Re: FeedbackPanel customization Hi Daniel, In such a case, you have to not use getCSSClass, but override newMessageDisplayComponent instead. You have a sample here: https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/ main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.java https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/ main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.html Hope this help, Sebastien. On Wed, Jul 17, 2013 at 10:54 PM, Daniel Watrous dwmaill...@gmail.comwrote: Hi, I'm working on a modification of the FeedbackPanel to work better with my theme. I would like to prevent the class for the actual message from being appended to. Right now MessageListView is a private final class and the populateItem adds an AttributeModifier to both the label and the listItem. I know I can override getCSSClass, but that still sets it for both the label and listItem. I can't extend just MessageListView since it's private and final. Even if I could subclass that, the FeedbackPanel constructor is called before my subclass of FeedbackPanel, so that it has already used the original MessageListView. Can you think of a clean way to eliminate the AttributeListener on listItem? Daniel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FeedbackPanel customization
Hi,the fix for the issue you face with Css classes has been integrated into Wicket 7.0 (https://issues.apache.org/jira/browse/WICKET-4852).Regards, On 17 juillet 2013 at 22:54:37, Daniel Watrous (dwmaill...@gmail.com) wrote: Hi, I'm working on a modification of the FeedbackPanel to work better with my theme. I would like to prevent the class for the actual message from being appended to. Right now MessageListView is a private final class and the populateItem adds an AttributeModifier to both the label and the listItem. I know I can override getCSSClass, but that still sets it for both the label and listItem. I can't extend just MessageListView since it's private and final. Even if I could subclass that, the FeedbackPanel constructor is called before my subclass of FeedbackPanel, so that it has already used the original MessageListView. Can you think of a clean way to eliminate the AttributeListener on listItem? Daniel __Cedric Gatay (@Cedric_Gatay)http://code-troopers.com|http://www.bloggure.info|http://cedric.gatay.fr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FeedbackPanel customization
Hi Sebastian, I looked at your example, but it's not quite what I need. I want the style applied to 'messages' but not to 'message'. Your example seems to allow for a style to be applied to 'message' and not to 'messages' I've tried implementing it, but that's where I'm stuck. Am I missing something? Daniel On Wed, Jul 17, 2013 at 3:20 PM, Sebastien seb...@gmail.com wrote: Hi Daniel, In such a case, you have to not use getCSSClass, but override newMessageDisplayComponent instead. You have a sample here: https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.java https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.html Hope this help, Sebastien. On Wed, Jul 17, 2013 at 10:54 PM, Daniel Watrous dwmaill...@gmail.com wrote: Hi, I'm working on a modification of the FeedbackPanel to work better with my theme. I would like to prevent the class for the actual message from being appended to. Right now MessageListView is a private final class and the populateItem adds an AttributeModifier to both the label and the listItem. I know I can override getCSSClass, but that still sets it for both the label and listItem. I can't extend just MessageListView since it's private and final. Even if I could subclass that, the FeedbackPanel constructor is called before my subclass of FeedbackPanel, so that it has already used the original MessageListView. Can you think of a clean way to eliminate the AttributeListener on listItem? Daniel
Re: FeedbackPanel customization
This is what I ended up doing. Hopefully, as Cedric points out, it will be more flexible in Wicket 7 and I can come back and clean it up. Thanks. On Wed, Jul 17, 2013 at 3:23 PM, Paul Bors p...@bors.ws wrote: Of course you can always override them in CSS as well. /* FEEDBACK MESSAGES */ .feedbackMessages { padding-left: 0; padding-top: 0; text-align: left; margin-left: 0; margin-top: 0; padding-bottom: 1em; } .feedbackMessages div { padding: 0.5em; font-size: xx-small; border: none; } .feedbackMessages div.feedbackPanelERROR { background-color: lightsalmon; border: 1px solid darkred; } .feedbackMessages div.feedbackPanelWARNING { background-color: #FFB90F; border: 1px solid darkgoldenrod; } .feedbackMessages div.feedbackPanelINFO { background-color: lightgreen; border: 1px solid darkgreen; } ~ Thank you, Paul Bors -Original Message- From: Sebastien [mailto:seb...@gmail.com] Sent: Wednesday, July 17, 2013 5:21 PM To: users@wicket.apache.org Subject: Re: FeedbackPanel customization Hi Daniel, In such a case, you have to not use getCSSClass, but override newMessageDisplayComponent instead. You have a sample here: https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/ main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.java https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/ main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.html Hope this help, Sebastien. On Wed, Jul 17, 2013 at 10:54 PM, Daniel Watrous dwmaill...@gmail.comwrote: Hi, I'm working on a modification of the FeedbackPanel to work better with my theme. I would like to prevent the class for the actual message from being appended to. Right now MessageListView is a private final class and the populateItem adds an AttributeModifier to both the label and the listItem. I know I can override getCSSClass, but that still sets it for both the label and listItem. I can't extend just MessageListView since it's private and final. Even if I could subclass that, the FeedbackPanel constructor is called before my subclass of FeedbackPanel, so that it has already used the original MessageListView. Can you think of a clean way to eliminate the AttributeListener on listItem? Daniel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org