Reputation: 4458
I used hidden variables to achieve this before. But I wanted to remove the hidden variables for security reasons and hence I have to be able to access the action fields without using hidden fields. How can I do that?
Upvotes: 2
Views: 1680
Reputation: 684
You can initialize the js variables using the action fields like -
<script>
var item = '<s:property value="item" />';
....
</script>
where the Action class has a getItem()
method.
Upvotes: 2