You can build the json string instead of returning the hardcoded one, you can use FreeMarker, JSP, Velocity, to generate it. You can also use the json plugin:
http://cwiki.apache.org/S2PLUGINS/json-plugin.html Look at the examples in showcase, there is one that builds the json result using FreeMarker. musachy On 7/9/07, Jaladanki, Ravi <[EMAIL PROTECTED]> wrote:
Hi All, I want to use the Struts autocompleter tag as mentioned below. <s:autocompleter theme="ajax" href="%{json}" name="state" showDownArrow="false" loadMinimumCount="3" loadOnTextChange="true" notifyTopics="load"/> It is working fine if I give the result type is hardcoded JavaScript file. But I don't want to hard code the JavaScript file and I want to get the response based upon the my user input like Google suggest. Basically I want to use some action which can fetch data from my DB and should send back the data to the client and that data should be filled. I am not able find any example for this problem. If anybody having that example , please share with me . I need to have jsp file and java file and action mapping how they are integrated.. Looking for your help Thanks Ravi ----------------------------------------- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, notify the sender immediately by return email and delete the message and any attachments from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- "Hey you! Would you help me to carry the stone?" Pink Floyd