If you need the components:
final List<FormComponent> yourViewFormComponents = new
ArrayList<FormComponent>();
final Iterator<WebMarkupContainer> items = yourView.iterator();
if (items != null) {
while (items.hasNext()) {
items.next().visitChildren(new Component.IVisitor() {
public final Object component(final Component
component) {
if (component instanceof FormComponent)
{
yourViewFormComponents.add((FormComponent) component);
}
return CONTINUE_TRAVERSAL;
}
});
}
}
If you only need the model objects:
final List<YourModelObject> yourViewModelObjects = new
ArrayList<YourModelObject>();
final Iterator<WebMarkupContainer> items = yourView.iterator();
if (items != null) {
while (items.hasNext()) {
yourViewModelObjects.add((YourModelObject)
items.next().getModelObject());
}
}
-----Original Message-----
From: Bertrand DATAS [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2008 10:25 AM
To: [email protected]
Subject: Re: Contextual autoCompleteTextField
yes i could do like that but my field are generated in a listview so how
can I retrieve them ??
2008/6/25 Hoover, William <[EMAIL PROTECTED]>:
> What is stopping you from using the models from the other fields when
> constructing your list?
>
> -----Original Message-----
> From: Bertrand DATAS [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 25, 2008 8:05 AM
> To: [email protected]
> Subject: Re: Contextual autoCompleteTextField
>
> Not really because i dont want to use the onselect of this component
> but to use the content of two other fields to construct the list that
> will be displayed in my AutoCompleteTextField.
>
> 2008/6/25 Hoover, William <[EMAIL PROTECTED]>:
>
> > Are you referring to something like
> > http://issues.apache.org/jira/browse/WICKET-488?
> >
> > -----Original Message-----
> > From: Bertrand DATAS [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, June 25, 2008 4:21 AM
> > To: [email protected]
> > Subject: Contextual autoCompleteTextField
> >
> > Hello everybody,
> >
> > Do you know if there is a way to make contextual the list of
> > autocompletTextfield that is to say to make it relative to other
> > fields that are in the form ?
> > Actually i have two Fields, Town and ZipCode and when there are
> > filled, my autoCompleteTextField must display the list of the
> > streets available for this Town and ZipCode.
> >
> > Do you have any trick for making this ??
> >
> > Thanks
> >
> > Bertrand Datas
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]