Skip to content

Instantly share code, notes, and snippets.

View webfirmframework's full-sized avatar
🔐
wffweb-12.0.0 is released

Web Firm Framework webfirmframework

🔐
wffweb-12.0.0 is released
View GitHub Profile
@webfirmframework
webfirmframework / SamplePageCssFile.java
Created November 20, 2015 20:48
SamplePageCssFile in wffweb
import java.util.Set;
import com.webfirmframework.wffweb.css.BackgroundColor;
import com.webfirmframework.wffweb.css.Border;
import com.webfirmframework.wffweb.css.BorderBottom;
import com.webfirmframework.wffweb.css.BorderTop;
import com.webfirmframework.wffweb.css.Bottom;
import com.webfirmframework.wffweb.css.Clear;
import com.webfirmframework.wffweb.css.Color;
import com.webfirmframework.wffweb.css.CssLengthUnit;
@webfirmframework
webfirmframework / SamplePageCssFile.css
Created November 20, 2015 21:08
css file generated by SamplePageCssFile.java
html {
box-sizing: border-box;
padding: 0px 20px;
}
*,
*:before,
*:after {
box-sizing: inherit;
padding: 20px;
font-family: "Open Sans", sans-serif;
/*
* Copyright 2014-2016 Web Firm Framework
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/**
* This file is contributed by one of the wffweb users but he doesn't like to publish his name.
*/
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import com.webfirmframework.wffweb.css.FontFamily;
import com.webfirmframework.wffweb.css.FontStyle;
import com.webfirmframework.wffweb.css.FontWeight;
@webfirmframework
webfirmframework / SampleFormTemplate.java
Last active January 31, 2018 15:46
Sample form submit java code, refer https://webfirmframework.github.io for developers guide
import java.util.logging.Logger;
import com.webfirmframework.wffweb.tag.html.AbstractHtml;
import com.webfirmframework.wffweb.tag.html.Br;
import com.webfirmframework.wffweb.tag.html.attribute.Checked;
import com.webfirmframework.wffweb.tag.html.attribute.Name;
import com.webfirmframework.wffweb.tag.html.attribute.Type;
import com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute;
import com.webfirmframework.wffweb.tag.html.attribute.event.ServerAsyncMethod;
import com.webfirmframework.wffweb.tag.html.attribute.event.form.OnSubmit;
@webfirmframework
webfirmframework / TagRepositoryStaticMethodsUsage.java
Last active January 31, 2018 15:46
Usage of static methods in TagRepository class. It doesn't contain all of the methods usage. It will be updated later.
import java.util.Collection;
import com.webfirmframework.wffweb.tag.html.Body;
import com.webfirmframework.wffweb.tag.html.Br;
import com.webfirmframework.wffweb.tag.html.Html;
import com.webfirmframework.wffweb.tag.html.TagNameConstants;
import com.webfirmframework.wffweb.tag.html.TitleTag;
import com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute;
import com.webfirmframework.wffweb.tag.html.attribute.global.Id;
@webfirmframework
webfirmframework / SharedDataOnTagUsage.java
Last active October 2, 2019 02:43
Example of getSharedData and setSharedData methods on a tag
import com.webfirmframework.wffweb.tag.html.Body;
import com.webfirmframework.wffweb.tag.html.Html;
import com.webfirmframework.wffweb.tag.html.TitleTag;
import com.webfirmframework.wffweb.tag.html.attribute.global.Id;
import com.webfirmframework.wffweb.tag.html.metainfo.Head;
import com.webfirmframework.wffweb.tag.html.stylesandsemantics.Div;
import com.webfirmframework.wffweb.tag.htmlwff.NoTag;
import com.webfirmframework.wffweb.tag.repository.TagRepository;
public class SharedDataOnTagUsage {
@webfirmframework
webfirmframework / RootTagOnTagUsage.java
Last active October 2, 2019 02:47
Example for getRootTag method on a tag
import com.webfirmframework.wffweb.tag.html.Body;
import com.webfirmframework.wffweb.tag.html.Html;
import com.webfirmframework.wffweb.tag.html.TitleTag;
import com.webfirmframework.wffweb.tag.html.attribute.global.Id;
import com.webfirmframework.wffweb.tag.html.metainfo.Head;
import com.webfirmframework.wffweb.tag.html.stylesandsemantics.Div;
import com.webfirmframework.wffweb.tag.htmlwff.NoTag;
import com.webfirmframework.wffweb.tag.repository.TagRepository;
public class RootTagOnTagUsage {
@webfirmframework
webfirmframework / StatefulInput.java
Created January 31, 2018 08:35
Example for Sateful input field which syncs the value state to the server on change value event.
import com.webfirmframework.wffweb.tag.html.AbstractHtml;
import com.webfirmframework.wffweb.tag.html.attribute.AttributeNameConstants;
import com.webfirmframework.wffweb.tag.html.attribute.Value;
import com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute;
import com.webfirmframework.wffweb.tag.html.attribute.event.form.OnChange;
import com.webfirmframework.wffweb.tag.html.formsandinputs.Input;
public class StatefulInput extends Input {
@webfirmframework
webfirmframework / GetGeolocationExample.java
Last active March 9, 2023 12:42
Sample code to get geolocation at server side
package com.webfirmframework.samplecode.component;
import com.webfirmframework.wffweb.tag.html.attribute.event.mouse.OnClick;
import com.webfirmframework.wffweb.tag.html.formsandinputs.Button;
import com.webfirmframework.wffweb.tag.html.stylesandsemantics.Div;
import com.webfirmframework.wffweb.tag.htmlwff.TagContent;
public class GetGeolocationExample extends Div {
public GetGeolocationExample() {