You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sa...@women-at-work.org on 2005/01/02 19:01:17 UTC

@PropertySelection, pre-setting and caching problems

Hello everyone!

Still struggeling with the @PropertySelection, it seems like the problems
were also independent of each other.

What is already working
~~~~~~~~~~~~~~~~~~~~~~~

When a value is selected, with submitOnChange enabled, the correct value is
stored in the database. 

What is not working
~~~~~~~~~~~~~~~~~~~

The value that is set within pageBeginRender() is not pre-selected.
It will always start with the first value, not the one it is supposed to be.

public abstract void setColourItem(Item item);
public abstract Item getColourItem();
	

public void formSubmit (IRequestCycle
cycle){
PersistenceService.saveColour(this.getColourItem(),this.getMember().getUid());
}

public void pageBeginRender(PageEvent event) {
Item temp = PersistenceService.getColourItem(this.getMember().getColour();
this.setColourItem(temp);
}

I put another Insert component into the page to show the current id of the
selected item that is also stored in the database. It always displays the
same value unless I reload the web application using the tomcat tool. then
the new value is shown within the Insert component....but then it stays the
same unless tomcat is restarted again.


Independent of that the value that is set within pageBeginRender is never
shown at the beginning. I even tried to create a dummy item (e.g. for colour
black)..but even then it is not initialized with that.

Any ideas? 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org