[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1711
  • Last Modified:

Struts Hidden tag help

Hi,
I am trying to achieve this, Can any one  please help me on this
<html:hidden property="selReleaseId" value="<bean:write name='aForm' property='infolBean.selection.selId'/>"/>
I need that value to be stored as a hidden variable. What would be the way to do that. Inside the value it is not recognising the bea:write tag.
One more thing is I would like to put an entire bean as a hidden variable, How can I achieve that. Thanks for all the help

     
0
json123
Asked:
json123
2 Solutions
 
suprapto45Commented:
As far as I know, you can't mix them together.

You must use either Scriptlet (<%%>) to do that or use the FormBean / ActionForm to achieve that. Do you use the ActionForm already?

David
0
 
json123Author Commented:
Thanks for your reply david.
Yes I am using the ActionForm in request scope, I could change it into session and it will be there but to solve it using request itself I need to use the hidden field.  That is where I am facing the problem.  
0
 
suprapto45Commented:
Then,

If you have used the ActionForm, I think that its better if you stick with ActionForm. Your ActionForm should have one attribute called "selReleaseId" then...

        ActionForward nextPage = null;
        YourActionForm yaf = new YourActionForm();
       
        yaf.setSelReleaseId("whatever value here");

       nextPage = new ActionForward("whatever");
       nextPage.addOutputForm(yaf);

       return nextPage;

I used WebLogic PageFlow so it may be a bit different with you but I guess that it should be similar.

Hope that helps.
David
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
json123Author Commented:
In my ActionForward instance there is no method like addOutPutForm, Is this is standard with struts or some thing added on top of it by weblogic?. Please let me know your suggestions

0
 
ManishLeadCommented:
>><html:hidden property="selReleaseId" value="<bean:write name='aForm' property='infolBean.selection.selId'/>"/>

<input type="hidden"  value="<bean:write name='aForm' property='infolBean.selection.selId'/>"/>
0
 
suprapto45Commented:
It may be different as something should be added on top of it by WebLogic.

Let me find out what are the commands in Struts.

David
0
 
suprapto45Commented:
Sorry for any delay.

I was extremely busy these few days. How is this going? Do you still need any help?

Thanks
David
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now