This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Spring and the fly likes How to declare Spring.addDecoration inside javascript function? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to declare Spring.addDecoration inside javascript function?" Watch "How to declare Spring.addDecoration inside javascript function?" New topic
Forums: HTML, CSS and JavaScript Spring
Author

How to declare Spring.addDecoration inside javascript function?

Prabakaran Rajendran
Greenhorn

Joined: Apr 22, 2014
Posts: 2
Hi,

I am using "spring web-flow" for doing AJAX actions.

Is that possible to declare "Spring.addDecoration(new Spring.AjaxEventDecoration({ }));" inside the java script function?. Because I am trying to do some validations and value assignments on form submission using JQuery/Java script.

or How can I trigger "Spring.addDecoration" after completion of javascrtipt function ?

Step 1:
function validation() {
if(x==y) {
alert('success');
document.getElementById("id").value = 'myvalue';
}
}

step 2:
Spring.addDecoration(new Spring.AjaxEventDecoration({
formId : "editform",
elementId : "validate",
event : "onclick",
params : {
fragments : "myTable"
}
})
);

I need to execute step-1 first then step-2.

kindly help me to resolve this.

Thanks
Surendra Kumar
Ranch Hand

Joined: Jul 04, 2006
Posts: 235
Yes, you could do as per Spring docs.
 
wood burning stoves
 
subject: How to declare Spring.addDecoration inside javascript function?
 
Similar Threads
calling javascript function from ActionScript Method
Can I validate my form using Struts-Portlet framework functionality
2 functions at onsubmit
Populate MultiSelect Dojo box onLoad from XML data file
Why to use eval function inside Javascript