You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2007/06/17 18:59:26 UTC
[jira] Resolved: (STR-3057) I am unable to pass run time value in
"propety" and "type" attribute of tag
[ https://issues.apache.org/struts/browse/STR-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton resolved STR-3057.
----------------------------------
Resolution: Not A Problem
Please ask questions on the user mailing list. Jira is for reporting bugs in Struts - not getting help/debugging your application:
http://struts.apache.org/mail.html
> I am unable to pass run time value in "propety" and "type" attribute of <bean:define> tag
> -----------------------------------------------------------------------------------------
>
> Key: STR-3057
> URL: https://issues.apache.org/struts/browse/STR-3057
> Project: Struts 1
> Issue Type: Bug
> Components: Taglibs
> Affects Versions: 1.0.1
> Environment: struts 1.0, jsp 2.0, jdk1.5
> Reporter: kamlesh sharma
>
> I need to define a varible type of that varible should be define at run time.
> i am geeting one parameter from request whcih define type of varible and property name of that bean where it should be created.
> String temp="";
> String prop = "";
> String typ = "";
> if(null !=request.getAttribute("flag")){
> temp = request.getAttribute("flag");
> }
> if(temp.equals("true")){
> prop = "currentUser";
> typ = "com.for.model.vo.UserVO";
> } else{
> prop = "currentContact";
> typ = "com.for.model.vo.ContactVO";
> }
> <bean:define id="vo" name='"myBean" property="<%=prop%>" type="<%=typ%>" />
> it does not work but when i pass hard code value in these attribute then..it works fine.
> i.e.
> <bean:define id="vo" name='"myBean" property="currentUser" type="com.for.model.vo.UserVO" />
> OR
> <bean:define id="vo" name='"myBean" property="currentContact" type="com.for.model.vo.ContactVO" />
> Please tell me, does it possible to pass run time value in this tag and if we can then where i am doing mistake in above code.
> please revert back as soon as possible.
> kamlesh sharma
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.