-
1. Re: Ajax4jsf and Myfaces problem
sergeysmirnov Apr 23, 2007 5:23 PM (in response to frozone)drop out a4jLregion from your code. It does not make any sense in the case you are trying to use it.
Adrian is right. You have a form with non-ajax button. When user presses it, there is no room for ajax there. However, it is not possible to have an aajax button instead. It does not work because of the security reason.
So, using iframe is most suitable way. a4j:poll is required also -
2. Re: Ajax4jsf and Myfaces problem
frozone Apr 23, 2007 6:00 PM (in response to frozone)Thanks for your quick answer. Do I have to put the complete form into another jsp and have it run in an iframe?
e.g.<f:view> <h2>Semesterupdate</h2> <h:outputText value="Bitte geben Sie die .xls Datei des aktuellen Semesters an." /> <f:verbatim><iframe src="upload.jsp" /></f:verbatim> <a4j:region> <a4j:poll interval="500"> <a4j:outputPanel ajaxRendered="true" > <h:outputText value="#{myBean.uploadPercentage} % erledigt." id="procent" /> </a4j:outputPanel> </a4j:poll> </a4j:region> </f:view>
and in the upload.jsp<f:view> <h:form id="MyForm" enctype="multipart/form-data"> <h:panelGrid columns="2" border="0" cellspacing="5"> <h:outputLabel for="myFileId" value="Datei: " /> <x:inputFileUpload id="myFileId" value="#{myBean.myFile}" storage="file" required="true" /> <h:commandButton value="Hochladen" action="#{myBean.uploadMyFile}" /> </h:panelGrid> <h:messages style="color:red;"/> <h:outputText value="Bitte haben sie einen Moment Geduld. Das Speichern in die Datenbank kann bis zu 2 Minuten dauern." /> <br /> </h:form> </f:view>
Thanks once again for the answers.
I tried getting it started this way already. But does not work. Seems as if I still got an error inside. -
3. Re: Ajax4jsf and Myfaces problem
sergeysmirnov Apr 23, 2007 7:41 PM (in response to frozone)you need to have a h:form around the poll
-
4. Re: Ajax4jsf and Myfaces problem
sergeysmirnov Apr 23, 2007 7:43 PM (in response to frozone)do you have a small application to test?
-
5. Re: Ajax4jsf and Myfaces problem
frozone Apr 25, 2007 6:43 AM (in response to frozone)Hi Sergey,
thanks once again for your answer. But unfortunetely it still does not work. I kept the tags, because I heard of an issue using myfaces and a4jsf togther.
:-( -
6. Re: Ajax4jsf and Myfaces problem
hispeedsurfer Jun 10, 2007 5:23 AM (in response to frozone)hi frozone,
I tried to put a iframe to my page in the same way like you with xhtml.
But this frame cannot be displayed: 403 - access dinied.