This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

'select' componet in tapestry

Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know why i can not get the submitted value of the dropdown list , it always be null .The code is below :
<select jwcid="places"></select>
<property name="place"/>

<component id="places" type="PropertySelection">
<binding name="value" value="place"/>
<binding name="model" value="placeDropdownList"/>
public abstract class TestTapestry extends BasePage

public abstract void setPlace(String place);

public abstract String getPlace();

public List getList()
List<List<String>> list = new ArrayList<List<String>>();
List<String> list1 = new ArrayList<String>();
List<String> list2 = new ArrayList<String>();


return list;

public IPropertySelectionModel getPlaceDropdownList()
PlaceDropdownList places = new PlaceDropdownList();
places.placesList = this.getList();
return places;

public String submit(IRequestCycle cycle)

private class PlaceDropdownList implements IPropertySelectionModel
List placesList = null;

public String getLabel(int arg0) {
List list = (List)placesList.get(1);
return (String)list.get(arg0);

public Object getOption(int arg0) {
List list = (List)placesList.get(0);
return list.get(arg0);

public String getValue(int arg0) {
List list = (List)placesList.get(0);
return (String)list.get(arg0);

public int getOptionCount() {
return ((List)placesList.get(0)).size();

public Object translateValue(String arg0) {
return arg0;

when submit method invoked , will get null . Waiting for your help , thank you very much.
[ August 15, 2006: Message edited by: David George ]
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getPlace() should be null; I am damn sure getPlaceDropdownList()
was never called; if you want getPlace() to have value; try setting setPlace() in pageBeginRender() method; remember this method is called only if your class implements PageBeginRenderListener interface.
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!