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="1">England</b:combo-option>
<b:combo-option b:value="2">Spain</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="options">text</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.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user