Hi Mead,

I'd say that wicket is a real cool choice to accomplish this (I know what
I'm talking about as I hacked such a tool in PHP years ago in my programming
infancy ;) )

There is no general answer though. But for different question types you
could do

if (type == DROP_DOWN_QUESTION) add(new DropDownQuestionPanel("panel",
question);
else if (type == RADIO_QUESTION) add(new RadioQuestionPanel("panel",
question);
// you got the idea

you could also create the panels dynamically by giving a type such as
"com.foo.questiontype.DropDown" using reflection. This way you could create
a quite flexible solution, where you could drop in just another jar to add
new question types.

If it comes to different numbers of possibilities, RepeatingView might be a
good choice.

Best regards and good luck




Mead-2 wrote:
> 
>  Well, I wanne build a Survey-System!
> Now there're some Questions in the Survey-System, and will default some
> answer-item for user to choice!
> following is the example of Question
> 1,It's the weather good today?(A.B.C. would be radio)
>   A.yes, Sunny
>   B.no, Rainy
>   C.so so
> I think all the component shall be created at run time! but some question
> has 5 items some has 3 items,
> some is a TextField which filled by user, some is CheckBox or Radio.
> How to do with this?
> 
> Mead
> 
>  
>  
>  
> 


-----
-------
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/how-to-create-the-component-dynamic--tp15630091p15631519.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to