aspose file tools*
The moose likes Struts and the fly likes Unable to insert a bean:write value that has a space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Unable to insert a bean:write value that has a space " Watch "Unable to insert a bean:write value that has a space " New topic
Author

Unable to insert a bean:write value that has a space

raghu yeggina
Greenhorn

Joined: Feb 11, 2009
Posts: 27
hi friends..

Unable to insert a bean:write value, that has a space, as an argument for a javascript function.

to be more clear...

<a onclick=displaySpecificationValue('<bean:write name='destinationsObj' property='titleId'

/>','<bean:write name='destinationsObj' property='titleName' />') href="#">


in the above code the titleName property returns a value New Zealand that contains a Space and

because of a space in between the literals the on click function is not getting called at all

but its working fine with the values that don't have any space in between

and finally..

this is my first post in our portal and please forgive if any conventions not followed and give me your valuable suggestions..
raghu yeggina
Greenhorn

Joined: Feb 11, 2009
Posts: 27
hi friends.


i resolved the flaw in the logic which is a very small one


it was onclick=displaySpecificationValue(..) earlier

where double quote is missing before the method call

i changed it to onclick="displaySpecificationValue and now its working fine..

thank you for the visit...

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unable to insert a bean:write value that has a space
 
Similar Threads
bean:write, with PRE in OPTION tag
Pass a parameter to an event handler
pass <bean:write> to a function
how to assign bean value to jsp variable
Pass selected bean property to javascript