-
1. Re: rich:fileUpload in rich:modalPanel
akakunin Jun 9, 2008 12:50 PM (in response to zeppelinux)I had same problem - did not found solution - just dropped modalPanel and placed upload into normal form
-
2. Re: rich:fileUpload in rich:modalPanel
zeppelinux Jun 9, 2008 6:20 PM (in response to zeppelinux)redesigned it as well ...
-
3. Re: rich:fileUpload in rich:modalPanel
andrei_exadel Jun 16, 2008 6:18 AM (in response to zeppelinux)Can you please provide your page code here?
Seems you have something wrong there. Fileupload works fine with modal panel in my test invironment. -
4. Re: rich:fileUpload in rich:modalPanel
jpount Jul 14, 2008 10:37 PM (in response to zeppelinux)I originally had this issue but fixed it by adding a form within the modal panel - see below:
The problem I now have is that the "photoPanel" does not get re-rendered when I select a photo on the popup (see code at bottom of post). The action gets fired but reRender doesn't - do I need to qualify the call ie mainform:photoPanel ????
Thanks,
John
<h:form id="mainform">
<rich:panel id="photoPanel" styleClass="photoPanel">
<a4j:mediaOutput style="width:220px;height:220px;" element="img" createContent="#{personController.getCurrentPhoto}" mimeType="image/jpeg"/>
</rich:panel>
...
...
</h:form>
<f:subview>
<rich:modalPanel id="panel" width="800" height="350">
<h:form>
<h:panelGrid columns="2" columnClasses="top,top">
<rich:fileUpload id="upload" fileUploadListener="#{personController.fileUploader.listener}"
maxFilesQuantity="#{personController.fileUploader.uploadsAvailable}"
immediateUpload="#{personController.fileUploader.autoUpload}"
acceptedTypes="jpg, gif, png, bmp">
<a4j:support event="onuploadcomplete" reRender="info" />
</rich:fileUpload>
<h:panelGroup id="info">
<rich:panel style="height:250px;width:350px;">
<f:facet name="header">
<h:outputText value="Uploaded Files Info" />
</f:facet>
<h:outputText value="No files currently uploaded"
rendered="#{personController.fileUploader.size==0}" />
<rich:dataGrid columns="1" value="#{personController.fileUploader.files}" var="file" rowKeyVar="row">
<rich:panel>
<h:panelGrid columns="2">
<a4j:mediaOutput element="img" mimeType="#{file.mime}"
createContent="#{personController.fileUploader.paint}" value="#{row}"
style="width:100px; height:100px;" cacheable="false">
<f:param value="#{personController.fileUploader.timeStamp}" name="time"/>
</a4j:mediaOutput>
<h:panelGrid columns="2">
<h:outputText value="File Name:" />
<h:outputText value="#{file.name}" />
<h:outputText value="File Length(bytes):" />
<h:outputText value="#{file.length}" />
</h:panelGrid>
</h:panelGrid>
</rich:panel>
</rich:dataGrid>
</rich:panel>
<rich:spacer height="3"/>
<a4j:commandButton action="#{personController.fileUploader.clearUploadData}"
reRender="info, upload" value="Clear Uploaded Data"
rendered="#{personController.fileUploader.size>0}" />
<a4j:commandButton action="#{personController.replacePhoto}" value="Keep Photo" id="keepPhotoButton"
reRender="photoPanel"
rendered="#{personController.fileUploader.size>0}"/>
<rich:componentControl for="panel" attachTo="keepPhotoButton" operation="hide" event="onclick"/>
</h:panelGroup>
</h:panelGrid>
</h:form>
</rich:modalPanel>
<h:outputLink value="#" id="link" rendered="#{personController.personEditable}">
<h:commandButton value="Select Photo"/>
<rich:componentControl for="panel" attachTo="link" operation="show" event="onclick"/>
</h:outputLink>
</f:subview> -
5. Re: rich:fileUpload in rich:modalPanel
ronanker Jul 15, 2008 4:30 AM (in response to zeppelinux)maybe the subview here can cause visibility problem for the rerender...