Re: FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?
Hi, the code I sent was only to give you an idea of how to use ListView. I understood by your previous mails that you already have a HashMap. On Thu, May 12, 2011 at 10:41 AM, eugenebalt wrote: > Do I also have to override getModelObject()? If so, how? > > I'm getting an error in your code on the line > HashMap messagesByCategory = getModelObject(); > > the error is that getModelObject() is undefined for the custom class. Thanks > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-with-Hierarchical-DT-DD-Definition-List-Tags-tp3515696p3517407.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 > > -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?
Do I also have to override getModelObject()? If so, how? I'm getting an error in your code on the line HashMap<String,List> messagesByCategory = getModelObject(); the error is that getModelObject() is undefined for the custom class. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-with-Hierarchical-DT-DD-Definition-List-Tags-tp3515696p3517407.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: FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?
ListView is a good component to present lists. e.g. class MyFeedbackPanel extends Panel implements IFeedback{ onInitialize(){ super.onInitialize(); HashMap messagesByCategory = getModelObject(); add(new ListView(messagesByCategory.keySet()){ populateItem(){ item.add(new Label(category)); item.add(new ListView(messagesByCategory.get(catetory)){ populateItem(){ nestedItem.add(new Label(errorMessage)); } }); } }); } } On Thu, May 12, 2011 at 10:04 AM, eugenebalt wrote: > But what is responsible for actually presenting (listing) the items? > > My Model can be a HashMap that maps a category to a list > of errors in that category. But what do I have to override to make the > feedback panel present that hierarchical list based on the HashMap? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-with-Hierarchical-DT-DD-Definition-List-Tags-tp3515696p3517279.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 > > -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?
But what is responsible for actually presenting (listing) the items? My Model can be a HashMap<String,List> that maps a category to a list of errors in that category. But what do I have to override to make the feedback panel present that hierarchical list based on the HashMap? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-with-Hierarchical-DT-DD-Definition-List-Tags-tp3515696p3517279.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: FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?
By implementing IFeedback you are just comunicating about your type goal: be a feedback. Imagine that one can visit a page adding components implementing IFeedback to an AJAX request target. About handle messages, FeedbackPanel is just presenting messages in session, take a look at FeedbackMessagesModel. On Wed, May 11, 2011 at 5:14 PM, eugenebalt wrote: > So I need to write my own class that extends Panel and implements IFeedback? > > I just looked in the IFeedback javadoc, it doesn't have any methods, it's > just a marker. So how would I handle my messages? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-with-Hierarchical-DT-DD-Definition-List-Tags-tp3515696p3515733.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 > > -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?
So I need to write my own class that extends Panel and implements IFeedback? I just looked in the IFeedback javadoc, it doesn't have any methods, it's just a marker. So how would I handle my messages? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-with-Hierarchical-DT-DD-Definition-List-Tags-tp3515696p3515733.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: FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?
FeedbackPanel is just a panel implementing IFeedback interface and presenting messages in session. You can write a completely different panel implementing IFeedback with custom presentation. It is nothing special. On Wed, May 11, 2011 at 4:59 PM, eugenebalt wrote: > I have a FeedbackPanel in my form that displays errors. > > Rather than a regular FeedbackPanel that lists items, this one is a > 2-level hierarchy which uses Definition Lists (DD/DT tags). > > Example from http://www.w3.org/TR/html401/struct/lists.html , > > > Category 1 > Item 1 > Item 2 > > > > Does the FeedbackPanel support categorized, hierarchical lists like that? > Does anything special need to be done? If there is an error, I'd have to add > it to the FeedbackPanel based on its DT category. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-with-Hierarchical-DT-DD-Definition-List-Tags-tp3515696p3515696.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 > > -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?
I have a FeedbackPanel in my form that displays errors. Rather than a regular FeedbackPanel that lists items, this one is a 2-level hierarchy which uses Definition Lists (DD/DT tags). Example from http://www.w3.org/TR/html401/struct/lists.html , Category 1 Item 1 Item 2 Does the FeedbackPanel support categorized, hierarchical lists like that? Does anything special need to be done? If there is an error, I'd have to add it to the FeedbackPanel based on its DT category. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-with-Hierarchical-DT-DD-Definition-List-Tags-tp3515696p3515696.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