(defn saysomething " i dont want to talk to you" [name] (str "why is it so?" name)) #'my-clojureproject1.core/saysomething => (println (saysomething "anjana") => (defn saymorethings "what do you want to hear" [name] (str "life is a box of chocolates" name)) #'my-clojureproject1.core/saymorethings => (println (saymorethings "nirosha") ) life is a box of chocolatesnirosha nil
If you use the following code snippet to hide and show tds- the UI will get disturbed. The next corresponding td will get shifted to the hidden td space. var tablevar="#"+myTable; $(tablevar+' tr:eq('+i+')').find('td:eq(3)').show(); $(tablevar+' tr:eq('+i+')').find('td:eq(2)').show(); So how to retain the td space and still achieve the functionality. use the this code snippet. var tablevar="#"+myTable; $(tablevar+' tr:eq('+i+')').find('td:eq(3)').css("visibility", "hidden"); $(tablevar+' tr:eq('+i+')').find('td:eq(2)').css("visibility", "hidden"); $(tablevar+' tr:eq('+i+')').find('td:eq(4)').css("visibility", "visible");
Integrating Struts2 with Spring Security involves few configurations. Add all the spring core and spring security related jars-- spring -3.0.6 Struts2-Action :gets user principal and displays it on jsp after authentication package com.prdc.spring3; import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import java.util.Iterator; import java.util.List; import java.util.Properties; import java.util.Set; import org.apache.struts2.ServletActionContext; public class HelloWorld { private String message; private String username; public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String execute() { /*to get the authenticated username*/ HttpServletRequest request = ServletActionContext.getRequest(); this.setUsername(request.getUserPrincipal().getName()); ...
Comments
Post a Comment