Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
using ig:smartSubmit function
posted

Hi,

  I have jsp page like this:

<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>

<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<%@ taglib prefix="ig" uri="http://ko.infragistics.com/faces/netadvantage"%>    

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Insert title here</title>

<script

   type="text/JavaScript" 

   src="/infragistics-netadvantage/resources/infragistics/scripts/igf_bootstrap.js">

</script>

<script   

   src="/infragistics-netadvantage/resources/infragistics/scripts/igf_core.js">

</script>

 

<script type="text/JavaScript">

 

igBootstrap("/infragistics-netadvantage/resources/infragistics/scripts/", "/infragistics-netadvantage/resources/infragistics/themes/blue/");

 

</script>

 

<script type="text/JavaScript">

 

    var smartRefreshSupport = true;

 

</script>

<script type="text/javascript">

function myfun(){

alert('arg');

}

</script>

</head>

<body>

 

<f:view>

    <h:form id="form1">

 

<h:inputText id="showTime" value="#{demo_Source.inputValue}" binding="#{demo_Source.inputControl}"></h:inputText>

<h:commandButton type="button" value="Select now"

onclick="ig.smartSubmit('form1', null, null, 'form1:showTime', myfun);"></h:commandButton>

 

 

   

</h:form>

</f:view>

 

</body>

</html>

It has backing bean which tries to change the value of textbox... when i try to function this code, Iam getting a javascript error. How can i get around this. Or any sample page that satisfies my use case will be helpfull

 

Parents
No Data
Reply
  • 145
    posted

    Hi,

    Even I am not able to test the smartSubmit for the core JSF components. I followed the example given in the document to include the javascript like onclick="ig:smartSubmit('form1', null, null, 'form1:showTime', myfun);"> this in my h:commandButton, but still it didn't worked.

    Two main things to point here:

    1. Can someone help with any sample code or point out the mistake which I am doing.

    2. If this works then, will our action in backing bean (correspoding to the commandButton) will be triggered?

    I really appreciate any help on this.

    Regards,

    Kaushal

Children
No Data