Problem with ValueChange in dropdown
I'm having a problem with a valuechange for a dropdown I hope someone can help me solve.
I have a single page app used to track golfs scores and handicaps with the data stored in a MYSQL db. The user comes into the page, selects their name from a drop down list ( populated with a query to the GOLFERS table) and is then shown, in a table I named golfrounds_tb,their golf rounds with the course name, the tee, their raw and adjusted scores, plus the rating and slope of the course. The table is populated with a query to the GOLF_ROUNDS, COURSES and GOLFERS tables. As well, in a separate text field, their handicap is displayed.
The dropdown valuechange works fine to change the player data in the table but the only handicap ever shown is the very first one from the page prerender.
There are also other fields on the page which allows the user to add new rounds they've played. They can then press the 'Refresh Handicap' button to have their handicap recalculated, saved to the database and displayed in the Handicap text field. This also works fine
It's the drop down value change that I just can't seem to get to display the handicap of the golfers on subsequent changes to the drop down. The 'GOLFERS" table holds the handicap as well as the Golfer's name and GOLFERID. I've tried binding the HANDICAP text field to the same dataprovider that supplies the drop down. I've tried creating a separate query to the GOLFERS table using the golferid as the parameter. I've tried changing the text field to a static field and then tried both methods to populate the field on a dropdown change.
Here's the dropdown's valuechange.
public void golfers_dd_processValueChange(ValueChangeEvent event) {
try {
getSessionBean1().getGolf_roundsRowSet().setObject(
1, golfers_dd.getSelected());
getSessionBean1().getHandicapRowSet().setObject(
1, golfers_dd.getSelected());
golfersDataProvider.refresh();
golf_roundsDataProvider.refresh();
handicapDataProvider.refresh();
} catch (Exception e) {
error("Cannot switch to golfer " +
golfersDataProvider.getValue("GOLFERS.GOLFER_ID"));
log("Cannot switch to golfer " +
golfersDataProvider.getValue("GOLFERS.GOLFER_ID"), e);
}
}
the dropdown onchange is
common_timeoutSubmitForm(this.form, 'golfer_lp:golfers_dd');
I do have 2 layout panels but the handicap field is in the same one as the dropdown. The golfrounds table is not in a panel. But I've also tried removing the panel to no success.
What am I doing wrong?

