• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Bean:write Not working

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,

I am using the below struts tag in Application, As you can see i am using script function showMsgPop in which i am using bean:write tag.But this tag is not able to display the message.

Please let me know where i am doing wrong?..

>jsp Page
-----------
The form tag
<html:form name="submitOpex" action="uploadOpexXcel.do" type= "c4.form.UploadOpexForm" method= "post" scope="session" >


<logic:messagesPresent message="true">
<html:messages id="submitCosmessage" message="true">
<script>
showMsgPop("OPEX Submission Result", "<bean:write name='submitCosmessage' />");
</script>
</html:messages>
</logic:messagesPresent >

Struts-config.xml
-----------------
<action
path="/submitOPEX"
type="c4.action.SubmitOpexAction"
name="submitOpex"
scope="session" >
<!-- input="subOpex"> -->
<forward contextRelative="true" name ="subOpexPage" path="subOpex" />
</action>

Thanks

Chetan Durg
 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

The attributes of struts tags(even custom tags) needs to be wrapped in a double quotes rather than single as u had done..

so u change the script to function("df" ,'<bean:write name=""/>') and single r double quotes doesnt matter for javascript
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"chetandurg",

Welcome to JavaRanch. We don't have many rules here, but we do have a naming policy which we try to strictly enforce. Please re-read this document and edit your display name in order to comply. Thanks in advance, and we look forward to seeing you around the Ranch.
reply
    Bookmark Topic Watch Topic
  • New Topic