setting the value of a textfield inside dataTable

Hi All

I have a dataTable which contains one textField and a commandLink in each row.When the commandLink is clicked a popup containing list of values is opened.When the user selects a value from that popup I have to set it to the adjacent textfield.

This behaviour is working fine outside the table.What am doing is finding the adjacent textfield by client id and calling

textField..getValueBinding("value").setValue(context,value)

But inside the table the following exception is thrown.

Caused by: javax.faces.el.PropertyNotFoundException: Base is null: mem

at org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBindingImpl.java:463)

at org.apache.myfaces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:251)

at ....

Whats the ideal way to tackle this issue ?

Please Advice.

Thanks

Balu

[895 byte] By [technocrata] at [2007-11-27 9:51:46]
# 1

Look like that you're using a request scoped bean and that the data list is null during the invocation. Put the managed bean in session scope and see if it will fix the problem. If it will, and you want to keep the bean in request scope, then you may need to rearrange your data loading logic so that the data list is available during all phases.

BalusCa at 2007-7-13 0:20:57 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Thanks for your reply...

My bean is in session scope.But the issue is , when i call the inputField.getValueBinding("value") for a component inside table, the binding obtained is that of the request scope variable var.

When i calls the valueBinnding.setValue(context,"value") this attribute is not available.

i think my approach is not correct...

Please advice

Thanks

Balu

technocrata at 2007-7-13 0:20:57 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...