myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Marinschek" <martin.marinsc...@gmail.com>
Subject Re: iframe and saveState
Date Fri, 14 Mar 2008 00:38:55 GMT
Hi Piotr,

if you do not want session scope, how about some
dialog/conversation-scope, like Orchestra?

regards,

Martin

On Thu, Mar 13, 2008 at 5:59 PM, Piotr <krzepczak@gmail.com> wrote:
>
>  any ideas please.
>
>
>
>
>
>  Piotr wrote:
>  >
>  > Hi users,
>  >
>  > I'm trying to do file upload functionality kind of similar to gmail one.
>  > I thought that it could be done using iframe and saveState from tomahawk
>  > but I'm facing some problems.
>  >
>  > In my page main page I have nested iframe component:
>  > ...
>  > <h:form>
>  >
>  >   .. some input fields etc.
>  >
>  >     <div id="attachments">
>  >         <iframe src="attachments.html" frameborder="0" scrolling="no"
>  > width="90%" height="60" ></iframe>
>  >     </div>
>  >
>  >   <h:commandLink action="#{someMBean.save} value="save" />
>  >
>  > </h:form>
>  > ...
>  >
>  >
>  > page nested in the iframe:
>  > ...
>  >   <t:saveState id="uploadedFiles"
>  > value="#{someBean.uploadedAttachements}"/>
>  >
>  > ...some data table to display uploaded files
>  >
>  >   <h:form enctype="multipart/form-data">
>  >       <h:panelGrid columns="2">
>  >           <t:inputFileUpload value="#{someMBean.attachment}"
>  >               storage="file" accept="*/*" required="true" size="30"/>
>  >           <h:commandButton value="upload" action="#{
>  > someMBean.uploadAttachement}"/>
>  >       </h:panelGrid>
>  >   </h:form>
>  > ....
>  >
>  > Now the issue is that when I upload the files, with the iframe nested
>  > page,
>  > they are stored between request with "saveState" tag as they should,
>  > I can see them listed in the data table.
>  > The problem is that when I try to save the whole item (some input fields
>  > and
>  > uploaded attachment files), with previously uploaded attachments,
>  > using the form in my main page (the one in which iframe is nested) the
>  > uploaded attachments collection is empty.
>  > Placing <t:saveState id="uploadedFiles" value="#{
>  > someBean.uploadedAttachements}"/> in the main page doesn't change
>  > situation.
>  > Is there a way to keep state of some variable between requests generated
>  > from iframe and my main page?
>  > Maybe I'm following wrong way to do this upload, do you have any other
>  > proposals?
>  >
>  > Please note that I don't want to store anything in session scope.
>  >
>  >
>  > Thanks in advance.
>  > Piotr
>  >
>  >
>
>  --
>  View this message in context: http://www.nabble.com/iframe-and-saveState-tp15981711p16031374.html
>  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

Mime
View raw message