hrbaer wrote:
> 
> In a fit of despair I tried to replace my ListView component with a
> RepeatingView component to access either my "ListFragen" or
> "Frage"/"Input" - unfortunatelly without success :(
> 

If you use a RepeatingView you can add any Component to it (I think) so
erzeugeEingabeFeld(..) could then create the appropriate component.

Alternatively you could create a panel for each possible component and let
erzeugeEingabeFeld(..) return one of those panels (CheckboxPanel,
TextInputPanel, etc). This is an approach we followed ourselves. Initially a
lot of work, I know...



> I'm still wondering why I can't get the RepeatingView/ListView within the
> onSubmit method!? This component is defined the same way as e.g. the
> Textfield "Vorname". But once I use getModelObject() within the onSubmit
> method I only see "Vorname", "Nachname" and "Email"?!
> 

Why do you want to have access to that component? You have access to your
katalog.getFragen() don't you? And that is where the entered data should be
landed after the user pressed Submit. That is, if you use your components
with the appropriate Models of course. PropertyModel is still your friend in
my opinion.

Instead of:
String htmlCodeInputfield = erzeugeEingabefeld( q );
you get something like:

FormComponent inputField = erzeugeEingabefeld(wicketId, q);
item.add(inputField);

private FormComponent erzeugeEingabefeld(id, Question q) {
  if (inputFieldNeeded()) {
     return new TextField(id, new PropertyModel(q, "input"));
  }

  if (checkboxNeede()) {
    return new Checkbox(id, new PropertyModel(q, "flag"));
  }

  ... etc
}


-----
-- 

Regards,

Hans


http://www.cantaa.de http://cantaa.de 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-access-component-values-within-a-dynamic-table-tp3310939p3312281.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

Reply via email to