You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Jason Pyeron <jp...@pdinc.us> on 2011/02/17 17:36:42 UTC

RE: Regression in s:url tag [interim workaround]

> -----Original Message-----
> From: Jason Pyeron 
> Sent: Thursday, February 17, 2011 7:53
> To: 'Struts Developers List'
> Subject: RE: Regression in s:url tag
> 
> > -----Original Message-----
> > From: Lukasz Lenart
> > Sent: Thursday, February 17, 2011 6:20
> > To: Struts Developers List
> > Subject: Re: Regression in s:url tag
> > 
> > 2011/2/16 Jason Pyeron <jp...@pdinc.us>:
> > > The <s:url var="url" escapeAmp="false"/> execution used to produce (in 
> > > 2.1.6) http://host/app/action!method and now produces 
> > > http://host/app/action.xhtml droping the method in 2.2.1.1

My kludge / workaround, for now. I am going to track down when the regression
really happened this week end.

+       private String method;
+       public String getMethod(){return method;}
+
+

@@ -131,6 +141,7 @@

        public String index()
        {
+               try{


@@ -149,10 +160,16 @@


                return SUCCESS;
+               }
+               finally
+               {
+                       method="index";
+               }
        }

        public String novlan()
        {
+               try{



@@ -173,18 +190,30 @@


                return SUCCESS;
+               }
+               finally
+               {
+                       method="novlan";
+               }
        }
        public String input()
        {

And then

-<s:url var="url" escapeAmp="false"/>
+<s:url var="url" method="%{method}" escapeAmp="false"/>

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

 

> -----Original Message-----
> From: Jason Pyeron [mailto:jpyeron@pdinc.us] 
> Sent: Thursday, February 17, 2011 7:53
> To: 'Struts Developers List'
> Subject: RE: Regression in s:url tag
> 
> > -----Original Message-----
> > From: Lukasz Lenart
> > Sent: Thursday, February 17, 2011 6:20
> > To: Struts Developers List
> > Subject: Re: Regression in s:url tag
> > 
> > 2011/2/16 Jason Pyeron <jp...@pdinc.us>:
> > > The <s:url var="url" escapeAmp="false"/> execution used to
> > produce (in
> > > 2.1.6) http://host/app/action!method and now produces 
> > > http://host/app/action.xhtml droping the method in 2.2.1.1
> > 
> > Could you show the whole code example ?
> 
> // this is a sensitive project, I am removing parts, that are 
> not relevant.
> public class IpAction extends ActionSupport implements 
> Preparable , ServletRequestAware { // snip
> 	public String index()
> 	{
> 		//snip
> 		ipList=IpAddress.getList(session, new CriteriaBuilder(){
> 
> 			@Override
> 			public Criteria process(Criteria x)
> 			{
> 				return x
> 				//		.setFetchMode("vlan",
> FetchMode.JOIN)
> 				.setFetchMode("nic", FetchMode.JOIN)
> 				.setFetchMode("nic.device", 
> FetchMode.JOIN)
> 				.setFetchMode("nic.device.domain",
> FetchMode.JOIN)
> 				;
> 			}});
> 		return SUCCESS;
> 	}
> 
> 	public String novlan()
> 	{
> 		//snip
> 		ipList=IpAddress.getList(session, new CriteriaBuilder(){
> 
> 			@Override
> 			public Criteria process(Criteria x)
> 			{
> 				// TODO Auto-generated method stub
> 				return x
> 				.add(Restrictions.isEmpty("vlan"))
> 				.setFetchMode("nic", FetchMode.JOIN)
> 				.setFetchMode("nic.device", 
> FetchMode.JOIN)
> 				.setFetchMode("nic.device.domain",
> FetchMode.JOIN)				
> 				;
> 			}});
> 					
> 		return SUCCESS;
> 	}
> 
> }
> 
> 
> ip.jsp:
> 
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>     pageEncoding="ISO-8859-1"%>
> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib 
> uri="http://displaytag.sf.net" prefix="display" %> <html> 
> <head> <title><s:property value="#title" /></title> </head> 
> <body> <s:url var="url" escapeAmp="false"/>
> 	<div id="container">
> 	     <display:table id="ipList" name="ipList"
> requestURI='<%=((String)request.getAttribute("url")) %>' 
> class="tablesorter"
> sort="list" pagesize="25">
> 		 	<display:column property="ipAddress" 
> title="Ip address"
> sortable="true" />
> 		 	<display:column property="nic.device.hostname"
> title="Host name" sortable="true" href="device!info" 
> paramId="device.id"
> paramProperty="nic.device.id" />
> 		 	<display:column 
> property="nic.device.domain.name"
> title="Domain name" sortable="true" href="device!info" 
> paramId="device.id"
> paramProperty="nic.device.id" />
> 		 	<display:column property="nic.device.assetTag"
> title="Asset tag" sortable="true" href="device!info" 
> paramId="device.id"
> paramProperty="nic.device.id" />
> 		 </display:table>	  
> 	</div>
> </body>
> </html>
> 
> 
> > 
> > 
> > Kind regards
> > --
> > Lukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> > Kapitula Javarsovia http://javarsovia.pl
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For 
> > additional commands, e-mail: dev-help@struts.apache.org
> > 
> > 
> 
> 
> 
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> -                                                               -
> - Jason Pyeron                      PD Inc. http://www.pdinc.us -
> - Principal Consultant              10 West 24th Street #100    -
> - +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
> -                                                               -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> This message is copyright PD Inc, subject to license 20080407P00.
> 
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For 
> additional commands, e-mail: dev-help@struts.apache.org
> 



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


Re: Regression in s:url tag [interim workaround]

Posted by Lukasz Lenart <lu...@googlemail.com>.
2011/2/17 Jason Pyeron <jp...@pdinc.us>:
> My kludge / workaround, for now. I am going to track down when the regression
> really happened this week end.

That would be great, fill free to open a new issue for that!


Kind regard
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia http://javarsovia.pl

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