This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 30, 2012, 4:34 PM
19 Posts

Partial Refresh clears file upload control values

  • Category: Debugging
  • Platform: All
  • Release: 8.5.3
  • Role:
  • Tags: xPages File Upload Control Partial Refresh
  • Replies: 1
I have several file upload controls on an xPage.  Each one prefaced by a radio button group
 
 When you select Yes the file upload is unhidden using a computed value see code below.  I'm using a partial refresh on the control itself.  This works.  However,
later in the code I have another Yes / No radio button group that does a partial refresh without specifying a target as it needs to refresh several items on the page.
When this radio button is selected it clears all the file upload control values selected by the end user.  
 
Any ideas how to stop the file upload controls from losing their values during a partial refresh when I can't specify a target to refresh since I have multiple targets to refresh?
 
                        <xp:tr>
                            <xp:td>
                                <xp:label value="Do you have Current Insurance?" id="vendorAPPCurrentInsurYN_Label1"
                                    for="vendorAPPCurrentInsurYN1"></xp:label>
                            </xp:td>
                            <xp:td>
                                <xp:radioGroup id="rgVendorAPPCurrentInsurYN"
                                    value="#{vendorApplication.vendorAPPCurrentInsurYN}">
                                    <xp:selectItem itemLabel="Yes" itemValue="Yes"></xp:selectItem>
                                    <xp:selectItem itemLabel="No" itemValue="No"></xp:selectItem>

                                    <xp:eventHandler event="onclick" submit="true"
                                        refreshMode="partial" refreshId="panelFU1">
                                    </xp:eventHandler>
                                </xp:radioGroup>
                            </xp:td>
                            <xp:td>
                                <xp:panel id="panelFU1">
                                <xp:fileUpload id="fuVendorAPPCurrentInsurDoc"
                                    value="#{vendorApplication.vendorAPPCurrentInsurDoc}">
                                    <xp:this.rendered><![CDATA[#{javascript:getComponent("rgVendorAPPCurrentInsurYN").getValue() == "Yes";}]]></xp:this.rendered>
                                </xp:fileUpload>
                                </xp:panel>
                            </xp:td>
                        </xp:tr>
May 1, 2012, 10:23 AM
126 Posts
Re: Partial Refresh clears file upload control values
You can't use a partial refresh in conjunction with a file upload control as you can't currently post a file to the server during this process. 
 
 
Also what you mentioned about using a partial refresh without a target sounds very strange. A partial refresh is designed to refresh an area without touching the rest of the page, if you have multiple areas that can't be grouped in a panel or something like that you should either use script to refresh these sections or if there is many of them it sounds like it might be best to do a full refresh.
 
on a side note it sounds like what your doing in the refreshes is hiding / showing these controls. calling  " getComponent(<id>).setRendered(true / false); " sounds like a much better solution than refreshing the page to compute one or two render properties.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal