0

We've got a modal panel users can upload an image on. The image upload doesn't work with an ajax submit, so we are using h:commandLink to submit. Unfortunately this is causing our url parameters to disappear. Presently the view looks like this.

    <rich:modalPanel domElementAttachment="parent" id="profilePanel" styleClass="popUp" resizeable="false" moveable="false" autosized="true" zindex="200" top="-10">
        <h:form enctype="multipart/form-data" id="profilePanelFormId">
            <k:box title="Edit Advocacy Profile" width="width6x" wantFocus="true">

                <s:div id="profilePanelForm">
                    <rich:messages rendered="#{messagesUtil.errorsExist}"/>
                    <a4j:include viewId="/panel/advocacy/advocateProfileEdit.xhtml"/>
                </s:div>

                <h:commandLink id="cancel" immediate="true" value="Cancel" action="#{advocateManager.cancelEditCommitment}" styleClass="button cancel" tabindex="100">
                    <f:param name="confirmationCode" value="3C5VNP5"/>
                </h:commandLink>
                <h:commandLink id="save" value="Save" action="#{advocateManager.saveCommitment}" styleClass="button submit" tabindex="101">
                    <f:param name="confirmationCode" value="3C5VNP5"/>
                </h:commandLink>

            </k:box>
        </h:form>
    </rich:modalPanel>

But the url when you click cancel or save is: view.html instead of view.html?confirmationCode=3C5VNP5&conversationId=x like I would expect.

Does anyone know why this doesn't work or what can be done to get around it?

Loren_
  • 2,597
  • 3
  • 20
  • 29

1 Answers1

0

You did a workaround which lead to full page reload... Better to fix richfaces' file upload, than solve this issue by managing page params over requests.

nigi
  • 136
  • 5
  • Any suggestions on how to fix the richfaces file upload? It's perfectly reasonable to me that it not work via ajax. – Loren_ Oct 24 '12 at 20:39