This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

setter method not working  RSS feed

Max Ji
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have a JSP with a value binding expression that binds the value of a selectOneListbox to a backing bean attribute. But the setter method in the bean is apparently never called, so when the selectOneListBox value is changed, the value of the attribute does not change with it. The page and bean are long, but below is part of the code. It works in WebLogic but not in Tomcat 5.5. Thanks for any assistance.


<h:form id="me" >

<h:panelGrid cellpadding="0" columns="5">
<hutputText styleClass="updatelabels" value="3. Select the Type of Document (select one):"/>
<h:selectOneListbox id="iType" value="#{item.itemType}" size="2"
onchange="findEndDate(this);" >
<f:selectItems value="#{itemVals.itemTypes}" />



<jsp:include flush="true" page="/js/update.js"></jsp:include>


package com.sdts.Report;

import java.util.ArrayList;
import java.sql.*;
import javax.naming.*;
import javax.swing.JOptionPane;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.component.html.HtmlInputText;
import javax.faces.component.html.HtmlOutputText;
import javax.faces.component.html.HtmlSelectManyListbox;
import javax.faces.component.html.HtmlSelectOneListbox;
import javax.faces.context.FacesContext;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;

public class Item
/* attributes of items */
private String itemType = "Contract"; // the type of item (contract or PO)

public String getItemType() {
return itemType;

public void setItemType(String itemType) {
this.itemType = itemType;


With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!