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.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> 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.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
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.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user