Páginas

10 de marzo de 2013

problemas con nvidia GT440 graphis ubuntu



si la configuranción por defecto de la tarjeta gráfica nvidia  en ubuntu 12.10 te da problemas

debes de hacer estos pasos

1.- abrir un terminal

2.- escrivimos en el terminal esto

$> sudo apt-get update
$>sudo apt-get upgrade
$>sudo apt-get installa linux-source
$>sudo apt-get installa linux-headers-generic
$>sudo apt-get installa nvidia-currents-updates

3.- en programas instalados veras el programa de envidia para poder configurarlo a resolución querida


19 de febrero de 2013

combo box búsqueda



el combo busca en la base con lo que hayas escrito

en la vista 

cmbxEmpresa = new ComboBox();
cmbxEmpresa.setFieldLabel(constants.tit_empresa());
cmbxEmpresa.setStore(new ListStore());
cmbxEmpresa.setValueField("id");
cmbxEmpresa.setDisplayField("no_empresa");
cmbxEmpresa.setTriggerAction(TriggerAction.ALL);


@Override
public void setDataComboEmpresas(ArrayList data) {
if (data==null) {
this.cmbxEmpresa.getStore().removeAll();
this.cmbxEmpresa.collapse();
return;
}
BeanModelFactory factory = BeanModelLookup.get().getFactory(Empresas.class);
ArrayList dataToShow = new ArrayList();
for (Empresas e:data){
BeanModel model = factory.createModel(e);
dataToShow.add(model);
}
this.cmbxEmpresa.getStore().removeAll();
this.cmbxEmpresa.getStore().add(dataToShow);
}


en el presenter 


en el bind

display.getComboEmpresa().addKeyListener(new KeyListener() {
@Override
            public void componentKeyUp(ComponentEvent ce) {
switch (ce.getKeyCode()) {
                case KeyCodes.KEY_DOWN:
                case KeyCodes.KEY_END:
                case KeyCodes.KEY_ENTER:
                case KeyCodes.KEY_ESCAPE:
                case KeyCodes.KEY_HOME:
                case KeyCodes.KEY_LEFT:
                case KeyCodes.KEY_PAGEDOWN:
                case KeyCodes.KEY_PAGEUP:
                case KeyCodes.KEY_RIGHT:
                case KeyCodes.KEY_TAB:
                case KeyCodes.KEY_UP:
                    return;
                default:
                
                 final String newValue = display.getComboEmpresa().getRawValue();

                     if (newValue != null && newValue.length() > ApplicationTypeID.MINIMUM_CHARACTERS_TYPED) {
                     
                     //oldValue = newValue;

                         DelayedTask delayedTask = new DelayedTask(new Listener() {

                            final String oldValueEvento = newValue;
                         
                         
                             @Override
                             public void handleEvent(BaseEvent be) {

                                 String valueNew = display.getComboEmpresa().getRawValue();

                                // Info.display("Buscando empresa", " OLDVALUE = " + oldValue + ", Newvalue=" + valueNew + ", Evento Value = " + oldValueEvento);
                                 
                                 if (oldValueEvento != null && oldValueEvento.equals(valueNew)) {
                                 
                                // buscarEmpresasCombo(valueNew, null);
                                 String strinLimpio = valueNew;
                                 if (ApplicationTypeID.PORCENTAJE.equals(valueNew)){
                                 strinLimpio = "";
                                 }else{
                                 
                                if (ApplicationTypeID.PORCENTAJE.equals(valueNew.substring(valueNew.length()-1,valueNew.length()))){
                                  strinLimpio = valueNew.substring(0,valueNew.length()-1);
                                }
                                 }
                                 
                                 
                                 //System.out.println(strinLimpio);
                                 Empresas empresa = new Empresas();
                                 empresa.setNo_contacto(strinLimpio);
                                 buscarEmpresasCombo(empresa);
                                 }
                             }
                         });
                         delayedTask.delay(ApplicationTypeID.DELAY_CHARACTERS_TYPED);
                     }
                     else if (newValue == null || newValue.length()==0) {
                     display.setDataComboEmpresas(null);
                     }
             
                
                
}
}
});


llamada al sevlets con otro pantalla



llamada del código descarga en gwt
             
              String url = "/no_proyecto/upload?accion=descargar&id=" + model.get("id") + "&id_documento=" + model.get("id_documento") + "&no_documento=" + model.get("no_documento")  + "&cl_usuariocrea=" + model.get("cl_usuariocrea") + "&no_fichero=" + model.get("no_fichero") ;
             
              boolean frameExists = (RootPanel.get("Descarga") != null); 
              if(frameExists) { 
              Widget widgetFrame = (Widget)RootPanel.get("Descarga"); 
              widgetFrame.removeFromParent(); 
              } 

              NamedFrame frame = new NamedFrame("Descarga"); 
              frame.setUrl(GWT.getModuleBaseURL().substring(0, GWT.getModuleBaseURL().indexOf("/nombre_proyecto")) 
              + url); 
              frame.setVisible(false); 

              RootPanel.get().add(frame); 
           

llamada del código descarga en gwt 
              /**
              // Abrir un HTTP
              Element e = DOM.createIFrame();
              e.setAttribute("src", url);
             
             
              // Abrir ventana de descarga
              Window.open(url, "Descarga",
                      "menubar=yes," + 
                      "location=false," + 
                      "resizable=yes," + 
                      "scrollbars=yes," + 
                      "status=no," + 
                      "dependent=true");
                  

18 de febrero de 2013

request con objetos con un sevlets


String id = request.getParameter("id");

Objeto variable_objeto = new Objeto();
   variable_objeto = (Objeto)request.getAttribute("Objeto_S");