no.tornado.web.html.Submit Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of web Show documentation
Show all versions of web Show documentation
A modern HTML5 Full Stack Web Framework that leverages Java 8 features for expressiveness and beautiful syntax.
The newest version!
package no.tornado.web.html;
import no.tornado.web.engine.SubmitAction;
import no.tornado.web.exceptions.ConversionFailed;
/**
* Submit class.
*
* @author edvin
* @version $Id: $Id
*/
public class Submit extends Input {
private SubmitAction onsubmit;
/**
* Constructor for Submit.
*
* @param property a {@link java.lang.String} object.
* @param onsubmit a {@link no.tornado.web.engine.SubmitAction} object.
*/
public Submit(String property, SubmitAction onsubmit) {
super("submit", property);
attr("value", getString(property)); // TODO: Bestemme resource bundle denne skal hentes fra, controller kanskje? Tilgjengelig i Conversation
onsubmit(onsubmit);
}
public void store(X object) {
super.store(object);
}
/**
* Constructor for Submit.
*
* @param property a {@link java.lang.String} object.
*/
public Submit(String property) {
this(property, null);
}
/**
* onsubmit.
*
* @param onsubmit a {@link no.tornado.web.engine.SubmitAction} object.
* @return a {@link no.tornado.web.html.Submit} object.
*/
public Submit onsubmit(SubmitAction onsubmit) {
this.onsubmit = onsubmit;
return this;
}
/**
* onsubmit.
*
* @return a {@link no.tornado.web.engine.SubmitAction} object.
*/
public SubmitAction onsubmit() {
return this.onsubmit;
}
}