You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by popajce <po...@hotmail.com> on 2007/10/10 18:26:44 UTC

inputSuggestAjax problem

hi,
I am using:

tomahawk-sandbox-1.1.7-SNAPSHOT
myfaces-core-1.1.5
tomahawk-1.1.5

I am trying to use inputSuggestAjax, but unfortunately it doesn't work, here
is my jsp page:
<f:view>
	<h:form>
		<t:dojoInitializer bindEncoding="utf-8"/>
		<s:inputSuggestAjax
suggestedItemsMethod="#{inputSuggestMSBR.getListOfMSBRs}" 
			value="#{inputSuggestMSBR.msbr}" autoComplete="false" />
			<h:commandButton/>
			
	</h:form>
</f:view>


I don't get any errors, but in a browser no suggestions are shown. Also
state saving method is set to server, i tried with client, but it still
doesn't work. Does anybody can help me. 

Thanks.
-- 
View this message in context: http://www.nabble.com/inputSuggestAjax-problem-tf4601905.html#a13139326
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: inputSuggestAjax problem

Posted by popajce <po...@hotmail.com>.
getListOfMSBRs is method, I downloaded examples of Sandbox from cvn of
myfaces, deployed them on tomcat and example of inputSuggestajax works, but
when I try to create my own, that has same settings as example, except
setting some variables in web.xml (I don't set them becouse their default
values are allready set) my example doesn't work. 

Why the signature of method can be a problem.

Best regards,
Djordje.



Hi,

what is the signature of the suggestedItemsMethod?

Did you have a look at:

http://example.irian.at/example-sandbox-20071012/inputSuggestAjax.jsf

The daily build works, so the component should not have a bug.

cheers,

Gerald

-- 
View this message in context: http://www.nabble.com/inputSuggestAjax-problem-tf4601905.html#a13212222
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: inputSuggestAjax problem

Posted by Gerald Müllan <ge...@gmail.com>.
Hi,

what is the signature of the suggestedItemsMethod?

Did you have a look at:

http://example.irian.at/example-sandbox-20071012/inputSuggestAjax.jsf

The daily build works, so the component should not have a bug.

cheers,

Gerald

On 10/11/07, popajce <po...@hotmail.com> wrote:
>
> I tried that but unfortunately it doesn't work.
> maybe I missed something in web.xml or faces-config.xml so here they are:
>
> web.xml>>>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_ID" version="2.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>         <display-name>Eskont Menica</display-name>
>
>         <listener>
>                 <listener-class>
>                         org.springframework.web.context.ContextLoaderListener
>                 </listener-class>
>         </listener>
>         <context-param>
>                 <param-name>contextConfigLocation</param-name>
>                 <param-value>/WEB-INF/spring.xml</param-value>
>         </context-param>
>         <listener>
>                 <listener-class>
>                         org.apache.myfaces.webapp.StartupServletContextListener
>                 </listener-class>
>         </listener>
>         <servlet>
>                 <servlet-name>Faces Servlet</servlet-name>
>                 <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>                 <load-on-startup>1</load-on-startup>
>         </servlet>
>         <context-param>
>                 <param-name>javax.faces.CONFIG_FILES</param-name>
>                 <param-value>/WEB-INF/faces-config-main.xml,
> /WEB-INF/faces-config-input.xml</param-value>
>
>         </context-param>
>         <servlet-mapping>
>                 <servlet-name>Faces Servlet</servlet-name>
>                 <url-pattern>*.faces</url-pattern>
>         </servlet-mapping>
>
>         <filter>
>                 <filter-name>MyFacesExtensionsFilter</filter-name>
>                 <filter-class>
>                         org.apache.myfaces.webapp.filter.ExtensionsFilter
>                 </filter-class>
>                   <init-param>
>       <description>Set the size limit for uploaded files.
>                 Format: 10 - 10 bytes
>                         10k - 10 KB
>                         10m - 10 MB
>                         1g - 1 GB</description>
>       <param-name>uploadMaxFileSize</param-name>
>       <param-value>100m</param-value>
>     </init-param>
>     <init-param>
>       <description>Set the threshold size - files
>                     below this limit are stored in memory, files above
>                     this limit are stored on disk.
>
>                 Format: 10 - 10 bytes
>                         10k - 10 KB
>                         10m - 10 MB
>                         1g - 1 GB</description>
>       <param-name>uploadThresholdSize</param-name>
>       <param-value>100k</param-value>
>     </init-param>
>         </filter>
>
>
>         <filter-mapping>
>                 <filter-name>MyFacesExtensionsFilter</filter-name>
>                 <servlet-name>Faces Servlet</servlet-name>
>         </filter-mapping>
>
>         <filter-mapping>
>         <filter-name>MyFacesExtensionsFilter</filter-name>
>                 <url-pattern>/faces/*</url-pattern>
>         </filter-mapping>
>          <context-param>
>         <description>
>             State saving method: "client" or "server" (= default)
>             See JSF Specification 2.5.2
>         </description>
>         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>         <param-value>server</param-value>
>     </context-param>
>
> </web-app>
>
>
> ====================
> and faces-config.xml
>
> <faces-config>
>         <managed-bean>
>                 <managed-bean-name>inputSuggestMSBR</managed-bean-name>
>                 <managed-bean-class>
>                         com.mesk.controllers.ajax.InputSuggestMSBR
>                 </managed-bean-class>
>                 <managed-bean-scope>request</managed-bean-scope>
>         </managed-bean>
>
>
>
>
> alvaro tovar wrote:
> >
> > i ha ve a problem, with this i comment this line and was resolved, in
> > faces-config.xml
> >
> > <!--  <variable-resolver>
> > org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
> > -->
> >
> > On 10/10/07, popajce <po...@hotmail.com> wrote:
> >>
> >>
> >> hi,
> >> I am using:
> >>
> >> tomahawk-sandbox-1.1.7-SNAPSHOT
> >> myfaces-core-1.1.5
> >> tomahawk-1.1.5
> >>
> >> I am trying to use inputSuggestAjax, but unfortunately it doesn't work,
> >> here
> >> is my jsp page:
> >> <f:view>
> >>         <h:form>
> >>                 <t:dojoInitializer bindEncoding="utf-8"/>
> >>                 <s:inputSuggestAjax
> >> suggestedItemsMethod="#{inputSuggestMSBR.getListOfMSBRs}"
> >>                         value="#{inputSuggestMSBR.msbr}"
> >> autoComplete="false" />
> >>                         <h:commandButton/>
> >>
> >>         </h:form>
> >> </f:view>
> >>
> >>
> >> I don't get any errors, but in a browser no suggestions are shown. Also
> >> state saving method is set to server, i tried with client, but it still
> >> doesn't work. Does anybody can help me.
> >>
> >> Thanks.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/inputSuggestAjax-problem-tf4601905.html#a13139326
> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/inputSuggestAjax-problem-tf4601905.html#a13159733
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: inputSuggestAjax problem

Posted by popajce <po...@hotmail.com>.
I tried that but unfortunately it doesn't work. 
maybe I missed something in web.xml or faces-config.xml so here they are:

web.xml>>>
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	<display-name>Eskont Menica</display-name>
	
	<listener>
		<listener-class>
			org.springframework.web.context.ContextLoaderListener
		</listener-class>
	</listener>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/spring.xml</param-value>
	</context-param>
	<listener>
		<listener-class>
			org.apache.myfaces.webapp.StartupServletContextListener
		</listener-class>
	</listener>
	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<context-param>
		<param-name>javax.faces.CONFIG_FILES</param-name>
		<param-value>/WEB-INF/faces-config-main.xml,
/WEB-INF/faces-config-input.xml</param-value>
		
	</context-param>
	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.faces</url-pattern>
	</servlet-mapping>
	
	<filter>
		<filter-name>MyFacesExtensionsFilter</filter-name>
		<filter-class>
			org.apache.myfaces.webapp.filter.ExtensionsFilter
		</filter-class>
		  <init-param>
      <description>Set the size limit for uploaded files.
                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB</description>
      <param-name>uploadMaxFileSize</param-name>
      <param-value>100m</param-value>
    </init-param>
    <init-param>
      <description>Set the threshold size - files
                    below this limit are stored in memory, files above
                    this limit are stored on disk.

                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB</description>
      <param-name>uploadThresholdSize</param-name>
      <param-value>100k</param-value>
    </init-param>
	</filter>

	
	<filter-mapping>
		<filter-name>MyFacesExtensionsFilter</filter-name>
		<servlet-name>Faces Servlet</servlet-name>
	</filter-mapping>
	
	<filter-mapping>
    	<filter-name>MyFacesExtensionsFilter</filter-name>
   	 	<url-pattern>/faces/*</url-pattern>
	</filter-mapping>
	 <context-param>
        <description>
            State saving method: "client" or "server" (= default)
            See JSF Specification 2.5.2
        </description>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>

</web-app>


====================
and faces-config.xml

<faces-config>
	<managed-bean>
		<managed-bean-name>inputSuggestMSBR</managed-bean-name>
		<managed-bean-class>
			com.mesk.controllers.ajax.InputSuggestMSBR
		</managed-bean-class>
		<managed-bean-scope>request</managed-bean-scope>
	</managed-bean>




alvaro tovar wrote:
> 
> i ha ve a problem, with this i comment this line and was resolved, in
> faces-config.xml
> 
> <!--  <variable-resolver>
> org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
> -->
> 
> On 10/10/07, popajce <po...@hotmail.com> wrote:
>>
>>
>> hi,
>> I am using:
>>
>> tomahawk-sandbox-1.1.7-SNAPSHOT
>> myfaces-core-1.1.5
>> tomahawk-1.1.5
>>
>> I am trying to use inputSuggestAjax, but unfortunately it doesn't work,
>> here
>> is my jsp page:
>> <f:view>
>>         <h:form>
>>                 <t:dojoInitializer bindEncoding="utf-8"/>
>>                 <s:inputSuggestAjax
>> suggestedItemsMethod="#{inputSuggestMSBR.getListOfMSBRs}"
>>                         value="#{inputSuggestMSBR.msbr}"
>> autoComplete="false" />
>>                         <h:commandButton/>
>>
>>         </h:form>
>> </f:view>
>>
>>
>> I don't get any errors, but in a browser no suggestions are shown. Also
>> state saving method is set to server, i tried with client, but it still
>> doesn't work. Does anybody can help me.
>>
>> Thanks.
>> --
>> View this message in context:
>> http://www.nabble.com/inputSuggestAjax-problem-tf4601905.html#a13139326
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/inputSuggestAjax-problem-tf4601905.html#a13159733
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: inputSuggestAjax problem

Posted by alvaro tovar <al...@gmail.com>.
i ha ve a problem, with this i comment this line and was resolved, in
faces-config.xml

<!--  <variable-resolver>
org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
-->

On 10/10/07, popajce <po...@hotmail.com> wrote:
>
>
> hi,
> I am using:
>
> tomahawk-sandbox-1.1.7-SNAPSHOT
> myfaces-core-1.1.5
> tomahawk-1.1.5
>
> I am trying to use inputSuggestAjax, but unfortunately it doesn't work,
> here
> is my jsp page:
> <f:view>
>         <h:form>
>                 <t:dojoInitializer bindEncoding="utf-8"/>
>                 <s:inputSuggestAjax
> suggestedItemsMethod="#{inputSuggestMSBR.getListOfMSBRs}"
>                         value="#{inputSuggestMSBR.msbr}"
> autoComplete="false" />
>                         <h:commandButton/>
>
>         </h:form>
> </f:view>
>
>
> I don't get any errors, but in a browser no suggestions are shown. Also
> state saving method is set to server, i tried with client, but it still
> doesn't work. Does anybody can help me.
>
> Thanks.
> --
> View this message in context:
> http://www.nabble.com/inputSuggestAjax-problem-tf4601905.html#a13139326
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>