I got weird problem and I have no idea why is this happening, I got class like this:
@ManagedBean(name = "clientBean")
@SessionScoped
public class ClientBean implements Serializable {
private static final long serialVersionUID = 1L;
private ClientDao clientDao = new ClientDao();
private SearchService searchService = new SearchService();
private String tags;
private Client client = new Client();
private Order order = new Order();
and I have part of .xhtml:
<div class="form-group">
<label style="padding-top: 0px" class="col-sm-3 control-label">Tytuł zamówienia</label>
<div class="col-sm-9">
<h:inputText type="text"
value="#{clientBean.order.title}"
class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Status</label>
<div class="col-sm-9">
<h:inputText type="text" value="PRZETWARZANIE"
class="form-control" disabled="true" />
</div>
</div>
The question is... why I can't set value order.title
? There is no problem with client.name
and other fields in Client class, but when I try to set form fields with order's properties and enter this view then this exceptions appears (I got all getters and setters):
SEVERE: Error Rendering View[/clients.xhtml]
javax.el.PropertyNotFoundException: /clientRegistration.xhtml @112,67 value="#{clientBean.order.title}": Property 'order' not found on type com.firanycrm.controller.ClientBean
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
at javax.faces.component.UIOutput.getValue(UIOutput.java:174)
at javax.faces.component.UIInput.getValue(UIInput.java:291)