Re: [Wicket-user] Custom XML markup
* Igor Vaynberg: On 3/26/07, Toscano [EMAIL PROTECTED] wrote: I mean: - The combo-option is treated as a new tag attribute, not as the name of the tag. Is there any way of maintain that - there? what wicket version are you using? this might be a bug in our xml parser. please open a jira issue. Indeed it's a problem in our XML parser. But the problem is already fixed, see: XmlPullParser does not respect the XML NCName syntax https://issues.apache.org/jira/browse/WICKET-350 -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Custom XML markup
Hello, Sometime ago I was doing some tests for using Wicket with Backbase. Basically, Backbase is XML which is processed within javascript rendering some special interface controls. I need to create custom Panels, so I can get the special XML Backbase needs. For example, there is a replacement for the standard SELECT, which has the following syntax: b:combobox b:name=countryList b:name=Countries b:combo-option b:value=1England/b:combo-option b:combo-option b:value=2Spain/b:combo-option /b:combobox I made the following custom panel: public class BackBaseComboBox extends Panel { public BackBaseComboBox (String id, List options) { super(id); add ( new ListView(options, options) { // This method is called for each entry on the list @Override protected void populateItem(ListItem item) { ComboBoxCell cell = (ComboBoxCell) item.getModelObject(); item.add(new SimpleAttributeModifier(b:value,cell.getValue())); item.add(new Label(text, cell.getText())); } } ); } } And the markup file: wicket:panel b:combo-option wicket:id=optionstext/b:combo-option /wicket:panel I add it to my page, and in the html markup I write: b:combobox wicket:id=customComboBox/b:combobox But I have the following output: b:combobox b:combo b:value=1 option=Spanish/b:combo option= b:combo b:value=2 option=English/b:combo option= /b:combobox I mean: - The combo-option is treated as a new tag attribute, not as the name of the tag. Is there any way of maintain that - there? - How can I output the text between the b:combo-box without having that span tags? Also I think I'm not doing the things as they have to do... any suggestions? Thank you very very much for all your effort and help, Oskar -- View this message in context: http://www.nabble.com/Custom-XML-markup-tf3470758.html#a9685532 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Custom XML markup
On 3/26/07, Toscano [EMAIL PROTECTED] wrote: I mean: - The combo-option is treated as a new tag attribute, not as the name of the tag. Is there any way of maintain that - there? what wicket version are you using? this might be a bug in our xml parser. please open a jira issue. - How can I output the text between the b:combo-box without having that span tags? which span tags? i dont see any in your email. Also I think I'm not doing the things as they have to do... any suggestions? i dont see why you are using a listview and a component/option. do the options need to be components? it might be easier to write them out as strings like our DropDownChoice works. what you are doing works, but it is definetely high-overhead for no gain. -igor Thank you very very much for all your effort and help, Oskar -- View this message in context: http://www.nabble.com/Custom-XML-markup-tf3470758.html#a9685532 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Custom XML markup
igor.vaynberg wrote: On 3/26/07, Toscano [EMAIL PROTECTED] wrote: I mean: - The combo-option is treated as a new tag attribute, not as the name of the tag. Is there any way of maintain that - there? Thank you for your fast answer. I'm using 3_3_1. I will open the issue now. The span was between the text inside the b:combo-option tags, but it seems that when writting it, the forum treated as the HTML code it is. But I think it will be solved with the DropDownChoice String output method. Can I, please, have a quick example of how to implement the String out as DropDownChoice? I'm sorry because I'm very new to Wicket, and although I already read all the examples, I'm afraid I need some help... Again, thank you very very much. Oskar what wicket version are you using? this might be a bug in our xml parser. please open a jira issue. - How can I output the text between the b:combo-box without having that span tags? which span tags? i dont see any in your email. Also I think I'm not doing the things as they have to do... any suggestions? i dont see why you are using a listview and a component/option. do the options need to be components? it might be easier to write them out as strings like our DropDownChoice works. what you are doing works, but it is definetely high-overhead for no gain. -igor Thank you very very much for all your effort and help, Oskar -- View this message in context: http://www.nabble.com/Custom-XML-markup-tf3470758.html#a9685532 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Custom-XML-markup-tf3470758.html#a9685809 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Custom XML markup
On 3/26/07, Toscano [EMAIL PROTECTED] wrote: Thank you for your fast answer. I'm using 3_3_1. I will open the issue now. there is no wicket 3.3.1 But I think it will be solved with the DropDownChoice String output method. Can I, please, have a quick example of how to implement the String out as DropDownChoice? I'm sorry because I'm very new to Wicket, and although I already read all the examples, I'm afraid I need some help... see the source code of DropDownChoice and its hierarchy. -igor - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Custom XML markup
Oh, I'm sorry, that was the Backbase version. The wicket ones is 1.2. Thank you again. igor.vaynberg wrote: On 3/26/07, Toscano [EMAIL PROTECTED] wrote: Thank you for your fast answer. I'm using 3_3_1. I will open the issue now. there is no wicket 3.3.1 But I think it will be solved with the DropDownChoice String output method. Can I, please, have a quick example of how to implement the String out as DropDownChoice? I'm sorry because I'm very new to Wicket, and although I already read all the examples, I'm afraid I need some help... see the source code of DropDownChoice and its hierarchy. -igor - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Custom-XML-markup-tf3470758.html#a9685864 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Custom XML markup
Hello again, I'm very sorry, but I don't know how to do it, the DropDownChoice code is quite complicated for me. Does anybody can give me a small example of how to create a component which outputs the XML I want from a List of objects? I only need a small ones with the java, markup and how to include in one page. And then I will know how to implements the most complicated ones. Sorry for being so annoying... Thank you, Oskar igor.vaynberg wrote: On 3/26/07, Toscano [EMAIL PROTECTED] wrote: Thank you for your fast answer. I'm using 3_3_1. I will open the issue now. there is no wicket 3.3.1 But I think it will be solved with the DropDownChoice String output method. Can I, please, have a quick example of how to implement the String out as DropDownChoice? I'm sorry because I'm very new to Wicket, and although I already read all the examples, I'm afraid I need some help... see the source code of DropDownChoice and its hierarchy. -igor - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Custom-XML-markup-tf3470758.html#a9685972 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Custom XML markup
class mychoices extends FormComponent { protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { List choices = getChoices(); // something you implement final AppendingStringBuffer buffer = new AppendingStringBuffer(( choices.size() * 50) + 16); for (int index = 0; index choices.size(); index++) { final Object choice = choices.get(index); buffer.append(option).append(choice.tostring ()).append(/option\n); } replaceComponentTagBody(markupStream, openTag, buffer); } } select wicket:id=choices/select -igor On 3/26/07, Toscano [EMAIL PROTECTED] wrote: Hello again, I'm very sorry, but I don't know how to do it, the DropDownChoice code is quite complicated for me. Does anybody can give me a small example of how to create a component which outputs the XML I want from a List of objects? I only need a small ones with the java, markup and how to include in one page. And then I will know how to implements the most complicated ones. Sorry for being so annoying... Thank you, Oskar igor.vaynberg wrote: On 3/26/07, Toscano [EMAIL PROTECTED] wrote: Thank you for your fast answer. I'm using 3_3_1. I will open the issue now. there is no wicket 3.3.1 But I think it will be solved with the DropDownChoice String output method. Can I, please, have a quick example of how to implement the String out as DropDownChoice? I'm sorry because I'm very new to Wicket, and although I already read all the examples, I'm afraid I need some help... see the source code of DropDownChoice and its hierarchy. -igor - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Custom-XML-markup-tf3470758.html#a9685972 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Custom XML markup
It works perfect. This is what I was looking for. Did I gave thanks to you? Thank you!, Oskar igor.vaynberg wrote: class mychoices extends FormComponent { protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { List choices = getChoices(); // something you implement final AppendingStringBuffer buffer = new AppendingStringBuffer(( choices.size() * 50) + 16); for (int index = 0; index choices.size(); index++) { final Object choice = choices.get(index); buffer.append(option).append(choice.tostring ()).append(/option\n); } replaceComponentTagBody(markupStream, openTag, buffer); } } select wicket:id=choices/select -igor On 3/26/07, Toscano [EMAIL PROTECTED] wrote: Hello again, I'm very sorry, but I don't know how to do it, the DropDownChoice code is quite complicated for me. Does anybody can give me a small example of how to create a component which outputs the XML I want from a List of objects? I only need a small ones with the java, markup and how to include in one page. And then I will know how to implements the most complicated ones. Sorry for being so annoying... Thank you, Oskar igor.vaynberg wrote: On 3/26/07, Toscano [EMAIL PROTECTED] wrote: Thank you for your fast answer. I'm using 3_3_1. I will open the issue now. there is no wicket 3.3.1 But I think it will be solved with the DropDownChoice String output method. Can I, please, have a quick example of how to implement the String out as DropDownChoice? I'm sorry because I'm very new to Wicket, and although I already read all the examples, I'm afraid I need some help... see the source code of DropDownChoice and its hierarchy. -igor - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Custom-XML-markup-tf3470758.html#a9685972 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Custom-XML-markup-tf3470758.html#a9686311 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Custom XML markup
you are welcome -igor On 3/26/07, Toscano [EMAIL PROTECTED] wrote: It works perfect. This is what I was looking for. Did I gave thanks to you? Thank you!, Oskar igor.vaynberg wrote: class mychoices extends FormComponent { protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { List choices = getChoices(); // something you implement final AppendingStringBuffer buffer = new AppendingStringBuffer(( choices.size() * 50) + 16); for (int index = 0; index choices.size(); index++) { final Object choice = choices.get(index); buffer.append(option).append(choice.tostring ()).append(/option\n); } replaceComponentTagBody(markupStream, openTag, buffer); } } select wicket:id=choices/select -igor On 3/26/07, Toscano [EMAIL PROTECTED] wrote: Hello again, I'm very sorry, but I don't know how to do it, the DropDownChoice code is quite complicated for me. Does anybody can give me a small example of how to create a component which outputs the XML I want from a List of objects? I only need a small ones with the java, markup and how to include in one page. And then I will know how to implements the most complicated ones. Sorry for being so annoying... Thank you, Oskar igor.vaynberg wrote: On 3/26/07, Toscano [EMAIL PROTECTED] wrote: Thank you for your fast answer. I'm using 3_3_1. I will open the issue now. there is no wicket 3.3.1 But I think it will be solved with the DropDownChoice String output method. Can I, please, have a quick example of how to implement the String out as DropDownChoice? I'm sorry because I'm very new to Wicket, and although I already read all the examples, I'm afraid I need some help... see the source code of DropDownChoice and its hierarchy. -igor - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Custom-XML-markup-tf3470758.html#a9685972 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Custom-XML-markup-tf3470758.html#a9686311 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user