本文整理汇总了Java中javax.portlet.PortletMode.EDIT属性的典型用法代码示例。如果您正苦于以下问题:Java PortletMode.EDIT属性的具体用法?Java PortletMode.EDIT怎么用?Java PortletMode.EDIT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.portlet.PortletMode
的用法示例。
在下文中一共展示了PortletMode.EDIT属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: invoke2c
@Test
public void invoke2c() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet2");
PortletMode mode = PortletMode.EDIT;
req.setMode(mode);
i.renderHeaders(req, resp);
List<String> names = meths.getMethods();
assertNotNull(names);
assertEquals(3, names.size());
List<String> soll = Arrays.asList(new String[] {
Header2.class.getSimpleName() + "#header2c",
Header1.class.getSimpleName() + "#header2b",
Header2.class.getSimpleName() + "#header2d",
});
assertArrayEquals(soll.toArray(), names.toArray());
}
示例2: invoke2c
@Test
public void invoke2c() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet2");
PortletMode mode = PortletMode.EDIT;
req.setMode(mode);
i.render(req, resp);
List<String> names = meths.getMethods();
assertNotNull(names);
assertEquals(3, names.size());
List<String> soll = Arrays.asList(new String[] {
Render2.class.getSimpleName() + "#render2c",
Render1.class.getSimpleName() + "#render2b",
Render2.class.getSimpleName() + "#render2d",
});
assertArrayEquals(soll.toArray(), names.toArray());
}
示例3: getPortletMode
@Override
public PortletMode getPortletMode() {
String meth = "getPortletMode";
Object[] args = {};
PortletMode ret = PortletMode.EDIT;
retVal = ret;
checkArgs(meth, args);
return ret;
}
示例4: test6doEdit
@Test
public void test6doEdit() throws Exception {
List<String> methNames = Arrays.asList(new String[] {
TestPortlet6.class.getSimpleName() + "#doHeaders",
TestPortlet6.class.getSimpleName() + "#doEdit",
});
PortletMode pm = PortletMode.EDIT;
helper.renderWithHeaders("Portlet6", pm, methNames);
assertTrue(meths.isConfigExists());
}
示例5: invoke3c
@Test
public void invoke3c() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet3");
PortletMode mode = PortletMode.EDIT;
req.setMode(mode);
i.render(req, resp);
List<String> names = meths.getMethods();
assertNotNull(names);
assertEquals(1, names.size());
List<String> soll = Arrays.asList(new String[] {
Render1.class.getSimpleName() + "#render3d",
});
assertArrayEquals(soll.toArray(), names.toArray());
}