incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Kotek <>
Subject Change value of SelectOneChoice in background
Date Tue, 24 Apr 2007 15:06:25 GMT
Hello all,

I have next problem with SelectOneChoice component:

1. value is binded to backing bean and taken for example from database
2. when query page, component show correct value
3. now another process change value (in database)
4. page is reloaded (by reload button in browser), then component show 
bad, old value
5. only new query for page show correct value of component

Moreover, if page is submitted (by another component), then bad old 
value of SelectOneChoice component is saved into database.

I am using latest Trinidad 1.0.1 SNAPSHOT.

Thanks for any help,

I'm simulated this in next test. Changing value by button or 
SelectOneChoice is OK. When I change value of socTestVal in session 
backing bean in debuger (simulating backgroung value change), component 
don't reflect this change, when page is only reloading.

index.jsp test page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="" prefix="f"%>
<%@ taglib uri="" prefix="tr"%>
<%@ taglib uri="" prefix="trh"%>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>Select One Choice Test</title>
      <tr:form id="TestForm">
        <tr:selectOneChoice autoSubmit="true" label="Selection:" 
          <tr:selectItem label="One" value="1"/>
          <tr:selectItem label="Two" value="2"/>
        <tr:commandButton text="Set One" 

Session backing bean:

package test.backing;

import javax.faces.event.ActionEvent;

public class IndexBean {
  short socTestVal;
  public IndexBean() {
    socTestVal = 2;
  public Short getSocTestValue() {
    return socTestVal;
  public void setSocTestValue(Short newVal) {
    socTestVal = newVal.shortValue();

  public void ChoiceOneAction(ActionEvent actionEvent) {
     socTestVal = 1;

View raw message