aspose file tools
The moose likes Struts and the fly likes problem running dojo.plugin in struts2.1.6 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "problem running dojo.plugin in struts2.1.6" Watch "problem running dojo.plugin in struts2.1.6" New topic
Author

problem running dojo.plugin in struts2.1.6

anil rashnil
Greenhorn

Joined: Jul 06, 2009
Posts: 2
When i m using struts2.1.6 dojo plugin.

It gives error here.

<script>
function show_details() {
dojo.event.topic.publish("show_detail"); /*...The function publish(String) is undefined.*/
}
</script>

Code where i m using this function.


<s:if test="conn!=null">
<td><s:url id="d_url" action="DetailAction.action" /></td>
<table width="600" align="Center">

<s:form name="DBLabelAction" id="DBLabelAction" action="UpdateRemoteDBLable">
<tr>
<td>System is connected to remote database.</td>
</tr>
<tr>
<s:select name="attributeName" list="dbLabelList"
label="Select Attribute" headerKey="0"
headerValue="--Please Select--" cssClass="textfield" required="true" />
</tr>
<tr>
<td> </td>
</tr>

<s:select name="remoteDbTable" list="remoteDbtableList"
label="Select Table" headerKey="0" headerValue="--Please Select--"
cssClass="textfield" required="true"
onchange= "show_details()"/>


<sx:div
showLoadingText="false" id="details" href="DetailAction" theme="ajax"
listenTopics="show_detail" formId="DBLabelAction">
</sx:div>



<s:submit value=" submit " align="center"></s:submit>
</s:form>
<tr>
<td> </td>
</tr>

</table>


</s:if>


Please help what to do, in order to run ajax successfully. i have tried all sources to run this, but not successful.
Roberto Hernandez
Ranch Hand

Joined: Apr 29, 2009
Posts: 33
Do you have dojo declared inside your head tag?
<sx:head />

Is your <script> declared after the above line? It should look something like this:



Also, is your code inside another <sx:div or <sx:tabbedPannel ?? If that's the case, you need to use executeScripts=true and separateScripts="false"

give it a try!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56192
    
  13

"rashnil invincible",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff

[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem running dojo.plugin in struts2.1.6
 
Similar Threads
<s:select in <s:iterate tag displaying with comma seperated value
how to delete multiple browse
Struts 2.0 Ajax dojo
problems validation.xml in struts 2
s:doubleselect exception/ error