1 /*******************************************************************************
2 * Copyright (c) 2016 AT&T Intellectual Property. All rights reserved.
3 *******************************************************************************/
4 package com.att.authz.gui;
6 import java.io.IOException;
8 import org.onap.aaf.inno.env.APIException;
9 import com.att.xgen.Cache;
10 import com.att.xgen.html.HTMLGen;
12 public class Form extends NamedCode {
13 private String preamble;
14 private NamedCode content;
16 public Form(boolean no_cache, NamedCode content) {
17 super(no_cache,content.idattrs());
18 this.content = content;
20 idattrs = content.idattrs();
23 public Form preamble(String preamble) {
24 this.preamble = preamble;
30 public void code(Cache<HTMLGen> cache, HTMLGen hgen) throws APIException, IOException {
32 hgen.incr("p","class=preamble").text(preamble).end();
34 hgen.incr("form","method=post");
36 content.code(cache, hgen);
38 hgen.tagOnly("input", "type=submit", "value=Submit")
39 .tagOnly("input", "type=reset", "value=Reset")
44 * @see com.att.authz.gui.NamedCode#idattrs()
47 public String[] idattrs() {
48 return content.idattrs();