[848] | 1 | package de.dass_it.vanhelsing.gui;
|
---|
| 2 |
|
---|
[857] | 3 | import javax.faces.model.SelectItem;
|
---|
[848] | 4 | import de.dass_it.vanhelsing.gui.items.ItemType;
|
---|
| 5 | import de.dass_it.vanhelsing.gui.items.UserObjectItem;
|
---|
| 6 |
|
---|
| 7 | public class ViewItem extends ItemType implements UserObjectItem {
|
---|
| 8 | private String key;
|
---|
[849] | 9 | private String keyValue;
|
---|
[858] | 10 | private boolean required;
|
---|
[856] | 11 | private String renderer;
|
---|
| 12 | private String dataType;
|
---|
[857] | 13 | private SelectItem[] keyValueList;
|
---|
[862] | 14 |
|
---|
| 15 | private String inputText;
|
---|
| 16 | private String selectOneMenu;
|
---|
| 17 | private String radioGroup;
|
---|
| 18 |
|
---|
[848] | 19 | public ViewItem(){
|
---|
[856] | 20 | inputText = null;
|
---|
| 21 | selectOneMenu = null;
|
---|
[862] | 22 | radioGroup = null;
|
---|
[848] | 23 | }
|
---|
| 24 |
|
---|
[858] | 25 | public boolean getRequired() {
|
---|
| 26 | return required;
|
---|
[856] | 27 | }
|
---|
| 28 |
|
---|
[858] | 29 | public void setRequired(boolean required) {
|
---|
| 30 | this.required = required;
|
---|
[856] | 31 | }
|
---|
| 32 |
|
---|
| 33 | public String getRenderer() {
|
---|
| 34 | return renderer;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | public void setRenderer(String renderer) {
|
---|
| 38 | this.renderer = renderer;
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | public String getDataType() {
|
---|
| 42 | return dataType;
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | public void setDataType(String dataType) {
|
---|
| 46 | this.dataType = dataType;
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 |
|
---|
[848] | 50 | //Methoden aus ItemType für die Zuordnung von Änderungen
|
---|
| 51 | public int getResId(){
|
---|
| 52 | return super.getResId();
|
---|
| 53 | }
|
---|
| 54 | public void setResId(int id){
|
---|
| 55 | super.setResId(id);
|
---|
| 56 | }
|
---|
| 57 | public String getResType(){
|
---|
| 58 | return super.getResType();
|
---|
| 59 | }
|
---|
| 60 | public void setResType(String resType){
|
---|
| 61 | super.setResType(resType);
|
---|
| 62 | }
|
---|
| 63 | //eigene Felder für die Tabellenspalten
|
---|
| 64 | public void setKey(String key) {
|
---|
| 65 | this.key = key;
|
---|
| 66 | }
|
---|
| 67 |
|
---|
| 68 | public String getKey() {
|
---|
| 69 | return key;
|
---|
| 70 | }
|
---|
| 71 |
|
---|
[849] | 72 | public String getKeyValue() {
|
---|
| 73 | return keyValue;
|
---|
[848] | 74 | }
|
---|
| 75 |
|
---|
[849] | 76 | public void setKeyValue(String keyValue) {
|
---|
| 77 | this.keyValue = keyValue;
|
---|
[848] | 78 | }
|
---|
[856] | 79 |
|
---|
| 80 | public void setInputText(String inputText) {
|
---|
| 81 | this.inputText = inputText;
|
---|
| 82 | }
|
---|
| 83 |
|
---|
| 84 | public String getInputText() {
|
---|
| 85 | return inputText;
|
---|
| 86 | }
|
---|
| 87 |
|
---|
| 88 | public void setSelectOneMenu(String selectOneMenu) {
|
---|
| 89 | this.selectOneMenu = selectOneMenu;
|
---|
| 90 | }
|
---|
| 91 |
|
---|
| 92 | public String getSelectOneMenu() {
|
---|
| 93 | return selectOneMenu;
|
---|
| 94 | }
|
---|
[858] | 95 |
|
---|
[856] | 96 | public void setRendererFlag(String r){
|
---|
| 97 | if (r.equals("inputText")) {
|
---|
| 98 | this.inputText = new String("bernd");
|
---|
| 99 | }
|
---|
| 100 | if (r.equals("selectOneMenu")){
|
---|
[857] | 101 | this.selectOneMenu = new String("bernd"); //null;
|
---|
| 102 | }
|
---|
| 103 | if (r.equals("radioGroup")){
|
---|
| 104 | this.radioGroup = new String("bernd");
|
---|
[856] | 105 | }
|
---|
| 106 | }
|
---|
[857] | 107 |
|
---|
| 108 | public SelectItem[] getKeyValueList() {
|
---|
| 109 | return keyValueList;
|
---|
| 110 | }
|
---|
| 111 |
|
---|
| 112 | public void setKeyValueList(SelectItem[] keyValueList) {
|
---|
| 113 | this.keyValueList = keyValueList;
|
---|
| 114 | }
|
---|
[848] | 115 | }
|
---|