|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
SubWindowUtils.java | 0% | 0% | 0% | 0% |
|
1 |
/*
|
|
2 |
* Joey and its relative products are published under the terms
|
|
3 |
* of the Apache Software License.
|
|
4 |
*/
|
|
5 |
/*
|
|
6 |
* Created on 2004/01/06
|
|
7 |
*/
|
|
8 |
package org.asyrinx.brownie.tapestry.components.link;
|
|
9 |
|
|
10 |
import java.util.Map;
|
|
11 |
|
|
12 |
import org.apache.commons.lang.StringUtils;
|
|
13 |
import org.apache.tapestry.ApplicationRuntimeException;
|
|
14 |
import org.apache.tapestry.IComponent;
|
|
15 |
import org.apache.tapestry.IPage;
|
|
16 |
import org.apache.tapestry.IRequestCycle;
|
|
17 |
import org.asyrinx.brownie.tapestry.util.ComponentUtils;
|
|
18 |
|
|
19 |
/**
|
|
20 |
* @author akima
|
|
21 |
*/
|
|
22 |
public class SubWindowUtils { |
|
23 |
|
|
24 |
/**
|
|
25 |
*
|
|
26 |
*/
|
|
27 | 0 |
private SubWindowUtils() {
|
28 | 0 |
super();
|
29 |
} |
|
30 |
|
|
31 | 0 |
public static void open(IRequestCycle cycle, final String pageName, |
32 |
final Map propFieldMap) { |
|
33 | 0 |
if (StringUtils.isEmpty(pageName))
|
34 | 0 |
throw new ApplicationRuntimeException( |
35 |
"failed to open sub-window because of null pageName");
|
|
36 | 0 |
final IPage next = cycle.getPage(pageName); |
37 | 0 |
if (StringUtils.isEmpty(pageName))
|
38 | 0 |
throw new ApplicationRuntimeException("page not found: '" |
39 |
+ pageName + "'");
|
|
40 | 0 |
final IComponent subWindowListRow = ComponentUtils.lookForByClass(next, |
41 |
DirectSubWindowListRow.class);
|
|
42 | 0 |
if (subWindowListRow instanceof DirectSubWindowListRow) { |
43 | 0 |
final DirectSubWindowListRow listRow = (DirectSubWindowListRow) subWindowListRow; |
44 | 0 |
listRow.setReturnOptions(propFieldMap); |
45 |
} |
|
46 | 0 |
cycle.activate(next); |
47 |
} |
|
48 |
|
|
49 |
} |
|