You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Steve Hiller <sh...@bellsouth.net> on 2010/05/13 13:36:52 UTC
Wicket-Stuff ObjectAutoCompleteField component inside a ListView
Hi All,
Has anyone tried using the Wicket-Stuff ObjectAutoCompleteField component inside a ListView?
The search text field form input control is not created in the HTML output.
If I make a single ObjectAutoCompleteField outside of a ListView then the input control
is created.
Thanks,
Steve
Here are some snippets of code:
Java Code:
ListView<String> pois = new ListView<String>("positionsOfInterest",
myProfileFormModel.getObject().getPositionsOfInterest())
{
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<String> item) {
ObjectAutoCompleteBuilder<BrandCategoryTitle, String> builder =
new ObjectAutoCompleteBuilder<BrandCategoryTitle, String>(provider);
builder.autoCompleteRenderer(renderer);
ObjectAutoCompleteField<BrandCategoryTitle, String> poi =
builder.build("positionOfInterest", item.getModel());
poi.getSearchTextField().setRequired(true);
item.add(poi);
}
};
add(pois);
HTML code:
<div wicket:id="positionsOfInterest">
<input type="text" wicket:id="positionOfInterest" />
</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org