-
1. Re: Reqest error, status : 500 Internal Server Error Message
sergeysmirnov Apr 24, 2007 12:03 PM (in response to aviking)Take a look at server log. It should be exception there.
-
2. Re: Reqest error, status : 500 Internal Server Error Message
aviking Apr 25, 2007 10:08 AM (in response to aviking)That is the real error:
25 apr 2007 17:00:40,718 [ERROR] {RendererUtils.java:264, getStringValue} Property not found - called by component : {Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /mwCustomerResearch.jsp][Class: javax.faces.component.html.HtmlForm,Id: customerResearch][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id0][Class: org.richfaces.component.html.HtmlSuggestionBox,Id: _id1][Class: javax.faces.component.UIColumn,Id: _id2][Class: javax.faces.component.html.HtmlOutputText,Id: _id3]}
25 apr 2007 17:00:41,468 [ERROR] {StandardWrapperValve.java:253, invoke} Servlet.service() for servlet Faces Servlet threw exception
javax.faces.el.PropertyNotFoundException: Bean: java.lang.String, property: text
at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:445)
at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:416)
...
BUT WHY???!!! -
3. Re: Reqest error, status : 500 Internal Server Error Message
aviking Apr 25, 2007 10:14 AM (in response to aviking)Sorry in this moment the suggust is look like that:
<f:view>
<h:form id="customerResearch">
<h:panelGrid columns="3" border="1" style="border: 1px solid black;">
<h:inputText value="#{customerResearch.country}" id="suggest"/>
<rich:suggestionbox for="suggest"
width="100"
height="100"
suggestionAction="#{customerResearchBK.autocomplete}"
var="suggest">
<h:column>
<h:outputText value="#{suggest.text}"/>
</h:column>
</rich:suggestionbox>
</h:panelGrid>
</h:form>
</f:view>
WIDTH:
public class CustomerResearchBkBean extends BaseHibernateDAO{
public List autocomplete(Object event) {
String pref = event.toString();
//collecting some data that begins with "pref" letters.
List result = findAllCountries(pref);
return result;
}
public List findAllCountries(String pref) {
Query queryObject= null;
try {
String queryString = "select country_name from countries where country_name like '"+pref+"%'";
queryObject = getSession().createSQLQuery(queryString);
} catch (RuntimeException re) {
throw re;
}
return queryObject.list();
}
}
AND
public class CustomerResearchBean {
private String country;
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
}
WEB.XML
...
<context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
<servlet-name>Faces Servlet</servlet-name>
REQUEST
FORWARD
INCLUDE
</filter-mapping>
...