You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by tom tom <j_...@yahoo.com> on 2007/05/23 06:43:52 UTC

Is this a BUG in S2

Hi,
We are experiencing that action attribute of the
<s:url tag is not evaluating the expressions.

For e.g Inside a interator if we want to get dynamic
action names from the interator and assign into the
action tag of the <s:url tag it just prints the text
as it is without evaluating.

Even tried <c:out of the jstl inside the action
property as follows in side a iterator but didnt work.

<s:iterator id="testID" value="xxxxxxxx">
<s:set name="testActionName" value="actionName"/>
        <tr>
          <td valign="middle" bgcolor="white" >
          
            <s:url id="url" action="<c:out
value='${testActionName}'/>">
  				
.....
.....


Is there any way to overcome this kind of
requirements.

Thanks



       
____________________________________________________________________________________Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts development with certain IDEs

Posted by "Baskin, Wayne (GE Comm Fin, non-ge)" <wa...@ge.com>.
Correct

Struts 1 


Wayne Baskin
GE Commercial Finance
T: +612 8913 2656
E: wayne.baskin@ge.com

-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: Friday, 25 May 2007 11:39 AM
To: Struts Users Mailing List
Subject: RE: Struts development with certain IDEs

--- "Baskin, Wayne" wrote:
> Non-rt. Care to explain? 

Hmm, let's back up a step. 

What version of Struts are you using?

You're just talking about using <%= ... %> in a tag attribute, right?

d.



 
________________________________________________________________________
____________
Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



DISCLAIMER:
This e-mail and any attachment is intended only for the exclusive and confidential use of the addressee(s). If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. If you have received this message in error, please notify the sender by return e-mail immediately and delete the message from your computer without making any copies. Please see http://www.ge.com.au/help/email_privacy_policy.html for information about our privacy practices.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts development with certain IDEs

Posted by Dave Newton <ne...@yahoo.com>.
--- "Baskin, Wayne" wrote:
> Non-rt. Care to explain? 

Hmm, let's back up a step. 

What version of Struts are you using?

You're just talking about using <%= ... %> in a tag
attribute, right?

d.



 
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts development with certain IDEs

Posted by "Baskin, Wayne (GE Comm Fin, non-ge)" <wa...@ge.com>.
Non-rt. Care to explain? 


Wayne Baskin
GE Commercial Finance
T: +612 8913 2656
E: wayne.baskin@ge.com

-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: Friday, 25 May 2007 10:59 AM
To: Struts Users Mailing List
Subject: Re: Struts development with certain IDEs

--- "Baskin, Wayne <wa...@ge.com> wrote:
> I want to know is there any reason why with one IDE (Bea WebLogic) I 
> cannot nest scriptlet tags in a struts tag, but with another Eclipse, 
> I can?

You mean the editor complains?

Could just be a setting for whether or not you want it to allow you to
use scriptlets. Or you might be using the non-rt version of the TLDs and
the BEA IDE is smart enough to care? Not sure about that one.

(Drat, my Weblogic IDE won't start up now, either :/ I always just used
Eclipse/MyEclipse.)

d.



 
________________________________________________________________________
____________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



DISCLAIMER:
This e-mail and any attachment is intended only for the exclusive and confidential use of the addressee(s). If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. If you have received this message in error, please notify the sender by return e-mail immediately and delete the message from your computer without making any copies. Please see http://www.ge.com.au/help/email_privacy_policy.html for information about our privacy practices.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts development with certain IDEs

Posted by Dave Newton <ne...@yahoo.com>.
--- "Baskin, Wayne <wa...@ge.com> wrote:
> I want to know is there any reason why with one IDE
> (Bea WebLogic) I cannot nest scriptlet tags in a 
> struts tag, but with another Eclipse, I can?

You mean the editor complains?

Could just be a setting for whether or not you want it
to allow you to use scriptlets. Or you might be using
the non-rt version of the TLDs and the BEA IDE is
smart enough to care? Not sure about that one.

(Drat, my Weblogic IDE won't start up now, either :/ I
always just used Eclipse/MyEclipse.)

d.



 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Struts development with certain IDEs

Posted by "Baskin, Wayne (GE Comm Fin, non-ge)" <wa...@ge.com>.
Hi all,

I want to know is there any reason why with one IDE (Bea WebLogic) I
cannot nest scriptlet tags in a struts tag, but with another Eclipse, I
can?

Thanks

Wayne


DISCLAIMER:
This e-mail and any attachment is intended only for the exclusive and confidential use of the addressee(s). If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. If you have received this message in error, please notify the sender by return e-mail immediately and delete the message from your computer without making any copies. Please see http://www.ge.com.au/help/email_privacy_policy.html for information about our privacy practices.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Is this a BUG in S2

Posted by tom tom <j_...@yahoo.com>.
Hi,

if the action string is being evaluated in the URL tag

what does it output the expression as it is, If we
have the same expression in value attribute it does
evaluate, That is where we are doubtful.

In portal mode the action attribute does convert the
string to portal string where as value does not.

Hence we need to get the expression evaluated in the
action attribute

Thanks
--- Jeromy Evans <je...@blueskyminds.com.au>
wrote:

> In the simple case, this:
> <s:url id="url" action="${courseName}">
> and this:
> 
> <s:url  id="url"  value="${courseName}.action">
> 
> would be identical.  You can also use the <param>
> tag to include request 
> parameters. You can create any URL you need using
> the value attribute 
> and params.
> 
> You referenced portal in your email so you might be
> using this in a mode 
> I haven't tried.  Looking at the code for s:url, the
> action string IS 
> being evaluated but there's extra processing (a lot)
> to convert into a 
> URL. The behaviour depends on whether you're in
> portlet mode or not.  If 
> you put a break-point in the end(writer, body)
> method of 
> org.apache.struts2.components.URL.java you'll see
> where it's going wrong 
> for your case.  I don't think this is a bug in S2.
> 
> tom tom wrote:
> > Yes you are right,
> >
> > Even though action attribute doesnt get evaluated
> > value attribute does,
> >
> > but that is of no use as it does not create the
> URL
> > string to suite with Portal env.
> >
> > The biggest concern is why the action attrbute of
> URL
> > tag doesnt evaluate.
> >
> > that is following doesnt work 
> >
> >  <s:url  id="url"  action="%{courseName}">
> >   				
> > 		   </s:url>
> >
> > but this does but no point as it doesnt render the
> url
> > as per portal requirement
> >
> > <s:url  id="url3"  value="%{courseName}">
> >   				
> > </s:url>
> >
> > That is why I would like to call this as a bug-not
> > evaluating the action attribute of url tag
> >
> >
> > --- Dave Newton <ne...@yahoo.com> wrote:
> >
> >   
> >> --- tom tom <j_...@yahoo.com> wrote:
> >>     
> >>> for the second one there is no href
> >>> attribute for the URL tag hence doesnt work.
> >>>       
> >> The "value" attribute creates the href if the
> >> "action"
> >> attribute isn't used.
> >>
> >> d.
> >>
> >>     
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



       
____________________________________________________________________________________Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Is this a BUG in S2

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
In the simple case, this:
<s:url id="url" action="${courseName}">
and this:

<s:url  id="url"  value="${courseName}.action">

would be identical.  You can also use the <param> tag to include request 
parameters. You can create any URL you need using the value attribute 
and params.

You referenced portal in your email so you might be using this in a mode 
I haven't tried.  Looking at the code for s:url, the action string IS 
being evaluated but there's extra processing (a lot) to convert into a 
URL. The behaviour depends on whether you're in portlet mode or not.  If 
you put a break-point in the end(writer, body) method of 
org.apache.struts2.components.URL.java you'll see where it's going wrong 
for your case.  I don't think this is a bug in S2.

tom tom wrote:
> Yes you are right,
>
> Even though action attribute doesnt get evaluated
> value attribute does,
>
> but that is of no use as it does not create the URL
> string to suite with Portal env.
>
> The biggest concern is why the action attrbute of URL
> tag doesnt evaluate.
>
> that is following doesnt work 
>
>  <s:url  id="url"  action="%{courseName}">
>   				
> 		   </s:url>
>
> but this does but no point as it doesnt render the url
> as per portal requirement
>
> <s:url  id="url3"  value="%{courseName}">
>   				
> </s:url>
>
> That is why I would like to call this as a bug-not
> evaluating the action attribute of url tag
>
>
> --- Dave Newton <ne...@yahoo.com> wrote:
>
>   
>> --- tom tom <j_...@yahoo.com> wrote:
>>     
>>> for the second one there is no href
>>> attribute for the URL tag hence doesnt work.
>>>       
>> The "value" attribute creates the href if the
>> "action"
>> attribute isn't used.
>>
>> d.
>>
>>     


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Is this a BUG in S2

Posted by tom tom <j_...@yahoo.com>.
Yes you are right,

Even though action attribute doesnt get evaluated
value attribute does,

but that is of no use as it does not create the URL
string to suite with Portal env.

The biggest concern is why the action attrbute of URL
tag doesnt evaluate.

that is following doesnt work 

 <s:url  id="url"  action="%{courseName}">
  				
		   </s:url>

but this does but no point as it doesnt render the url
as per portal requirement

<s:url  id="url3"  value="%{courseName}">
  				
</s:url>

That is why I would like to call this as a bug-not
evaluating the action attribute of url tag


--- Dave Newton <ne...@yahoo.com> wrote:

> --- tom tom <j_...@yahoo.com> wrote:
> > for the second one there is no href
> > attribute for the URL tag hence doesnt work.
> 
> The "value" attribute creates the href if the
> "action"
> attribute isn't used.
> 
> d.
> 
> 
> 
>      
>
____________________________________________________________________________________Shape
> Yahoo! in your own image.  Join our Network Research
> Panel today!  
>
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



       
____________________________________________________________________________________Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Is this a BUG in S2

Posted by Dave Newton <ne...@yahoo.com>.
--- tom tom <j_...@yahoo.com> wrote:
> for the second one there is no href
> attribute for the URL tag hence doesnt work.

The "value" attribute creates the href if the "action"
attribute isn't used.

d.



      ____________________________________________________________________________________Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Is this a BUG in S2

Posted by tom tom <j_...@yahoo.com>.
Hi,
Thanks for the reply,

I tried both but with no luck,
Option 1 as stated I gave $actionName but doesnt
evaluate and for the second one there is no href
attribute for the URL tag hence doesnt work.

I tried various combinations like
c:out, ${actionName}, ${testID.actionName} and also

%{actionName} and %{testID.actionName} 

none worked, the reason is, it does not evaluate the
tag eventhough the specification says yes.

These are the reasons I want to confirm this as a bug
or not, but let us know your thoughts as well.

Thanks


--- Jeromy Evans <je...@blueskyminds.com.au>
wrote:

> I haven't tried to use a dynamic action name like
> that so can't comment 
> on whether its a bug or feature, but one of these
> options should work:
> 
> 1. Try using the ${} notation without the c:out
> <s:url id="url" action="${actionName}">
> 
> (I can't find the reference for this approach but
> it's somewhere on the 
> wiki)
> 
> 2. Alternatively, work-around it by using the href
> attribute:
> 
> <s:url id="url" href="${actionName}.action">
> 
> href definitely does work.
> 
> tom tom wrote:
> > Hi,
> > We are experiencing that action attribute of the
> > <s:url tag is not evaluating the expressions.
> >
> > For e.g Inside a interator if we want to get
> dynamic
> > action names from the interator and assign into
> the
> > action tag of the <s:url tag it just prints the
> text
> > as it is without evaluating.
> >
> > Even tried <c:out of the jstl inside the action
> > property as follows in side a iterator but didnt
> work.
> >
> > <s:iterator id="testID" value="xxxxxxxx">
> > <s:set name="testActionName" value="actionName"/>
> >         <tr>
> >           <td valign="middle" bgcolor="white" >
> >           
> >             <s:url id="url" action="<c:out
> > value='${testActionName}'/>">
> >   				
> > .....
> > .....
> >
> >
> > Is there any way to overcome this kind of
> > requirements.
> >
> > Thanks
> >
> >
> >
> >        
> >
>
____________________________________________________________________________________Be
> a better Heartthrob. Get better relationship answers
> from someone who knows. Yahoo! Answers - Check it
> out. 
> >
>
http://answers.yahoo.com/dir/?link=list&sid=396545433
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> >
> >
> >   
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



       
____________________________________________________________________________________Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Is this a BUG in S2

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
I haven't tried to use a dynamic action name like that so can't comment 
on whether its a bug or feature, but one of these options should work:

1. Try using the ${} notation without the c:out
<s:url id="url" action="${actionName}">

(I can't find the reference for this approach but it's somewhere on the 
wiki)

2. Alternatively, work-around it by using the href attribute:

<s:url id="url" href="${actionName}.action">

href definitely does work.

tom tom wrote:
> Hi,
> We are experiencing that action attribute of the
> <s:url tag is not evaluating the expressions.
>
> For e.g Inside a interator if we want to get dynamic
> action names from the interator and assign into the
> action tag of the <s:url tag it just prints the text
> as it is without evaluating.
>
> Even tried <c:out of the jstl inside the action
> property as follows in side a iterator but didnt work.
>
> <s:iterator id="testID" value="xxxxxxxx">
> <s:set name="testActionName" value="actionName"/>
>         <tr>
>           <td valign="middle" bgcolor="white" >
>           
>             <s:url id="url" action="<c:out
> value='${testActionName}'/>">
>   				
> .....
> .....
>
>
> Is there any way to overcome this kind of
> requirements.
>
> Thanks
>
>
>
>        
> ____________________________________________________________________________________Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. 
> http://answers.yahoo.com/dir/?link=list&sid=396545433
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org