Bauke Scholtz wrote:
Giannis nasdades wrote:
The bean was generated automatically by jboss tools as was geenrated the whole project. So i do not think this is the issue.
Trust me, the exception tells otherwise. I was just translating it. The bean is nowhere in the scope!
So there is either a bug in Seam or you misconfigured it. Try posting the issue at the Seam forums.
I haven't seen high experienced Seam boys walking around here before.
Bauke Scholtz wrote:
You read it wrong. It is 'motorcycleCat' which is null, not 'category'.Giannis nasdades wrote:I get the exception
javax.el.PropertyNotFoundException: /motorcycleSearchAction.xhtml @23,44 value="#{motorcycleCat.category}":
Target Unreachable, identifier 'motorcycleCat' resolved to null.
The property that becomes null is the property that should be set from the selectOneMenu.
So, this managed bean is nowhere available in the JSF scope?
I am not that familiar with Seam, but shouldn't you declare the bean as managed bean in faces-config.xml?
Bauke Scholtz wrote:Did you recompile, redeploy and restart correctly?
Bauke Scholtz wrote:As specified in the documentation, the f:selectItems expects a SelectItem[] or List<SelectItem>, not List<SomeCustomObject>.
Tim Holloway wrote:1. I don't see an <h:form> tag. JSF builds on HTML, and HTML won't submit without a form. Thus, neither will JSF.
2. The signature for a JSF Action processor MUST be:
public String xxxxxx() {
....
return "zzzzz";
}
Where "zzzz" can be whatever you want the JSF navigator to key on. It's common to return "success" for successful actions and "failure" for failed ones, but all that really matters is that you return a string.
If your signature doesn't match, the action won't fire.
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:a="http://richfaces.org/a4j"
template="layout/template.xhtml">
<ui:define name="body">
model: <h:inputText id="searchString" value="#{motorcyclesearchaction.model}"
style="width: 165px;">
<a:support event="onkeyup" action="#{motorcyclesearchaction.find}"
reRender="searchResults" />
</h:inputText>
<a:commandButton id="findMotorcycles" value="Find Motorcycles" action="#{motorcyclesearchaction.find}"
reRender="searchResults"/>
<h:commandButton action="#{motorcyclesearchaction.find}" value="Find Motorcyclesh" reRender="searchResults"/>
<a:outputPanel id="searchResults">
<div class="section">
<h:dataTable id="motorcycles" value="#{motorcycles}" var="motor"
rendered="#{motorcycles.rowCount>0}">
<h:column>
<f:facet name="make">Address</f:facet>
#{motor.make}
</h:column>
</h:dataTable>
<s:link value="More results" action="#{motorcyclesearchaction.nextPage}"
rendered="#{motorcyclesearchaction.nextPageAvailable}"/>
</div>
</a:outputPanel>
</ui:define>
</ui:composition>