Re: Issues with multiple FeedbackPanels
Note sure what may be wrong unless you show more code. Some guesses: 1. You are refreshing the feedback panels in the ajax request target? I.e. in your ajax link's on click: void onClick(AjaxRequestTarget target) { ... do stuff, add message target.add(feedback1, feedback2); } 2. Neither of your feedback message filters accepts message 2584. On Thu, Mar 26, 2015 at 3:23 PM, avchavan wrote: > Thsnk. That worked. > Now have a different problem. > I have an AjaxLink on its click based on some conditioned i have to show > same message using feedbackMessage. > > if(session.getMyList().size() == 0){ > > myListView.getFeedbackMessages().clear(); > > myListView.info(funcMeldingen.getMessage(2584)); > } > > I am doing this in my code but the message doesnt show up on the screen. > call goes inside the if condition. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Issues-with-multiple-FeedbackPanels-tp4670087p4670104.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Issues with multiple FeedbackPanels
Thsnk. That worked. Now have a different problem. I have an AjaxLink on its click based on some conditioned i have to show same message using feedbackMessage. if(session.getMyList().size() == 0){ myListView.getFeedbackMessages().clear(); myListView.info(funcMeldingen.getMessage(2584)); } I am doing this in my code but the message doesnt show up on the screen. call goes inside the if condition. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Issues-with-multiple-FeedbackPanels-tp4670087p4670104.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Issues with multiple FeedbackPanels
Hi, Feedback panels show all messages by default. You will need to provide a way for them to filter the messages that each should show. Look at FeedbackPanel#setFilter(IFeedbackMessageFilter). Marios On Wed, Mar 25, 2015 at 2:46 PM, avchavan wrote: > Hi, I have 2 FeedbackPanels on my screen and whenever i try to set error it > gets added to both the FeedbackPanels. > > final FeedbackPanel panel1 = new FeedbackPanel("panel1"); > final FeedbackPanel panel2 = new FeedbackPanel("panel2"); > //vdp & gdp are some dataproviders i have > if (vdp.hasError()){ > toonMeer.setVisible(false); > > > vertegenwoordigdeMelding.error(this.funcMeldingen.getMessage(vdp.getErrorcode())); > vertegenwoordigdeMelding.add(new > AttributeModifier("style", > "color:red")); > vertegenwoordigdeMelding.setVisible(true); > }else if((int)vdp.size() == 0){ > vertegenwoordigdeMelding.info("U bent door niemand > vertegenwoordigde"); > vertegenwoordigdeMelding.add(new > AttributeModifier("style", "")); > vertegenwoordigdeMelding.setVisible(true); > } > > if (gdp.hasError()){ > toonMeer2.setVisible(false); > > > gemachtigdeMelding.error(this.funcMeldingen.getMessage(gdp.getErrorcode())); > gemachtigdeMelding.add(new > AttributeModifier("style", "color:red")); > gemachtigdeMelding.setVisible(true); > }else if((int)gdp.size() == 0){ > gemachtigdeMelding.info("U bent door niemand > gemachtigd"); > gemachtigdeMelding.add(new > AttributeModifier("style", "")); > gemachtigdeMelding.setVisible(true); > } > > I have a listView as well which sets the error in certain scenarios: > if(this.panel.equalsIgnoreCase("panel1")){ > this.getParent().getParent().get("panel1").error("some message"); > this.getParent().getParent().get("panel1").setVisible(true); > }else{ > this.getParent().getParent().get("panel2").error("some message"); > this.getParent().getParent().get("panel2").setVisible(true); > } > The code works but the messages are displayed in both the FeedbackPanels. > > Could you please guide me in right direction? > Thanks. > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Issues-with-multiple-FeedbackPanels-tp4670087.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Issues with multiple FeedbackPanels
Hi, I have 2 FeedbackPanels on my screen and whenever i try to set error it gets added to both the FeedbackPanels. final FeedbackPanel panel1 = new FeedbackPanel("panel1"); final FeedbackPanel panel2 = new FeedbackPanel("panel2"); //vdp & gdp are some dataproviders i have if (vdp.hasError()){ toonMeer.setVisible(false); vertegenwoordigdeMelding.error(this.funcMeldingen.getMessage(vdp.getErrorcode())); vertegenwoordigdeMelding.add(new AttributeModifier("style", "color:red")); vertegenwoordigdeMelding.setVisible(true); }else if((int)vdp.size() == 0){ vertegenwoordigdeMelding.info("U bent door niemand vertegenwoordigde"); vertegenwoordigdeMelding.add(new AttributeModifier("style", "")); vertegenwoordigdeMelding.setVisible(true); } if (gdp.hasError()){ toonMeer2.setVisible(false); gemachtigdeMelding.error(this.funcMeldingen.getMessage(gdp.getErrorcode())); gemachtigdeMelding.add(new AttributeModifier("style", "color:red")); gemachtigdeMelding.setVisible(true); }else if((int)gdp.size() == 0){ gemachtigdeMelding.info("U bent door niemand gemachtigd"); gemachtigdeMelding.add(new AttributeModifier("style", "")); gemachtigdeMelding.setVisible(true); } I have a listView as well which sets the error in certain scenarios: if(this.panel.equalsIgnoreCase("panel1")){ this.getParent().getParent().get("panel1").error("some message"); this.getParent().getParent().get("panel1").setVisible(true); }else{ this.getParent().getParent().get("panel2").error("some message"); this.getParent().getParent().get("panel2").setVisible(true); } The code works but the messages are displayed in both the FeedbackPanels. Could you please guide me in right direction? Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Issues-with-multiple-FeedbackPanels-tp4670087.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org