Пример #1
0
 public JSONObject toJSON() {
   JSONObject spec = new JSONObject();
   try {
     spec.put("x", x);
     spec.put("y", y);
   } catch (JSONException ex) {
     LoggerService.log(ex);
   }
   return spec;
 }
Пример #2
0
 public void redirect(String location) {
   try {
     FacesContext ctx = FacesContext.getCurrentInstance();
     ExternalContext extContext = ctx.getExternalContext();
     String url =
         extContext.encodeActionURL(
             ctx.getApplication().getViewHandler().getActionURL(ctx, location));
     extContext.redirect(url);
   } catch (IOException ex) {
     LoggerService.log(ex);
   } catch (java.lang.IllegalStateException ex) {
   }
 }
Пример #3
0
 @PostConstruct
 public void init() {
   LoggerService.setApplicationName("OpenIoT:RequestPresentation");
   LoggerService.setLevel(Level.FINE);
   LoggerService.log(Level.INFO, "Initializing");
 }