Exemplo n.º 1
0
 /** Parses sub-objects of the root element given for components. */
 public void parse(Element root) {
   failed = false;
   if (timer != null) {
     timer.schedule(timeout);
   }
   ComponentQuery elements = ComponentQuery.query("Component", root);
   int count = elements.getLength();
   for (int i = 0; i < count; ++i) {
     root = elements.getItem(i);
     if (getComponent(root) == null) {
       ComponentContainer cc = ComponentContainer.get(root, this);
       String requestId = createRequestId(cc);
       createComponent(cc, requestId);
     }
   }
 }
Exemplo n.º 2
0
 /** Creates a unique request id. */
 private String createRequestId(ComponentContainer cc) {
   Date now = new Date();
   String rtn = "r" + Math.random() + "__t" + now.getTime() + "__c" + cc.getType();
   componentRequests.add(rtn);
   return (rtn);
 }