Skip to content

Commit f87de04

Browse files
committed
Fix test regression
1 parent ece2c46 commit f87de04

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎integration-faces/src/main/java/org/ocpsoft/rewrite/faces/RewriteViewHandler.java‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
import org.ocpsoft.common.util.Iterators;
3434
import org.ocpsoft.rewrite.faces.spi.FacesActionUrlProvider;
3535
import org.ocpsoft.rewrite.servlet.util.URLBuilder;
36-
import org.ocpsoft.urlbuilder.Address;
37-
import org.ocpsoft.urlbuilder.AddressBuilder;
3836

3937
/**
4038
* @author Lincoln Baxter, III <lincoln@ocpsoft.com>
@@ -130,9 +128,13 @@ public String getActionURL(final FacesContext context, final String viewId)
130128

131129
if (result != null)
132130
{
133-
URLBuilder builder = URLBuilder.createFrom(result);
134-
builder.getQueryStringBuilder().addParameters(parent.getActionURL(context, viewId));
135-
result = builder.toURL();
131+
String parentActionURL = parent.getActionURL(context, viewId);
132+
if (parentActionURL.contains("?"))
133+
{
134+
URLBuilder builder = URLBuilder.createFrom(result);
135+
builder.getQueryStringBuilder().addParameters(parentActionURL);
136+
result = builder.toURL();
137+
}
136138
}
137139
}
138140
if (result == null)

0 commit comments

Comments
 (0)