Hi Haihua, the state saving method is defined as context-param in the web.xml:
<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> Seems i was wrong saying client is the default :-(. Regards, Volker Haihua Luo wrote: > Hi Volker, > > thank you for your reply! You are right. The hidden input field "jsf_tree_*" > cannot be found in the generated html page. But how can I switch to > server-side state saving? > > Thanks! > > Haihua > > -----Ursprüngliche Nachricht----- > Von: Volker Weber [mailto:[EMAIL PROTECTED] > Gesendet: Freitag, 3. Februar 2006 18:47 > An: MyFaces Discussion > Betreff: Re: document.getElementById("jsf_tree_64") has no properties > > Hi, > > this may be a portlet problem? I don't know mutch about portlets, but > afaik the portlet rewrites the ids to ensure they are unique. > > When using client-side state saving (which is the default) there are two > hidden input fields "jsf_tree_64" and "jsf_state_64" in which the state > is stored. > > Try server-side state saving if you can. > > Regards, > Volker > > Haihua Luo wrote: > >>Hi Lists, >> >>I want to test the simple sandbox example for inputSuggestAjax. But when >>I input sth. in the input field, an error occurs in the web page in >>firefox: document.getElementById("jsf_tree_64") has no properties. Any >>ideas or comment why it happens? >> >>I am using myfaces 1.1.1, Jboss 3.2.6 and Pluto for portlet >> >>my view.jsp is used to call the inputSuggestAjax: >> >><%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> >><%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> >><%@ taglib uri="http://myfaces.apache.org/extensions" prefix="t"%> >><%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%> >> >><f:view> >> <h:form> >> <style type="text/css"> >> .ajaxListItem {} >> .ajaxList {} >> </style> >> <h:panelGrid columns="2"> >> <h:outputText value="default suggest"/> >> <s:inputSuggestAjax >>suggestedItemsMethod="#{myInputSuggestAjax.getItems}" styleLocation="" /> >> </h:panelGrid> >> </h:form> >> >></f:view> >> >>and my bean is written in MyInputSuggestAjaxBean.java: >> >>package com.seeburger.portlet.processoverview; >> >>import java.util.List; >>import java.util.ArrayList; >> >>/** >> * @jsf.bean name = "myInputSuggestAjax" >> * scope = "request" >> * >> */ >>public class MyInputSuggestAjaxBean >>{ >> public List getItems(String prefix) >> { >> List li = new ArrayList(); >> li.add(prefix+1); >> li.add(prefix+2); >> li.add(prefix+3); >> li.add(prefix+4); >> li.add(prefix+5); >> li.add(prefix+6); >> return li; >> } >> >> >> public List getItems(String prefix, Integer maxSize) { >> >> List li = new ArrayList(); >> >> for(int i = 0; i < maxSize.intValue(); i++) { >> li.add(prefix+ " " +(i+1)); >> } >> >> return li; >> } >>} >> >>Thank you so much! >> >>Haihua >> > > -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.