- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.github.bordertech.wcomponents.WText.<init>()
方法的一些代码示例,展示了WText.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WText.<init>()
方法的具体详情如下:
包路径:com.github.bordertech.wcomponents.WText
类名称:WText
方法名:<init>
[英]Creates an empty WText.
[中]
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-addons-table
/**
* @param label the column label
*/
public AbstractTableColumn(final String label) {
this(null, label, new WText(), null);
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* Creates a decorated label with a WText as the body content, containing the given text.
*
* @param text the label's text, using {@link MessageFormat} syntax.
* @param args optional arguments for the message format string.
*/
public WDecoratedLabel(final String text, final Serializable... args) {
this(null, new WText(text, args), null);
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-examples
/**
* Creates a BoxComponent with the specified text.
*
* @param text the text to display in the box.
*/
BoxComponent(final String text) {
super(WPanel.Type.BOX);
add(new WText(text));
}
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* Creates a new WMenuItem with the specified text.
*
* @param text the menu item's text.
*/
public WMenuItem(final String text) {
this(new WDecoratedLabel());
label.setBody(new WText(text));
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testRendererCorrectlyConfigured() {
WText text = new WText();
Assert.assertTrue("Incorrect renderer supplied",
getWebXmlRenderer(text) instanceof WTextRenderer);
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test(expected = IllegalArgumentException.class)
public void testAddComponentTagAlreadyAdded() {
WTemplate template = new WTemplate();
template.addTaggedComponent("tag", new WText());
template.addTaggedComponent("tag", new WText());
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* @param content the test content
*/
public TestComp(final String content) {
WText text = new WText(content);
text.setEncodeText(false);
add(text);
}
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testXssEscaping() throws IOException, SAXException, XpathException {
WCollapsible collapsible = new WCollapsible(new WText("dummy"), getMaliciousContent(),
WCollapsible.CollapsibleMode.CLIENT);
assertSafeContent(collapsible);
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testNoSanitizeOnOutput() {
String input = "<form>content</form>";
WText text = new WText(input);
text.setEncodeText(false);
Assert.assertEquals("Expect output to not be sanitized", input, text.getText());
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test(expected = SystemException.class)
public void testRenderToHtmlWithPlainText() {
String msg = "Test error message";
WText text = new WText(msg);
// Text will fail as it is not valid XML
String output = WebUtilities.renderWithTransformToHTML(new MockRequest(), text, false);
Assert.assertEquals("Invalid html output returned", msg, output);
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testDoRenderDynamicCollapse() throws IOException, SAXException, XpathException {
WCollapsible collapsible = new WCollapsible(new WText(COLLAPSIBLE_CONTENT),
COLLAPSIBLE_HEADING, WCollapsible.CollapsibleMode.DYNAMIC);
assertSchemaMatch(collapsible);
assertXpathEvaluatesTo("dynamic", "//ui:collapsible/@mode", collapsible);
assertRenderContentCorrectly(collapsible, false, true);
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testMarginAccessors() {
WCollapsible collapsible = new WCollapsible(new WText(""), "",
WCollapsible.CollapsibleMode.CLIENT);
assertAccessorsCorrect(collapsible, "margin", null, new Margin(1), new Margin(2));
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testXssEscaping() throws IOException, SAXException, XpathException {
WFigure figure = new WFigure(new WText(getMaliciousContent()), getMaliciousContent());
assertSafeContent(figure);
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testConstructor2() {
WText wText = new WText("sample text");
WButton trigger = new WButton("trigger");
WDialog dialog = new WDialog(wText, trigger);
Assert.assertEquals("Content should be set", wText, dialog.getContent());
Assert.assertEquals("Trigger should be set", trigger, dialog.getTrigger());
Assert.assertTrue("Has trigger should be true", dialog.hasLegacyTriggerButton());
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* Creates a new tabset with all the tab types.
*
* @return a new tabset with content.
*/
private static WTabSet createTabSet() {
WTabSet tabSet = new WTabSet();
for (WTabSet.TabMode mode : WTabSet.TabMode.values()) {
tabSet.addTab(new WText(mode + " content"), mode + " tab", mode);
}
return tabSet;
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testRenderToHtmlWithXML() {
WText text = new WText(TransformXMLTestHelper.TEST_XML);
text.setEncodeText(false);
// Dont use PageShell as it wraps the XML with ui:root and test xslt does not pass the other tags
String output = WebUtilities.renderWithTransformToHTML(new MockRequest(), text, false);
Assert.assertEquals("Invalid html output with XML", TransformXMLTestHelper.EXPECTED, output);
}
@Test
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testGetGroupName() {
WCollapsible collapsible = new WCollapsible(new WText(""), "");
Assert.assertEquals("Incorrect group name", collapsible.getId(), collapsible.getGroupName());
CollapsibleGroup group = new CollapsibleGroup();
collapsible.setGroup(group);
Assert.
assertEquals("Incorrect group name", group.getGroupName(), collapsible.
getGroupName());
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testGetTabLabel() {
final String labelText = "this is a label";
WContainer component = new WContainer();
component.add(new WText("this is some text"));
WDecoratedLabel label = new WDecoratedLabel(labelText);
WTab tab = new WTab(component, label, WTabSet.TabMode.CLIENT);
Assert.assertEquals("should get decorated label set in constructor", label, tab.
getTabLabel());
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* @return a simple WList for use in this test.
*/
private static WList createSampleWList() {
WText nameRenderer = new WText();
nameRenderer.setBeanProperty("name");
WList list = new WList(WList.Type.STACKED);
list.setSeparator(WList.Separator.DOT);
list.setRenderBorder(false);
list.setRepeatedComponent(nameRenderer);
return list;
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* @param template the template to setup
*/
private void setupTemplate(final WTemplate template) {
template.setIdName(TEST_ID);
template.addTaggedComponent("child1", new WText(CHILD_TEXT));
template.addParameter("mytest", PARAMETER_TEXT);
template.setBean(new TestBean(FIRST_NAME, LAST_NAME));
}
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities类的一些代码示例,展示了WebUtilities类的具体用法。这些代码示例主要来源于Gi
本文整理了Java中com.github.bordertech.wcomponents.WText类的一些代码示例,展示了WText类的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getParentNamingContext()方法的一些代码示例,展示了WebUti
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.render()方法的一些代码示例,展示了WebUtilities.render()的
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getContextForComponent()方法的一些代码示例,展示了WebUti
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.doubleEncodeBrackets()方法的一些代码示例,展示了WebUtili
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.percentEncodeUrl()方法的一些代码示例,展示了WebUtilities
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getPath()方法的一些代码示例,展示了WebUtilities.getPath(
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getClosestOfClass()方法的一些代码示例,展示了WebUtilitie
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.renderWithTransformToHTML()方法的一些代码示例,展示了Web
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.doubleDecodeBrackets()方法的一些代码示例,展示了WebUtili
本文整理了Java中com.github.bordertech.wcomponents.WText.setEncodeText()方法的一些代码示例,展示了WText.setEncodeText()的
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.escapeForUrl()方法的一些代码示例,展示了WebUtilities.esc
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.encode()方法的一些代码示例,展示了WebUtilities.encode()的
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getComponentById()方法的一些代码示例,展示了WebUtilities
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.generateRandom()方法的一些代码示例,展示了WebUtilities.g
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getProjectVersion()方法的一些代码示例,展示了WebUtilitie
本文整理了Java中com.github.bordertech.wcomponents.WText.getData()方法的一些代码示例,展示了WText.getData()的具体用法。这些代码示例主
本文整理了Java中com.github.bordertech.wcomponents.WText.getParent()方法的一些代码示例,展示了WText.getParent()的具体用法。这些代
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getAncestorOfClass()方法的一些代码示例,展示了WebUtiliti
我是一名优秀的程序员,十分优秀!