Hi

Firstly if you set a default value in onPrepare(), it will not only set the
value during render but also during submission, which I don't think you
intend to. A better choice will be onPrepareForRender().

Secondly, all you have to do is set the value that is bound to the select
component to a value you want to have by default. Also, as Thiago has
already pointed out, the value's class must implement equals() and
hashCode().

Sorry, but I could not understand your code in context of the problem

regards
Taha


On Tue, Jul 5, 2011 at 11:47 PM, George Christman
<gchrist...@cardaddy.com>wrote:

> Hi Taha,
>
> this is my test code.
>
>        Long key = new Long("-8879035676972742623");
>
>        for(LineItem _lineItem : getPurchaseRequest().getLineItems()) {
>            for (LineItemFunding _lineItemFunding :
> _lineItem.getLineItemFundings()) {
>                if(_lineItemFunding.getTempId() == key) {
>                    _lineItemFunding.setFunding((Funding)
> session.get(Funding.class, 6));
>                }
>
>            }
>        }
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-Selected-Attribute-tp4554181p4554217.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to