-
1. Re: FacesContext
newbie007 Jul 20, 2006 9:41 AM (in response to viegas)Did you modify web.xml of the webapp?
Make sure you have following lines in the web.xml:
<!-- MyFaces JSF -->
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
Another question is: In the beginning you said "Im using beans" and at the end you said "I am not using beans". What does that mean?
Are you using default webapp or you changed the implementation?
Thanks. -
2. Re: FacesContext
viegas Jul 20, 2006 9:49 AM (in response to viegas)Im am using the beans source, but I changed the webapp, Im using standart jsp. I have the classes included in the classpath and I use then in the servlet and java code
thanks -
3. Re: FacesContext
viegas Jul 20, 2006 9:49 AM (in response to viegas)Im am using the beans source, but I changed the webapp, Im using standart jsp. I have the classes included in the classpath and I use then in the servlet and java code
thanks -
4. Re: FacesContext
newbie007 Jul 20, 2006 10:08 AM (in response to viegas)If you changed the webapp, you still using JSF?
If you are using your own servlet then why not prepare the form parameters list on your own and set it to the request or session (whatever feasiable)
Preparing form parameter list is straight forward:List taskFormParameters = new ArrayList(); TaskController taskController = taskInstance.getTask().getTaskController(); if (taskController!=null) { List variableAccesses = taskController.getVariableAccesses(); Iterator iter = variableAccesses.iterator(); while (iter.hasNext()) { VariableAccess variableAccess = (VariableAccess) iter.next(); String mappedName = variableAccess.getMappedName(); Objec! value = taskInstance.getVariable(mappedName); TaskFormParameter tfp = new TaskFormParameter(variableAccess, value); taskFormParameters.add(tfp); }
Thanks. -
5. Re: FacesContext
viegas Jul 20, 2006 10:53 AM (in response to viegas)Im not using JSF,
I implemented the code you described asn it worked , but I tried to do the "same" to the set method and it failed(something i did wrong
my code was:TaskController taskController = taskInstance.getTask().getTaskController(); if (taskController!=null) { taskControler.submitParameters((TaskInstance) taskParameters); } is this kind of code/API described with examples? thanks
-
6. Re: FacesContext
viegas Jul 24, 2006 7:15 AM (in response to viegas)Ignore my last post, Ive finally understood what you said, this part is working fine now.
Thanks for your sugestion