Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
how to setAttribute in a controller and getAttribute forword page
Migrateduser
Hi all,
I am using teamsite7.3.1 .
Here is the code for set value in Controller
public ForwardAction readFormData(RequestContext context){
String pageName=context.getRequest().getParameter("pageLink");
URLRedirectForwardAction forwardAction = null;
try{
logger.info("pageName "+pageName);
String getSearchValue=context.getRequest().getParameter("searchvalue");
logger.info("getSearchValue "+getSearchValue);
context.getRequest().setAttribute("searchDocument", "set Attributes value for the forward page ");
forwardAction= new URLRedirectForwardAction(context, pageName);
}catch(Exception e){
logger.error(e.getMessage());
}
return forwardAction;
}
get Attribute Value from forward pages.
write another method for get AttributeValue.
public Document getSearchData(RequestContext context){
Document document=null;
try{
logger.info(">>>>>>>>>>>>>>>>>>>>>>>>>>> getSearchData ======================= "+context.getRequest().getAttribute("searchDocument"));
}catch(Exception e){
e.printStackTrace();
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>> Exception ======================= "+e.toString());
}
return document;
}
context.getRequest().getAttribute("searchDocument")) is return null value;
Please Help me .
How to get value from getAttribute in forword page.
Find more posts tagged with
Comments
There are no comments yet