I am asking about passing the context name to script,

I have a Behaviour class which extends from
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior  
 
here code  for my behaviour class

public class AuditBehaviour extends JQueryBehavior {


    
    @Override
    public void renderHead(IHeaderResponse response) {
        super.renderHead(response);
    
response.renderJavascript((String)SpringApplicationContext.getBean("downloadHelpScript"),"filedownload");
    }
}
I define this script inside a spring bean 

        <bean  id="downloadScript"  class="java.lang.String">
                <constructor-arg>
                        <value>
                                        <![CDATA[
                                                function startDownload()
                                                {
                                                        var 
url='/{requestContext}/downloads/db-model.pdf';  
                                                        
window.open(url,'Download');
                                                }
                                                </script>
                                        ]]>             
                        </value>
                </constructor-arg>
        </bean>

and access with mu util   
SpringApplicationContext.getBean("downloadHelpScript")

now my question is how can I pass request context to replace  
{requestContext} in the script.





-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/pass-request-context-to-jquey-in-wicket-pages-tp2224828p2224990.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to