|
|
|
@ -1,22 +1,46 @@
|
|
|
|
package de.database.nanoleaf;
|
|
|
|
package de.database.nanoleaf;
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
import org.eclnt.editor.annotations.CCGenClass;
|
|
|
|
import org.eclnt.editor.annotations.CCGenClass;
|
|
|
|
|
|
|
|
import org.eclnt.jsfserver.defaultscreens.Statusbar;
|
|
|
|
import org.eclnt.jsfserver.pagebean.PageBean;
|
|
|
|
import org.eclnt.jsfserver.pagebean.PageBean;
|
|
|
|
|
|
|
|
|
|
|
|
import de.tvo.database.tables.NLCONNECT.Nlconnect;
|
|
|
|
import de.tvo.database.tables.NLCONNECT.Nlconnect;
|
|
|
|
import de.tvo.database.tables.NLCONNECT.NlconnectWorker;
|
|
|
|
import de.tvo.database.tables.NLCONNECT.NlconnectWorker;
|
|
|
|
import de.tvo.nanoleaf.enums.NanoTypeEnum;
|
|
|
|
import de.tvo.nanoleaf.enums.NanoTypeEnum;
|
|
|
|
|
|
|
|
|
|
|
|
import org.eclnt.jsfserver.base.faces.event.ActionEvent;
|
|
|
|
|
|
|
|
import org.eclnt.jsfserver.defaultscreens.Statusbar;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@CCGenClass (expressionBase="#{d.CreateConnectionBean}")
|
|
|
|
@CCGenClass (expressionBase="#{d.CreateConnectionBean}")
|
|
|
|
|
|
|
|
|
|
|
|
public class CreateConnectionBean
|
|
|
|
public class CreateConnectionBean
|
|
|
|
extends PageBean
|
|
|
|
extends PageBean
|
|
|
|
implements Serializable
|
|
|
|
implements Serializable
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
public void onLoad(org.eclnt.jsfserver.base.faces.event.ActionEvent event) {
|
|
|
|
|
|
|
|
System.out.println("Load...");
|
|
|
|
|
|
|
|
List<Nlconnect> nlconnectList = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
NlconnectWorker worker = new NlconnectWorker();
|
|
|
|
|
|
|
|
nlconnectList = worker.loadNlconnect();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (nlconnectList != null && nlconnectList.size() > 0) {
|
|
|
|
|
|
|
|
m_nlconnect = nlconnectList.get(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Statusbar.outputWarning("Fehler beim laden!!!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void onClear(org.eclnt.jsfserver.base.faces.event.ActionEvent event) {
|
|
|
|
|
|
|
|
System.out.println("clear");
|
|
|
|
|
|
|
|
m_nlconnect = new Nlconnect();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void onSave(org.eclnt.jsfserver.base.faces.event.ActionEvent event) {
|
|
|
|
public void onSave(org.eclnt.jsfserver.base.faces.event.ActionEvent event) {
|
|
|
|
boolean saved = true;
|
|
|
|
boolean saved = true;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
@ -65,12 +89,14 @@ public class CreateConnectionBean
|
|
|
|
if (getTest()) {
|
|
|
|
if (getTest()) {
|
|
|
|
m_nlconnect = new Nlconnect();
|
|
|
|
m_nlconnect = new Nlconnect();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//m_nlconnect.setNcid(new BigInteger("1"));
|
|
|
|
m_nlconnect.setNchostname("Canvas-72FA.fritz.box");
|
|
|
|
m_nlconnect.setNchostname("Canvas-72FA.fritz.box");
|
|
|
|
m_nlconnect.setNcipadress("192.168.178.141");
|
|
|
|
m_nlconnect.setNcipadress("192.168.178.141");
|
|
|
|
m_nlconnect.setNcport(16021);
|
|
|
|
m_nlconnect.setNcport(16021);
|
|
|
|
m_nlconnect.setNccountpanel(15);
|
|
|
|
m_nlconnect.setNccountpanel(15);
|
|
|
|
m_nlconnect.setNctoken("LAG28BQWrXK2p79NbHMQsvcYYCN1TcD4");
|
|
|
|
m_nlconnect.setNctoken("LAG28BQWrXK2p79NbHMQsvcYYCN1TcD4");
|
|
|
|
m_nlconnect.setNctype(NanoTypeEnum.CANVAS);
|
|
|
|
m_nlconnect.setNctype(NanoTypeEnum.CANVAS);
|
|
|
|
|
|
|
|
m_nlconnect.setNcactiv(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|