当前位置: 首页>>代码示例>>Java>>正文


Java Head类代码示例

本文整理汇总了Java中com.webfirmframework.wffweb.tag.html.metainfo.Head的典型用法代码示例。如果您正苦于以下问题:Java Head类的具体用法?Java Head怎么用?Java Head使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Head类属于com.webfirmframework.wffweb.tag.html.metainfo包,在下文中一共展示了Head类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testFindOneTagAssignableToTagThrowsInvalidTagException

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test (expected = InvalidTagException.class)
public void testFindOneTagAssignableToTagThrowsInvalidTagException() {
    Html html = new Html(null) {{
        new Head(this) {{
            new TitleTag(this){{
                new NoTag(this, "some title");
            }};
        }};
        new Body(this, new Id("one")) {{
            new Div(this);
        }};
    }}; 
    html.appendChild(new Div(null));
    
    TagRepository.findOneTagAssignableToTag(NoTag.class, html);
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:17,代码来源:TagRepositoryTest.java

示例2: testFindOneTagAssignableToTagThrowsInvalidTagException2

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test (expected = InvalidTagException.class)
public void testFindOneTagAssignableToTagThrowsInvalidTagException2() {
    Html html = new Html(null) {{
        new Head(this) {{
            new TitleTag(this){{
                new NoTag(this, "some title");
            }};
        }};
        new Body(this, new Id("one")) {{
            new Div(this);
        }};
    }}; 
    html.appendChild(new Div(null));
    
    TagRepository.findOneTagAssignableToTag(Blank.class, html);
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:17,代码来源:TagRepositoryTest.java

示例3: testContainsWithNotRenderedException

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test(expected = NotRenderedException.class)
public void testContainsWithNotRenderedException() {
    
    final Div div = new Div(null);
    
    BrowserPage browserPage = new BrowserPage() {
        
        @Override
        public String webSocketUrl() {
            return "wss://webfirmframework.com/ws-con";
        }
        
        @Override
        public AbstractHtml render() {
            Html html = new Html(null) {
                {
                    new Head(this);
                    new Body(this).appendChild(div);
                }
            };
            html.setPrependDocType(true);
            return html;
        }
    };
    Assert.assertFalse(browserPage.contains(div));
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:27,代码来源:BrowserPageTest.java

示例4: testContainsWithNullValueException

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test(expected = NullValueException.class)
public void testContainsWithNullValueException() {
    
    BrowserPage browserPage = new BrowserPage() {
        
        @Override
        public String webSocketUrl() {
            return "wss://webfirmframework.com/ws-con";
        }
        
        @Override
        public AbstractHtml render() {
            Html html = new Html(null) {
                {
                    new Head(this);
                    new Body(this);
                }
            };
            html.setPrependDocType(true);
            return html;
        }
    };
    @SuppressWarnings("unused")
    String toHtmlString = browserPage.toHtmlString();
    Assert.assertFalse(browserPage.contains(null));
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:27,代码来源:BrowserPageTest.java

示例5: testMetaInfoTags

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test
public void testMetaInfoTags() throws Exception {
    final Div div = new Div(null, new Id("1")) {
        /**
         *
         */
        private static final long serialVersionUID = 1L;
        Br br = new Br(this);
        Link link = new Link(this);
        Meta meta = new Meta(this);
        Div div = new Div(this, new Id("2"));
        Head head = new Head(null);
        Base base = new Base(null);

    };
    final String expectedString = "<div id=\"1\"><br/><link/><meta/><div id=\"2\"></div></div>";
   assertEquals(expectedString, div.toHtmlString());
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:19,代码来源:TagPrintTest.java

示例6: develop

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
private void develop() {

		new Head(this) {{
			new TitleTag(this) {{
				new NoTag(this, "Bootstrap Example");
			}};
			new Meta(this,
				new Charset("utf-8"));
			new Meta(this,
				new Name("viewport"),
				new Content("width=device-width, initial-scale=1"));
			new Link(this,
				new Rel("stylesheet"),
				new Href("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"));
			new Script(this,
				new Src("https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"));
			new Script(this,
				new Src("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"));
		}};
		
		new Body(this) {{
			
			new Div(this, new Id("mainDivId")) {{
				new NoTag(this, "The content of the document...... ");
				new Button(this, new OnClick(IndexPageLayout.this)) {{
					new NoTag(this, "Insert SampleTemplate1");
				}};
				new Br(this);
				new Br(this);
			}};
			
		}};
		
	}
 
开发者ID:webfirmframework,项目名称:tomcat-8-wffweb-demo-apps,代码行数:35,代码来源:IndexPageLayout.java

示例7: develop

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
private void develop() {

        new Head(this) {
            {
                new TitleTag(this) {
                    {
                        new NoTag(this, "Server Log");
                    }
                };
            }
        };

        body = new Body(this, new Style("background:white"));

    }
 
开发者ID:webfirmframework,项目名称:tomcat-8-wffweb-demo-apps,代码行数:16,代码来源:ServerLogPageLayout.java

示例8: testFindAttributesByTagName

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test
public void testFindAttributesByTagName() {
    
    
    final Set<AbstractAttribute> attributes = new HashSet<AbstractAttribute>();
    
    final Id idTwo = new Id("two");
    final Name name = new Name("name");
    
    attributes.add(idTwo);
    attributes.add(name);
    
    
    Html html = new Html(null) {{
        new Head(this);
        new Body(this, new Id("one")) {{
            new Div(this, idTwo, name) {{
                new NoTag(this, "\nsamplediv ");
                new Div(this);
            }};
        }};
    }};
    
    final Collection<AbstractAttribute> attributesByTagName = TagRepository.findAttributesByTagName(TagNameConstants.DIV, html);
    Assert.assertTrue(attributesByTagName.size() == attributes.size());
    
    for (AbstractAttribute attr : attributes) {
        Assert.assertTrue(attributesByTagName.contains(attr));
    }
    
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:32,代码来源:TagRepositoryTest.java

示例9: testUpsertWffBMObjectInvalidTagException

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test (expected = InvalidTagException.class)
public void testUpsertWffBMObjectInvalidTagException() {
    BrowserPage browserPage = new BrowserPage() {
        
        @Override
        public String webSocketUrl() {
            return "wss://socketurl";
        }
        
        @Override
        public AbstractHtml render() {
            Html html = new Html(null) {{
                new Head(this) {{
                    new TitleTag(this){{
                        new NoTag(this, "some title");
                    }};
                }};
                new Body(this, new Id("one")) {{
                    new Div(this);
                }};
            }}; 
            return html;
        }
    };
    browserPage.toHtmlString();
    TagRepository tagRepository = browserPage.getTagRepository();
    tagRepository.upsert(new NoTag(null, "test"), "somekey", new WffBMObject());
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:29,代码来源:TagRepositoryTest.java

示例10: testUpsertWffBMArrayInvalidTagException

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test (expected = InvalidTagException.class)
public void testUpsertWffBMArrayInvalidTagException() {
    BrowserPage browserPage = new BrowserPage() {
        
        @Override
        public String webSocketUrl() {
            return "wss://socketurl";
        }
        
        @Override
        public AbstractHtml render() {
            Html html = new Html(null) {{
                new Head(this) {{
                    new TitleTag(this){{
                        new NoTag(this, "some title");
                    }};
                }};
                new Body(this, new Id("one")) {{
                    new Div(this);
                }};
            }}; 
            return html;
        }
    };
    browserPage.toHtmlString();
    TagRepository tagRepository = browserPage.getTagRepository();
    tagRepository.upsert(new NoTag(null, "test"), "somekey", new WffBMArray(BMValueType.STRING));
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:29,代码来源:TagRepositoryTest.java

示例11: testDeleteWffBMObjectOrArrayInvalidTagException

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test (expected = InvalidTagException.class)
public void testDeleteWffBMObjectOrArrayInvalidTagException() {
    BrowserPage browserPage = new BrowserPage() {
        
        @Override
        public String webSocketUrl() {
            return "wss://socketurl";
        }
        
        @Override
        public AbstractHtml render() {
            Html html = new Html(null) {{
                new Head(this) {{
                    new TitleTag(this){{
                        new NoTag(this, "some title");
                    }};
                }};
                new Body(this, new Id("one")) {{
                    new Div(this);
                }};
            }}; 
            return html;
        }
    };
    browserPage.toHtmlString();
    TagRepository tagRepository = browserPage.getTagRepository();
    tagRepository.delete(new NoTag(null, "test"), "somekey");
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:29,代码来源:TagRepositoryTest.java

示例12: testUpsertWffBMObjectInvalidTagException1

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test (expected = InvalidTagException.class)
public void testUpsertWffBMObjectInvalidTagException1() {
    BrowserPage browserPage = new BrowserPage() {
        
        @Override
        public String webSocketUrl() {
            return "wss://socketurl";
        }
        
        @Override
        public AbstractHtml render() {
            Html html = new Html(null) {{
                new Head(this) {{
                    new TitleTag(this){{
                        new NoTag(this, "some title");
                    }};
                }};
                new Body(this, new Id("one")) {{
                    new Div(this);
                }};
            }}; 
            return html;
        }
    };
    browserPage.toHtmlString();
    TagRepository tagRepository = browserPage.getTagRepository();
    tagRepository.upsert(new Blank(null, "test"), "somekey", new WffBMObject());
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:29,代码来源:TagRepositoryTest.java

示例13: testUpsertWffBMArrayInvalidTagException1

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test (expected = InvalidTagException.class)
public void testUpsertWffBMArrayInvalidTagException1() {
    BrowserPage browserPage = new BrowserPage() {
        
        @Override
        public String webSocketUrl() {
            return "wss://socketurl";
        }
        
        @Override
        public AbstractHtml render() {
            Html html = new Html(null) {{
                new Head(this) {{
                    new TitleTag(this){{
                        new NoTag(this, "some title");
                    }};
                }};
                new Body(this, new Id("one")) {{
                    new Div(this);
                }};
            }}; 
            return html;
        }
    };
    browserPage.toHtmlString();
    TagRepository tagRepository = browserPage.getTagRepository();
    tagRepository.upsert(new Blank(null, "test"), "somekey", new WffBMArray(BMValueType.STRING));
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:29,代码来源:TagRepositoryTest.java

示例14: testDeleteWffBMObjectOrArrayInvalidTagException1

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test (expected = InvalidTagException.class)
public void testDeleteWffBMObjectOrArrayInvalidTagException1() {
    BrowserPage browserPage = new BrowserPage() {
        
        @Override
        public String webSocketUrl() {
            return "wss://socketurl";
        }
        
        @Override
        public AbstractHtml render() {
            Html html = new Html(null) {{
                new Head(this) {{
                    new TitleTag(this){{
                        new NoTag(this, "some title");
                    }};
                }};
                new Body(this, new Id("one")) {{
                    new Div(this);
                }};
            }}; 
            return html;
        }
    };
    browserPage.toHtmlString();
    TagRepository tagRepository = browserPage.getTagRepository();
    tagRepository.delete(new Blank(null, "test"), "somekey");
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:29,代码来源:TagRepositoryTest.java

示例15: testFindOneTagAssignableToTag

import com.webfirmframework.wffweb.tag.html.metainfo.Head; //导入依赖的package包/类
@Test
public void testFindOneTagAssignableToTag() {
    Html html = new Html(null) {{
        new Head(this) {{
            new TitleTag(this){{
                new NoTag(this, "some title");
            }};
        }};
        new Body(this, new Id("one")) {{
            new Div(this);
        }};
    }}; 
    html.appendChild(new Div(null));
    
    AbstractHtml abstractHtml = TagRepository.findOneTagAssignableToTag(AbstractHtml.class, html);
    Assert.assertNotNull(abstractHtml);
    Assert.assertNotNull(abstractHtml.toHtmlString());
    
    Head head = TagRepository.findOneTagAssignableToTag(Head.class, html);
    Assert.assertNotNull(head);
    Assert.assertNotNull(head.toHtmlString());
    
    TitleTag titleTag = TagRepository.findOneTagAssignableToTag(TitleTag.class, html);
    Assert.assertNotNull(titleTag);
    Assert.assertNotNull(titleTag.toHtmlString());
    
    Assert.assertEquals("<title>some title</title>", titleTag.toHtmlString());
    
    Body body = TagRepository.findOneTagAssignableToTag(Body.class, html);
    Assert.assertNotNull(body);
    Assert.assertNotNull(body.toHtmlString());
    
    Div div = TagRepository.findOneTagAssignableToTag(Div.class, html);
    Assert.assertNotNull(div);
    Assert.assertNotNull(div.toHtmlString());
    
    Span span = TagRepository.findOneTagAssignableToTag(Span.class, html);
    Assert.assertNull(span);
    
}
 
开发者ID:webfirmframework,项目名称:wff,代码行数:41,代码来源:TagRepositoryTest.java


注:本文中的com.webfirmframework.wffweb.tag.html.metainfo.Head类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。