I’m quite new to JSF 2. I’m trying to render a component using Ajax depending on which checkbox the users choose. For example, check box 1, box 2, and box 3.I’m having some errors whenever I choose a checkbox.Error message:serverError: class javax.faces.component.UpdateModelException/ajaxcall.xhtml@27,54 value=”#bean.panels”: Property ‘panels’ not writable on type java….
via Java Application Development Tutorial » Search Results » ajax:
Error in JSF 2 with Ajax call to update parts based on reque
I’m quite new to JSF 2. I’m trying to render a component using Ajax depending on which checkbox the users choose. For example, check box 1, box 2, and box 3.
I’m having some errors whenever I choose a checkbox.
Error message:
serverError: class javax.faces.component.UpdateModelException/ajaxcall.xhtml@27,
54 value=”#bean.panels”: Property ‘panels’ not writable on type java.util.ListBelow is my XHTML code.
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
xmlns:f=”http://java.sun.com/jsf/core”
xmlns:ui=”http://java.sun.com/jsf/facelets”
>
panel one
panel two
panel three
This is my bean:
package somePackage;
import java.util.ArrayList;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
@ManagedBean
@RequestScoped
public class Bean
private List
public List
return panels;
}Am I missing something?
……………………………………….
The error is a bit misleading, but you need a setter as well.
public void setPanels(List
this.panels = panels;
For more info: Error in JSF 2 with Ajax call to update parts based on reque
Java Application Development Tutorial » Search Results » ajax