Changeset 856 for vanHelsing/trunk/gui/src/de/dass_it/vanhelsing
- Timestamp:
- Apr 1, 2010, 2:06:38 PM (15 years ago)
- Location:
- vanHelsing/trunk/gui/src/de/dass_it/vanhelsing/gui
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
vanHelsing/trunk/gui/src/de/dass_it/vanhelsing/gui/BeanUtil.java
r848 r856 1 1 package de.dass_it.vanhelsing.gui; 2 2 3 4 5 import javax.faces.application.FacesMessage; 6 import javax.faces.application.FacesMessage.Severity; 3 7 import javax.faces.context.FacesContext; 8 import javax.faces.model.SelectItem; 9 import java.util.ResourceBundle; 10 4 11 5 12 … … 17 24 18 25 //Messagebundles 26 27 28 //Statusmeldungen an den Client 29 public static void setInfoMessage(String client, String message){ 30 FacesContext.getCurrentInstance().addMessage(client, new FacesMessage(FacesMessage.SEVERITY_INFO, message, message)); 31 } 32 public static void setErrorMessage(String client, String message){ 33 FacesContext.getCurrentInstance().addMessage(client, new FacesMessage(FacesMessage.SEVERITY_ERROR, message, message)); 34 } 19 35 20 36 //Linkout to Bacula documentation … … 27 43 return (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(name); 28 44 } 45 29 46 } -
vanHelsing/trunk/gui/src/de/dass_it/vanhelsing/gui/ConfigurationBean.java
r854 r856 96 96 String Id = BeanUtil.getRequestParameter("userObject.resId"); 97 97 node = getNode(Id, tree); 98 Validation validation = new Validation(); 98 99 String type = ((UserObjectItem) ((UserObjectItemType) node 99 100 .getUserObject()).getUserObject()).getResType(); … … 107 108 UserObjectItem item = ((UserObjectItemType) (node.getUserObject())) 108 109 .getUserObject(); 109 110 110 Class c = ((UserObjectItemType) (node.getUserObject())) 111 111 .getUserObject().getClass(); … … 127 127 vi.setResName(resName); 128 128 vi.setDirector(director); 129 if (type.equals("Client") && 1 == 0){ 130 131 vi.setRendererFlag(validation.getRenderer(classType+":"+key)); 132 vi.setNecessary(validation.getNecessary(classType+":"+key)); 133 } 129 134 selectedObject.add(vi); 130 135 } … … 136 141 } 137 142 public void newResourceButtonListener(ActionEvent ae){ 143 138 144 } 139 145 … … 160 166 s2r.setResInfo(ri); 161 167 s2r2 = c.setSimpleResource(s2r); 168 System.err.println("Status setSimpleRes: "+s2r2.getStatus()); 169 BeanUtil.setErrorMessage(null, "Status setSimpleRessource: "+s2r2.getStatus()); 170 162 171 /*String status = s2r2.getStatus(); 163 172 if (selectedObject.get(0) != null){ -
vanHelsing/trunk/gui/src/de/dass_it/vanhelsing/gui/TreeNavigation.java
r854 r856 27 27 UserObjectItemType item = new UserObjectItemType(root); 28 28 item.setLeaf(false); 29 item.setExpanded(true); 29 30 UserObjectItem uoi = new TreeItem("Configuration"); 30 31 uoi.setResType("Tree"); -
vanHelsing/trunk/gui/src/de/dass_it/vanhelsing/gui/ViewItem.java
r849 r856 3 3 import de.dass_it.vanhelsing.gui.items.ItemType; 4 4 import de.dass_it.vanhelsing.gui.items.UserObjectItem; 5 import de.dass_it.vanhelsing.gui.ValidationItem.*; 5 6 6 7 public class ViewItem extends ItemType implements UserObjectItem { 7 8 private String key; 8 9 private String keyValue; 10 private String inputText; 11 private String selectOneMenu; 12 private boolean necessary; 13 private String renderer; 14 private String dataType; 15 16 public ViewItem(){ 17 inputText = null; 18 selectOneMenu = null; 19 } 20 21 public boolean isNecessary() { 22 return necessary; 23 } 9 24 10 public ViewItem(){ 25 public void setNecessary(boolean necessary) { 26 this.necessary = necessary; 11 27 } 28 29 public String getRenderer() { 30 return renderer; 31 } 32 33 public void setRenderer(String renderer) { 34 this.renderer = renderer; 35 } 36 37 public String getDataType() { 38 return dataType; 39 } 40 41 public void setDataType(String dataType) { 42 this.dataType = dataType; 43 } 44 12 45 13 46 //Methoden aus ItemType für die Zuordnung von Änderungen … … 40 73 this.keyValue = keyValue; 41 74 } 75 76 public void setInputText(String inputText) { 77 this.inputText = inputText; 78 } 79 80 public String getInputText() { 81 return inputText; 82 } 83 84 public void setSelectOneMenu(String selectOneMenu) { 85 this.selectOneMenu = selectOneMenu; 86 } 87 88 public String getSelectOneMenu() { 89 return selectOneMenu; 90 } 91 public void setRendererFlag(String r){ 92 if (r.equals("inputText")) { 93 this.inputText = new String("bernd"); 94 this.selectOneMenu = null; 95 } 96 if (r.equals("selectOneMenu")){ 97 this.selectOneMenu = new String ("bernd"); 98 this.inputText = null; 99 } 100 } 42 101 }
Note:
See TracChangeset
for help on using the changeset viewer.