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



Nov 23, 2011, 10:59 AM
17 Posts
topic has been resolvedResolved

after validation changing field from picklist not possible

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags: validation,picklist,field
  • Replies: 2
As long as there is no errormessage on the component (after validation) this works. As soon as there is a errormessage for the component 'project1'  it won't set the value with the value from the selected project.
Does anyone has a clue, or is there a way to reset the component to valid before I select
(tried x=getComponent("project1");x.setValid(true) before openening the dialog but that did not work , probably an error as I did not make it to openening the dialog)
 
the code
In a dialog from a view I display an inputform. On this vorm I have a link which opens another dialog with a view
   var dlg = dijit.byId('dlgAlleProjecten'); dlg.show();
 In the view I have a column to select the value of tghe projectnumber in the row
<xp:viewColumn>
                <xp:this.facets>
                    <xp:viewColumnHeader value="" xp:key="header" id="viewColumnHeader14" />
                </xp:this.facets>
                <xp:link escape="true" id="link1" text="sel">
                <xp:eventHandler event="onclick" submit="true" refreshMode="partial" execMode="partial" refreshId="project1">
                    <xp:this.action><![CDATA[#{javascript:var values = projectEntry.getColumnValues();
var id = values.get(0);
var projectnr = getComponent("project1");
if(projectnr!=null) projectnr.setValue(id);
}]]></xp:this.action>
                    <xp:this.script><![CDATA[var dlg = dijit.byId('#{id:dlgAlleProjecten}');
dlg.hide();]]></xp:this.script>
                </xp:eventHandler>
                </xp:link>
            </xp:viewColumn>
 
Nov 23, 2011, 3:49 PM
272 Posts
Re: after validation changing field from picklist not possible
Hi,
 
have you tried to disable to validators for your event?

<xp:eventHandler event="onclick" submit="true" refreshMode="partial" execMode="partial" refreshId="project1" disableValidators="true">

Hope this helps
Sven
 
http://blog.hasselba.ch
 
Nov 24, 2011, 7:16 AM
17 Posts
thank you, it works
it was
<xp:eventHandler event="onclick" submit="true" refreshMode="partial" execMode="partial" refreshId="project1">
changed to
<xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="project1" disableValidators="true">
 
had to remove the execMode="partial" too

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