Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h:body>
- <p:messages autoUpdate="true"/>
- <h:form id="mainform">
- <p:commandButton id="button1"
- value="Configuração">
- <p:ajax listener="#{config.carregaSbcDevices}" update="panelAU"/>
- </p:commandButton>
- <p:outputPanel autoUpdate="true" id="panelAU">
- <p:selectOneMenu value="#{config.configSCBEsc}">
- <f:selectItem itemLabel="Selecione..." itemValue="" />
- <f:selectItems value="#{config.devicesName}" />
- </p:selectOneMenu>
- </p:outputPanel>
- </h:form>
- </h:body>
- public void carregaSbcDevices() {
- if(this.devices == null) this.devices = new ArrayList<>();
- this.devices.clear();
- if(this.devicesName == null) this.devicesName = new ArrayList<>();
- this.devicesName.clear();
- session.getDevices(this.devices);
- for(SBCDevices device : this.devices) {
- this.devicesName.add(device.getTargetName());
- }
- System.out.println("Numero: " + this.devicesName.size());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement