1. #1
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default Speed Issue

    Speed Issue


    The gxt program I wrote is having major speed issue when opening a order.


    in normal gwt it takes about 1 second however in gxt it takes 20 seconds.

    I think the main problem is gxt keeps recalculating items while my code is adding the differnet textboxes and stuff to the screen.


    I am wondering is there certain methods to write a panel to make it as fast as possible.

    In the panel there is tons of textboxes and comboboxes in my program.



  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Please use the help forum for such posts. Most of your posts would have better fit there.

    I think the main problem is gxt keeps recalculating items while my code is adding the differnet textboxes and stuff to the screen.
    GXT is not doing that. It is only doing that if you call layout. You should only calll layout whenever needed.

  3. #3
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    In my code I dont even call layout. Or maybe it is that slow because while it is showing it. it is calculating all the elements layout and the calculation in gxt is just slow for some reason. This adding and testing the speed in chrome debug mode says it took 7399ms.

    This is not even the complex part yet.



    [code]
    package com.ottocap.NewWorkFlow.client.DataHolder.CustomerInfo;

    import java.util.ArrayList;

    import com.extjs.gxt.ui.client.Style.Orientation;
    import com.extjs.gxt.ui.client.data.BaseModelData;
    import com.extjs.gxt.ui.client.data.BasePagingLoadResult;
    import com.extjs.gxt.ui.client.data.BasePagingLoader;
    import com.extjs.gxt.ui.client.data.PagingLoadConfig;
    import com.extjs.gxt.ui.client.data.RpcProxy;
    import com.extjs.gxt.ui.client.event.BaseEvent;
    import com.extjs.gxt.ui.client.event.ButtonEvent;
    import com.extjs.gxt.ui.client.event.ComponentEvent;
    import com.extjs.gxt.ui.client.event.Events;
    import com.extjs.gxt.ui.client.event.FormEvent;
    import com.extjs.gxt.ui.client.event.KeyListener;
    import com.extjs.gxt.ui.client.event.Listener;
    import com.extjs.gxt.ui.client.event.MessageBoxEvent;
    import com.extjs.gxt.ui.client.event.SelectionListener;
    import com.extjs.gxt.ui.client.store.ListStore;
    import com.extjs.gxt.ui.client.widget.HorizontalPanel;
    import com.extjs.gxt.ui.client.widget.Info;
    import com.extjs.gxt.ui.client.widget.LayoutContainer;
    import com.extjs.gxt.ui.client.widget.MessageBox;
    import com.extjs.gxt.ui.client.widget.button.Button;
    import com.extjs.gxt.ui.client.widget.form.CheckBox;
    import com.extjs.gxt.ui.client.widget.form.CheckBoxGroup;
    import com.extjs.gxt.ui.client.widget.form.ComboBox;
    import com.extjs.gxt.ui.client.widget.form.Field;
    import com.extjs.gxt.ui.client.widget.form.FieldSet;
    import com.extjs.gxt.ui.client.widget.form.FileUploadField;
    import com.extjs.gxt.ui.client.widget.form.FormPanel;
    import com.extjs.gxt.ui.client.widget.form.HiddenField;
    import com.extjs.gxt.ui.client.widget.form.TextField;
    import com.extjs.gxt.ui.client.widget.form.Validator;
    import com.extjs.gxt.ui.client.widget.form.FormPanel.Encoding;
    import com.extjs.gxt.ui.client.widget.form.FormPanel.Method;
    import com.extjs.gxt.ui.client.widget.layout.FormData;
    import com.google.gwt.event.dom.client.KeyCodes;
    import com.google.gwt.json.client.JSONObject;
    import com.google.gwt.json.client.JSONParser;
    import com.google.gwt.user.client.Window;
    import com.google.gwt.user.client.rpc.AsyncCallback;
    import com.ottocap.NewWorkFlow.client.NewWorkFlow;
    import com.ottocap.NewWorkFlow.client.EditOrder.OrderTab;
    import com.ottocap.NewWorkFlow.client.OrderData.OrderData;
    import com.ottocap.NewWorkFlow.client.OrderData.OrderDataAddress;
    import com.ottocap.NewWorkFlow.client.OrderData.OrderDataCustomerInformation;
    import com.ottocap.NewWorkFlow.client.Widget.BuzzAsyncCallback;
    import com.ottocap.NewWorkFlow.client.Widget.CompanyLogoField;
    import com.ottocap.NewWorkFlow.client.Widget.FormHorizontalPanel;

    public class CustomerInfoLayout extends LayoutContainer {

    private TextField<String> contactname = new TextField<String>();
    private ComboBox<BaseModelData> eclipseaccountnumber = new ComboBox<BaseModelData>();
    private TextField<String> phonenumber = new TextField<String>();
    private TextField<String> customerterms = new TextField<String>();
    private TextField<String> company = new TextField<String>();
    private TextField<String> emailaddress = new TextField<String>();
    private TextField<String> faxnumber = new TextField<String>();
    private TextField<String> billcompanyname = new TextField<String>();
    private TextField<String> billstreet1 = new TextField<String>();
    private TextField<String> billstreet2 = new TextField<String>();
    private TextField<String> billcity = new TextField<String>();
    private TextField<String> billstate = new TextField<String>();
    private TextField<String> billzipcode = new TextField<String>();
    private TextField<String> billcountry = new TextField<String>();
    private TextField<String> shipcompanyname = new TextField<String>();
    private TextField<String> shipstreet1 = new TextField<String>();
    private TextField<String> shipstreet2 = new TextField<String>();
    private TextField<String> shipcity = new TextField<String>();
    private TextField<String> shipstate = new TextField<String>();
    private TextField<String> shipzipcode = new TextField<String>();
    private TextField<String> shipcountry = new TextField<String>();
    private TextField<String> attentionto = new TextField<String>();
    private CheckBox sameasbilling = new CheckBox();
    private CheckBox blindshippingrequired = new CheckBox();
    private CheckBox residentialaddress = new CheckBox();
    private OrderData myorderdata;
    private OrderDataAddress oldshippingaddress = new OrderDataAddress(OrderDataAddress.AddressType.SHIPPING);
    private String baseChars = "0123456789";
    private ArrayList<Character> allowed = new ArrayList<Character>();
    private boolean badEclipseNumber = false;
    private OrderDataCustomerInformation loadedeclipseinformation = null;
    private FormPanel myuploadform = new FormPanel();
    private FileUploadField companylogofile = new FileUploadField();
    private HiddenField<Integer> companylogoeclipse = new HiddenField<Integer>();
    private HiddenField<Integer> companylogohiddenkey = new HiddenField<Integer>();
    private HiddenField<String> companylogoordertype = new HiddenField<String>();
    private HiddenField<String> companylogosubmittype = new HiddenField<String>();
    private HiddenField<String> uploadtype = new HiddenField<String>();
    private Button uploadsubmit = new Button();
    private CompanyLogoField companylogo = new CompanyLogoField();
    OrderTab ordertab;

    public TextField<String> getContactNameField() {
    return contactname;
    }

    public CustomerInfoLayout(OrderData myorderdata, OrderTab ordertab) {
    this.ordertab = ordertab;
    this.myorderdata = myorderdata;
    for (int i = 0; i < baseChars.length(); i++) {
    allowed.add(baseChars.charAt(i));
    }

    RpcProxy<BasePagingLoadResult<BaseModelData>> proxy = new RpcProxy<BasePagingLoadResult<BaseModelData>>() {

    @Override
    protected void load(Object loadConfig, AsyncCallback<BasePagingLoadResult<BaseModelData>> callback) {
    NewWorkFlow.get().getWorkFlowRPC().getEclipseAccountList((PagingLoadConfig) loadConfig, callback);
    }

    };
    BasePagingLoader<BasePagingLoadResult<BaseModelData>> loader = new BasePagingLoader<BasePagingLoadResult<BaseModelData>>(proxy);
    ListStore<BaseModelData> store = new ListStore<BaseModelData>(loader);
    eclipseaccountnumber.setTemplate(getEclipseAccountTemplate());
    eclipseaccountnumber.setMinChars(2);
    eclipseaccountnumber.setMinListWidth(400);
    eclipseaccountnumber.setPageSize(10);
    eclipseaccountnumber.setHideTrigger(true);
    eclipseaccountnumber.setDisplayField("eclipseaccount");
    eclipseaccountnumber.setStore(store);
    eclipseaccountnumber.setItemSelector("div.search-item");
    eclipseaccountnumber.setMaxLength(10);
    eclipseaccountnumber.setValidateOnBlur(false);

    myuploadform.setMethod(Method.POST);
    myuploadform.setEncoding(Encoding.MULTIPART);
    myuploadform.setAction(NewWorkFlow.baseurl + "uploader");
    myuploadform.setHeaderVisible(false);
    myuploadform.setBorders(false);
    myuploadform.setLayout(FormHorizontalPanel.newFormLayout());
    myuploadform.setBodyBorder(false);
    myuploadform.setFrame(false);
    myuploadform.setPadding(0);
    FormHorizontalPanel myuploadside = new FormHorizontalPanel();
    myuploadside.add(companylogofile);
    myuploadside.addSubmit(uploadsubmit);
    myuploadside.add(uploadtype, 0);
    myuploadside.add(companylogoeclipse, 0);
    myuploadside.add(companylogoordertype, 0);
    myuploadside.add(companylogosubmittype, 0);
    myuploadside.add(companylogohiddenkey, 0);
    myuploadform.add(myuploadside);

    companylogofile.setName("companylogofile");
    companylogoeclipse.setName("companylogoeclipse");
    companylogoordertype.setName("companylogoordertype");
    companylogohiddenkey.setName("companylogohiddenkey");
    companylogosubmittype.setName("companylogosubmittype");
    uploadtype.setName("uploadtype");

    setLabels();
    setFields();
    setValidators();
    addListeners();

    FormHorizontalPanel customerinfo_horz1 = new FormHorizontalPanel();
    FormHorizontalPanel customerinfo_horz2 = new FormHorizontalPanel();

    customerinfo_horz1.add(eclipseaccountnumber);
    customerinfo_horz1.add(contactname);
    customerinfo_horz1.add(customerterms);
    customerinfo_horz1.add(company);
    customerinfo_horz1.add(emailaddress);

    customerinfo_horz2.add(phonenumber);
    customerinfo_horz2.add(faxnumber);
    customerinfo_horz2.add(companylogo);
    customerinfo_horz2.add(myuploadform, 258);

    FieldSet billinformationpanel = new FieldSet();
    billinformationpanel.setLayout(FormHorizontalPanel.newFormLayout());
    billinformationpanel.setHeading("BILLING INFORMATION");

    billinformationpanel.add(billcompanyname);
    billinformationpanel.add(billstreet1, new FormData(418, -1));
    billinformationpanel.add(billstreet2, new FormData(418, -1));
    FormHorizontalPanel billinfo_horz1 = new FormHorizontalPanel();
    billinfo_horz1.add(billcity);
    billinfo_horz1.add(billstate);
    FormHorizontalPanel billinfo_horz2 = new FormHorizontalPanel();
    billinfo_horz2.add(billzipcode);
    billinfo_horz2.add(billcountry);

    billinformationpanel.add(billinfo_horz1);
    billinformationpanel.add(billinfo_horz2);

    FieldSet shippinginformationpanel = new FieldSet();
    shippinginformationpanel.setLayout(FormHorizontalPanel.newFormLayout());
    shippinginformationpanel.setHeading("SHIPPING INFORMATION");

    HorizontalPanel shipinfo_horz1 = new HorizontalPanel();
    LayoutContainer shipinfo_ver1 = new LayoutContainer();
    shipinfo_ver1.setLayout(FormHorizontalPanel.newFormLayout());

    FormHorizontalPanel checkboxspanel = new FormHorizontalPanel();

    CheckBoxGroup shipinfo_ver2 = new CheckBoxGroup();
    shipinfo_ver2.setOrientation(Orientation.VERTICAL);
    // shipinfo_ver2.setLayout(FormHorizontalPanel.newFormLayout());

    shipinfo_horz1.add(shipinfo_ver1);
    checkboxspanel.addCheckBox(shipinfo_ver2);
    shipinfo_horz1.add(checkboxspanel);

    FormHorizontalPanel shipinfo_horz2 = new FormHorizontalPanel();
    shipinfo_horz2.add(shipcompanyname);
    shipinfo_horz2.add(attentionto);
    shipinfo_ver1.add(shipinfo_horz2);
    shipinfo_ver1.add(shipstreet1, new FormData(418, -1));
    shipinfo_ver1.add(shipstreet2, new FormData(418, -1));
    FormHorizontalPanel shipinfo_horz3 = new FormHorizontalPanel();
    shipinfo_horz3.add(shipcity);
    shipinfo_horz3.add(shipstate);
    FormHorizontalPanel shipinfo_horz4 = new FormHorizontalPanel();
    shipinfo_horz4.add(shipzipcode);
    shipinfo_horz4.add(shipcountry);

    shipinfo_ver1.add(shipinfo_horz3);
    shipinfo_ver1.add(shipinfo_horz4);

    shipinfo_ver2.add(sameasbilling);
    shipinfo_ver2.add(blindshippingrequired);
    shipinfo_ver2.add(residentialaddress);

    shippinginformationpanel.add(shipinfo_horz1);

    HorizontalPanel addresscontrainer = new HorizontalPanel();
    addresscontrainer.add(billinformationpanel);
    addresscontrainer.add(shippinginformationpanel);

    this.add(customerinfo_horz1);
    this.add(customerinfo_horz2);
    this.add(addresscontrainer);

    }

    private native String getEclipseAccountTemplate() /*-{
    return [
    '<tpl for="."><div class="search-item" style="border: 1px solid #000000;">',
    '<B>Account</B>: {eclipseaccount}<br>',
    '<B>Company</B>: {company}<br>',
    '<B>Contact</B>: {contact} ({email})</a>',
    '</div></tpl>'
    ].join("");
    }-*/;

    private void setLabels() {
    contactname.setFieldLabel("Contact Name");
    eclipseaccountnumber.setFieldLabel("Eclipse Account Number");
    phonenumber.setFieldLabel("Phone Number");
    customerterms.setFieldLabel("Customer's Terms");
    company.setFieldLabel("Company");
    emailaddress.setFieldLabel("E-Mail Address");
    faxnumber.setFieldLabel("Fax Number");
    billcompanyname.setFieldLabel("Company Name");
    billstreet1.setFieldLabel("Address Line 1");
    billstreet2.setFieldLabel("Address Line 2");
    billcity.setFieldLabel("City");
    billstate.setFieldLabel("State");
    billzipcode.setFieldLabel("Zip");
    billcountry.setFieldLabel("Country");
    shipcompanyname.setFieldLabel("Company Name");
    shipstreet1.setFieldLabel("Address Line 1");
    shipstreet2.setFieldLabel("Address Line 2");
    shipcity.setFieldLabel("City");
    shipstate.setFieldLabel("State");
    shipzipcode.setFieldLabel("Zip");
    shipcountry.setFieldLabel("Country");
    attentionto.setFieldLabel("Attention To");
    sameasbilling.setBoxLabel("Same As Billing Address");
    blindshippingrequired.setBoxLabel("Blind Shipping Request");
    residentialaddress.setBoxLabel("Residential Address");
    companylogofile.setFieldLabel("Company Logo Uploader");
    companylogo.setFieldLabel("Company Logo");
    uploadsubmit.setText("Submit");
    }

    private void setValidators() {
    emailaddress.setValidator(validator);
    eclipseaccountnumber.setValidator(validator);
    companylogofile.setValidator(validator);
    contactname.setAllowBlank(false);
    }

    private void setFields() {
    contactname.setValue(myorderdata.getCustomerInformation().getContactName());
    BaseModelData eclipseinfo = new BaseModelData();
    eclipseinfo.set("eclipseaccount", myorderdata.getCustomerInformation().getEclipseAccountNumber());
    eclipseaccountnumber.setValue(eclipseinfo);
    // eclipseaccountnumber.setRawValue(String.valueOf(myorderdata.getCustomerInformation().getEclipseAccountNumber()));
    phonenumber.setValue(myorderdata.getCustomerInformation().getPhone());
    customerterms.setValue(myorderdata.getCustomerInformation().getTerms());
    company.setValue(myorderdata.getCustomerInformation().getCompany());
    emailaddress.setValue(myorderdata.getCustomerInformation().getEmail());
    faxnumber.setValue(myorderdata.getCustomerInformation().getFax());
    billcompanyname.setValue(myorderdata.getCustomerInformation().getBillInformation().getCompany());
    billstreet1.setValue(myorderdata.getCustomerInformation().getBillInformation().getStreetLine1());
    billstreet2.setValue(myorderdata.getCustomerInformation().getBillInformation().getStreetLine2());
    billcity.setValue(myorderdata.getCustomerInformation().getBillInformation().getCity());
    billstate.setValue(myorderdata.getCustomerInformation().getBillInformation().getState());
    billzipcode.setValue(myorderdata.getCustomerInformation().getBillInformation().getZip());
    billcountry.setValue(myorderdata.getCustomerInformation().getBillInformation().getCountry());
    shipcompanyname.setValue(myorderdata.getCustomerInformation().getShipInformation().getCompany());
    shipstreet1.setValue(myorderdata.getCustomerInformation().getShipInformation().getStreetLine1());
    shipstreet2.setValue(myorderdata.getCustomerInformation().getShipInformation().getStreetLine2());
    shipcity.setValue(myorderdata.getCustomerInformation().getShipInformation().getCity());
    shipstate.setValue(myorderdata.getCustomerInformation().getShipInformation().getState());
    shipzipcode.setValue(myorderdata.getCustomerInformation().getShipInformation().getZip());
    shipcountry.setValue(myorderdata.getCustomerInformation().getShipInformation().getCountry());
    attentionto.setValue(myorderdata.getCustomerInformation().getShipAttention());
    residentialaddress.setValue(myorderdata.getCustomerInformation().getShipInformation().getResidential());
    sameasbilling.setValue(myorderdata.getCustomerInformation().getSameAsBillingAddress());
    blindshippingrequired.setValue(myorderdata.getCustomerInformation().getBlindShippingRequired());
    companylogo.setValue(myorderdata.getCustomerInformation().getCompanyLogo());
    uploadtype.setValue("Company Logo");
    oldshippingaddress.setCompany(myorderdata.getCustomerInformation().getShipInformation().getCompany());
    oldshippingaddress.setStreetLine1(myorderdata.getCustomerInformation().getShipInformation().getStreetLine1());
    oldshippingaddress.setStreetLine2(myorderdata.getCustomerInformation().getShipInformation().getStreetLine2());
    oldshippingaddress.setCity(myorderdata.getCustomerInformation().getShipInformation().getCity());
    oldshippingaddress.setState(myorderdata.getCustomerInformation().getShipInformation().getState());
    oldshippingaddress.setZip(myorderdata.getCustomerInformation().getShipInformation().getZip());
    oldshippingaddress.setCountry(myorderdata.getCustomerInformation().getShipInformation().getCountry());
    lockShipping();
    }

    private void addListeners() {
    contactname.addListener(Events.Change, changelistener);
    customerterms.addListener(Events.Change, changelistener);
    company.addListener(Events.Change, changelistener);
    emailaddress.addListener(Events.Change, changelistener);
    phonenumber.addListener(Events.Change, changelistener);
    faxnumber.addListener(Events.Change, changelistener);
    residentialaddress.addListener(Events.Change, changelistener);
    sameasbilling.addListener(Events.Change, changelistener);
    blindshippingrequired.addListener(Events.Change, changelistener);
    billcompanyname.addListener(Events.Change, changelistener);
    billstreet1.addListener(Events.Change, changelistener);
    billstreet2.addListener(Events.Change, changelistener);
    billcity.addListener(Events.Change, changelistener);
    billstate.addListener(Events.Change, changelistener);
    billzipcode.addListener(Events.Change, changelistener);
    billcountry.addListener(Events.Change, changelistener);
    shipcompanyname.addListener(Events.Change, changelistener);
    shipstreet1.addListener(Events.Change, changelistener);
    shipstreet2.addListener(Events.Change, changelistener);
    shipcity.addListener(Events.Change, changelistener);
    shipstate.addListener(Events.Change, changelistener);
    shipzipcode.addListener(Events.Change, changelistener);
    shipcountry.addListener(Events.Change, changelistener);
    attentionto.addListener(Events.Change, changelistener);

    billcompanyname.addKeyListener(keylistener);
    billstreet1.addKeyListener(keylistener);
    billstreet2.addKeyListener(keylistener);
    billcity.addKeyListener(keylistener);
    billstate.addKeyListener(keylistener);
    billzipcode.addKeyListener(keylistener);
    billcountry.addKeyListener(keylistener);
    eclipseaccountnumber.addKeyListener(keylistener);
    eclipseaccountnumber.addListener(Events.Blur, blurlistener);

    uploadsubmit.addSelectionListener(selectionlistener);
    myuploadform.addListener(Events.Submit, submitlistener);

    companylogo.addListener(Events.TriggerClick, triggerclicklistener);
    companylogo.addListener(Events.TwinTriggerClick, twintriggerclicklistener);
    }

    private void lockShipping() {
    if (sameasbilling.getValue()) {
    shipcompanyname.setEnabled(false);
    shipstreet1.setEnabled(false);
    shipstreet2.setEnabled(false);
    shipcity.setEnabled(false);
    shipstate.setEnabled(false);
    shipzipcode.setEnabled(false);
    shipcountry.setEnabled(false);
    oldshippingaddress.setCompany(myorderdata.getCustomerInformation().getShipInformation().getCompany());
    oldshippingaddress.setStreetLine1(myorderdata.getCustomerInformation().getShipInformation().getStreetLine1());
    oldshippingaddress.setStreetLine2(myorderdata.getCustomerInformation().getShipInformation().getStreetLine2());
    oldshippingaddress.setCity(myorderdata.getCustomerInformation().getShipInformation().getCity());
    oldshippingaddress.setState(myorderdata.getCustomerInformation().getShipInformation().getState());
    oldshippingaddress.setZip(myorderdata.getCustomerInformation().getShipInformation().getZip());
    oldshippingaddress.setCountry(myorderdata.getCustomerInformation().getShipInformation().getCountry());
    myorderdata.getCustomerInformation().getShipInformation().setCompany(myorderdata.getCustomerInformation().getBillInformation().getCompany());
    myorderdata.getCustomerInformation().getShipInformation().setStreetLine1(myorderdata.getCustomerInformation().getBillInformation().getStreetLine1());
    myorderdata.getCustomerInformation().getShipInformation().setStreetLine2(myorderdata.getCustomerInformation().getBillInformation().getStreetLine2());
    myorderdata.getCustomerInformation().getShipInformation().setCity(myorderdata.getCustomerInformation().getBillInformation().getCity());
    myorderdata.getCustomerInformation().getShipInformation().setState(myorderdata.getCustomerInformation().getBillInformation().getState());
    myorderdata.getCustomerInformation().getShipInformation().setZip(myorderdata.getCustomerInformation().getBillInformation().getZip());
    myorderdata.getCustomerInformation().getShipInformation().setCountry(myorderdata.getCustomerInformation().getBillInformation().getCountry());
    } else {
    myorderdata.getCustomerInformation().getShipInformation().setCompany(oldshippingaddress.getCompany());
    myorderdata.getCustomerInformation().getShipInformation().setStreetLine1(oldshippingaddress.getStreetLine1());
    myorderdata.getCustomerInformation().getShipInformation().setStreetLine2(oldshippingaddress.getStreetLine2());
    myorderdata.getCustomerInformation().getShipInformation().setCity(oldshippingaddress.getCity());
    myorderdata.getCustomerInformation().getShipInformation().setState(oldshippingaddress.getState());
    myorderdata.getCustomerInformation().getShipInformation().setZip(oldshippingaddress.getZip());
    myorderdata.getCustomerInformation().getShipInformation().setCountry(oldshippingaddress.getCountry());
    shipcompanyname.setEnabled(true);
    shipstreet1.setEnabled(true);
    shipstreet2.setEnabled(true);
    shipcity.setEnabled(true);
    shipstate.setEnabled(true);
    shipzipcode.setEnabled(true);
    shipcountry.setEnabled(true);
    }
    shipcompanyname.setValue(myorderdata.getCustomerInformation().getShipInformation().getCompany());
    shipstreet1.setValue(myorderdata.getCustomerInformation().getShipInformation().getStreetLine1());
    shipstreet2.setValue(myorderdata.getCustomerInformation().getShipInformation().getStreetLine2());
    shipcity.setValue(myorderdata.getCustomerInformation().getShipInformation().getCity());
    shipstate.setValue(myorderdata.getCustomerInformation().getShipInformation().getState());
    shipzipcode.setValue(myorderdata.getCustomerInformation().getShipInformation().getZip());
    shipcountry.setValue(myorderdata.getCustomerInformation().getShipInformation().getCountry());
    }

    private Validator validator = new Validator() {

    @Override
    public String validate(Field<?> field, String value) {
    if (field == emailaddress) {
    if (!emailaddress.getValue().toLowerCase().matches("(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(??:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(??:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])")) {
    return "Bad E-mail Address";
    }
    } else if (field == eclipseaccountnumber) {
    if (badEclipseNumber) {
    return "Eclipse Number Not Found";
    }
    } else if (field == companylogofile) {
    if (eclipseaccountnumber.getRawValue() == null || eclipseaccountnumber.getRawValue().equals("")) {
    return "Missing Eclipse Number";
    }
    try {
    Integer.valueOf(eclipseaccountnumber.getRawValue());
    } catch (Exception e) {
    return "Bad Eclipse Number";
    }
    }

    return null;
    }

    };

    public void queryEclipseNumber(int eclipseaccountnumber) {
    NewWorkFlow.get().getWorkFlowRPC().getEclipseAccount(eclipseaccountnumber, new AsyncCallback<EclipseDataHolder>() {

    @Override
    public void onFailure(Throwable caught) {
    Info.display("Error", caught.getLocalizedMessage());
    }

    @Override
    public void onSuccess(EclipseDataHolder result) {
    loadEclipseNumber(result);
    }

    });
    }

    public void loadEclipseNumber(final EclipseDataHolder result) {
    myorderdata.getCustomerInformation().setCompanyLogo(result.getCompanyLogo());
    companylogo.setValue(myorderdata.getCustomerInformation().getCompanyLogo());
    if (result.getOrderDataCustomerInformation() == null) {
    badEclipseNumber = true;
    eclipseaccountnumber.validate();
    loadedeclipseinformation = null;
    } else {
    badEclipseNumber = false;
    eclipseaccountnumber.validate();
    loadedeclipseinformation = result.getOrderDataCustomerInformation();
    MessageBox mybox = new MessageBox();
    mybox.setTitle("Confirm");
    mybox.setMessage("Do you want to load eclipse information?");
    mybox.setIcon(MessageBox.QUESTION);
    mybox.setButtons(MessageBox.YESNO);
    mybox.addCallback(messageboxlistener);
    mybox.show();
    }
    }

    public void loadStoredEclipseInfo() {
    if (loadedeclipseinformation != null) {
    myorderdata.getCustomerInformation().setEclipseAccountNumber(loadedeclipseinformation.getEclipseAccountNumber());
    myorderdata.getCustomerInformation().setContactName(loadedeclipseinformation.getContactName());
    myorderdata.getCustomerInformation().setTerms(loadedeclipseinformation.getTerms());
    myorderdata.getCustomerInformation().setCompany(loadedeclipseinformation.getCompany());
    myorderdata.getCustomerInformation().setEmail(loadedeclipseinformation.getEmail());
    myorderdata.getCustomerInformation().setPhone(loadedeclipseinformation.getPhone());
    myorderdata.getCustomerInformation().setFax(loadedeclipseinformation.getFax());
    myorderdata.getCustomerInformation().setSameAsBillingAddress(loadedeclipseinformation.getSameAsBillingAddress());
    myorderdata.getCustomerInformation().getBillInformation().setCompany(loadedeclipseinformation.getBillInformation().getCompany());
    myorderdata.getCustomerInformation().getBillInformation().setStreetLine1(loadedeclipseinformation.getBillInformation().getStreetLine1());
    myorderdata.getCustomerInformation().getBillInformation().setStreetLine2(loadedeclipseinformation.getBillInformation().getStreetLine2());
    myorderdata.getCustomerInformation().getBillInformation().setCity(loadedeclipseinformation.getBillInformation().getCity());
    myorderdata.getCustomerInformation().getBillInformation().setState(loadedeclipseinformation.getBillInformation().getState());
    myorderdata.getCustomerInformation().getBillInformation().setZip(loadedeclipseinformation.getBillInformation().getZip());
    myorderdata.getCustomerInformation().getBillInformation().setCountry(loadedeclipseinformation.getBillInformation().getCountry());
    myorderdata.getCustomerInformation().getShipInformation().setCompany(loadedeclipseinformation.getShipInformation().getCompany());
    myorderdata.getCustomerInformation().getShipInformation().setStreetLine1(loadedeclipseinformation.getShipInformation().getStreetLine1());
    myorderdata.getCustomerInformation().getShipInformation().setStreetLine2(loadedeclipseinformation.getShipInformation().getStreetLine2());
    myorderdata.getCustomerInformation().getShipInformation().setCity(loadedeclipseinformation.getShipInformation().getCity());
    myorderdata.getCustomerInformation().getShipInformation().setState(loadedeclipseinformation.getShipInformation().getState());
    myorderdata.getCustomerInformation().getShipInformation().setZip(loadedeclipseinformation.getShipInformation().getZip());
    myorderdata.getCustomerInformation().getShipInformation().setCountry(loadedeclipseinformation.getShipInformation().getCountry());
    myorderdata.getCustomerInformation().getShipInformation().setResidential(loadedeclipseinformation.getShipInformation().getResidential());
    setFields();
    }
    }

    private Listener<BaseEvent> triggerclicklistener = new Listener<BaseEvent>() {

    @Override
    public void handleEvent(BaseEvent be) {
    if (be.getSource().equals(companylogo)) {
    if (myorderdata.getCustomerInformation().getCompanyLogo().equals("Default")) {
    Window.open(NewWorkFlow.filepath + "pdflogos/" + myorderdata.getCustomerInformation().getEclipseAccountNumber() + "/logo.jpg", "popup", "");
    } else if (!myorderdata.getCustomerInformation().getCompanyLogo().equals("")) {
    if (myorderdata.getOrderType() == OrderData.OrderType.DOMESTIC) {
    Window.open(NewWorkFlow.filepath + "DomesticData/" + myorderdata.getHiddenKey() + "/companylogo/" + myorderdata.getCustomerInformation().getCompanyLogo(), "popup", "");
    } else if (myorderdata.getOrderType() == OrderData.OrderType.OVERSEAS) {
    Window.open(NewWorkFlow.filepath + "OverseasData/" + myorderdata.getHiddenKey() + "/companylogo/" + myorderdata.getCustomerInformation().getCompanyLogo(), "popup", "");
    }
    }
    }
    }

    };

    private Listener<BaseEvent> twintriggerclicklistener = new Listener<BaseEvent>() {

    @Override
    public void handleEvent(BaseEvent be) {
    if (be.getSource().equals(companylogo)) {
    if (myorderdata.getCustomerInformation().getCompanyLogo().equals("Default")) {
    MessageBox.confirm("Remove Global Logo", "Are you sure you want to remove the global logo?", removelogocallback);
    } else if (!myorderdata.getCustomerInformation().getCompanyLogo().equals("")) {
    MessageBox.confirm("Remove Local WorkOrder Logo", "Are you sure you want to remove the local workorder logo?", removelogocallback);
    }
    }
    }

    };

    private Listener<MessageBoxEvent> removelogocallback = new Listener<MessageBoxEvent>() {

    @Override
    public void handleEvent(MessageBoxEvent be) {
    if (be.getButtonClicked().getText().equals("Yes")) {
    if (myorderdata.getCustomerInformation().getCompanyLogo().equals("Default")) {
    NewWorkFlow.get().getWorkFlowRPC().getRemoveEclipseAccountLogo(myorderdata.getCustomerInformation().getEclipseAccountNumber(), removecompanylogocallback);
    } else if (!myorderdata.getCustomerInformation().getCompanyLogo().equals("")) {
    if (myorderdata.getCustomerInformation().getEclipseAccountNumber() != null) {
    NewWorkFlow.get().getWorkFlowRPC().getEclipseAccount(myorderdata.getCustomerInformation().getEclipseAccountNumber(), checkcompanylogocallback);
    } else {
    companylogo.setValue("");
    myorderdata.getCustomerInformation().setCompanyLogo(companylogo.getValue());
    }
    }
    }

    }

    };

    private AsyncCallback<Void> removecompanylogocallback = new AsyncCallback<Void>() {

    @Override
    public void onFailure(Throwable caught) {
    }

    @Override
    public void onSuccess(Void result) {
    companylogo.setValue("");
    myorderdata.getCustomerInformation().setCompanyLogo(companylogo.getValue());
    }

    };

    private AsyncCallback<EclipseDataHolder> checkcompanylogocallback = new AsyncCallback<EclipseDataHolder>() {

    @Override
    public void onFailure(Throwable caught) {
    }

    @Override
    public void onSuccess(EclipseDataHolder result) {
    companylogo.setValue(result.getCompanyLogo());
    myorderdata.getCustomerInformation().setCompanyLogo(companylogo.getValue());
    }

    };

    private Listener<MessageBoxEvent> messageboxlistener = new Listener<MessageBoxEvent>() {

    @Override
    public void handleEvent(MessageBoxEvent be) {
    if (be.getButtonClicked().getText().equals("Yes")) {
    loadStoredEclipseInfo();
    }
    }
    };

    private SelectionListener<ButtonEvent> selectionlistener = new SelectionListener<ButtonEvent>() {

    @Override
    public void componentSelected(ButtonEvent ce) {
    uploadsubmit.disable();
    if (ce.getSource().equals(uploadsubmit)) {
    if (myorderdata.getHiddenKey() == null) {
    NewWorkFlow.get().getWorkFlowRPC().saveOrder(myorderdata, companylogosaveordercallback);
    } else {
    doUploadCompanyLogo();
    }
    }
    }

    };

    private BuzzAsyncCallback<Integer> companylogosaveordercallback = new BuzzAsyncCallback<Integer>() {

    @Override
    public void onFailure(Throwable caught) {
    NewWorkFlow.get().reLogin2(caught, companylogosaveordercallback);
    }

    @Override
    public void doRetry() {
    NewWorkFlow.get().getWorkFlowRPC().saveOrder(myorderdata, companylogosaveordercallback);
    }

    @Override
    public void onSuccess(Integer result) {
    myorderdata.setHiddenKey(result);
    getOrderTab().setTabHeader();
    doUploadCompanyLogo();
    }

    };

    public OrderTab getOrderTab() {
    return ordertab;
    }

    private void doUploadCompanyLogo() {
    MessageBox.confirm("Upload Type", "Do you want to upload a global company logo?", uploadtypecallback);
    }

    private Listener<MessageBoxEvent> uploadtypecallback = new Listener<MessageBoxEvent>() {
    public void handleEvent(MessageBoxEvent ce) {
    Button btn = ce.getButtonClicked();
    if (btn.getText().equals("Yes")) {
    companylogosubmittype.setValue("global");
    if (!companylogofile.validate()) {
    MessageBox.alert("Error", "Missing Eclipse Account Number", null);
    uploadsubmit.enable();
    return;
    }
    } else {
    companylogosubmittype.setValue("local");
    }

    companylogoeclipse.setValue(myorderdata.getCustomerInformation().getEclipseAccountNumber());
    companylogohiddenkey.setValue(myorderdata.getHiddenKey());
    if (myorderdata.getOrderType() == OrderData.OrderType.DOMESTIC) {
    companylogoordertype.setValue("Domestic");
    } else {
    companylogoordertype.setValue("Overseas");
    }
    myuploadform.submit();
    }
    };

    private Listener<BaseEvent> blurlistener = new Listener<BaseEvent>() {

    @Override
    public void handleEvent(BaseEvent be) {
    if (be.getSource().equals(eclipseaccountnumber)) {
    if (eclipseaccountnumber.getRawValue() == null || eclipseaccountnumber.getRawValue().equals("")) {
    myorderdata.getCustomerInformation().setEclipseAccountNumber(null);
    myorderdata.getCustomerInformation().setCompanyLogo("");
    companylogo.setValue(myorderdata.getCustomerInformation().getCompanyLogo());
    badEclipseNumber = false;
    eclipseaccountnumber.validate();
    loadedeclipseinformation = null;
    } else {
    try {
    if (myorderdata.getCustomerInformation().getEclipseAccountNumber() == null || myorderdata.getCustomerInformation().getEclipseAccountNumber().intValue() != Integer.valueOf(eclipseaccountnumber.getRawValue()).intValue()) {
    myorderdata.getCustomerInformation().setEclipseAccountNumber(Integer.valueOf(eclipseaccountnumber.getRawValue()));
    queryEclipseNumber(Integer.valueOf(eclipseaccountnumber.getRawValue()));
    }
    } catch (Exception e) {
    badEclipseNumber = true;
    eclipseaccountnumber.validate();
    loadedeclipseinformation = null;
    myorderdata.getCustomerInformation().setEclipseAccountNumber(null);
    myorderdata.getCustomerInformation().setCompanyLogo("");
    companylogo.setValue(myorderdata.getCustomerInformation().getCompanyLogo());
    }
    }
    }

    }

    };

    private Listener<BaseEvent> changelistener = new Listener<BaseEvent>() {

    @Override
    public void handleEvent(BaseEvent be) {
    if (be.getSource().equals(contactname)) {
    myorderdata.getCustomerInformation().setContactName((contactname.getValue() == null) ? "" : contactname.getValue());
    } else if (be.getSource().equals(customerterms)) {
    myorderdata.getCustomerInformation().setTerms((customerterms.getValue() == null) ? "" : customerterms.getValue());
    } else if (be.getSource().equals(company)) {
    myorderdata.getCustomerInformation().setCompany((company.getValue() == null) ? "" : company.getValue());
    } else if (be.getSource().equals(emailaddress)) {
    myorderdata.getCustomerInformation().setEmail((emailaddress.getValue() == null) ? "" : emailaddress.getValue());
    } else if (be.getSource().equals(phonenumber)) {
    myorderdata.getCustomerInformation().setPhone((phonenumber.getValue() == null) ? "" : phonenumber.getValue());
    } else if (be.getSource().equals(faxnumber)) {
    myorderdata.getCustomerInformation().setFax((faxnumber.getValue() == null) ? "" : faxnumber.getValue());
    } else if (be.getSource().equals(residentialaddress)) {
    myorderdata.getCustomerInformation().getShipInformation().setResidential(residentialaddress.getValue().booleanValue());
    } else if (be.getSource().equals(sameasbilling)) {
    myorderdata.getCustomerInformation().setSameAsBillingAddress(sameasbilling.getValue().booleanValue());
    lockShipping();
    } else if (be.getSource().equals(blindshippingrequired)) {
    myorderdata.getCustomerInformation().setBlindShippingRequired(blindshippingrequired.getValue().booleanValue());
    } else if (be.getSource().equals(billcompanyname)) {
    myorderdata.getCustomerInformation().getBillInformation().setCompany((billcompanyname.getValue() == null) ? "" : billcompanyname.getValue());
    if (myorderdata.getCustomerInformation().getSameAsBillingAddress()) {
    myorderdata.getCustomerInformation().getShipInformation().setCompany((shipcompanyname.getValue() == null) ? "" : shipcompanyname.getValue());
    }
    } else if (be.getSource().equals(billstreet1)) {
    myorderdata.getCustomerInformation().getBillInformation().setStreetLine1((billstreet1.getValue() == null) ? "" : billstreet1.getValue());
    if (myorderdata.getCustomerInformation().getSameAsBillingAddress()) {
    myorderdata.getCustomerInformation().getShipInformation().setStreetLine1((shipstreet1.getValue() == null) ? "" : shipstreet1.getValue());
    }
    } else if (be.getSource().equals(billstreet2)) {
    myorderdata.getCustomerInformation().getBillInformation().setStreetLine2((billstreet2.getValue() == null) ? "" : billstreet2.getValue());
    if (myorderdata.getCustomerInformation().getSameAsBillingAddress()) {
    myorderdata.getCustomerInformation().getShipInformation().setStreetLine2((shipstreet2.getValue() == null) ? "" : shipstreet2.getValue());
    }
    } else if (be.getSource().equals(billcity)) {
    myorderdata.getCustomerInformation().getBillInformation().setCity((billcity.getValue() == null) ? "" : billcity.getValue());
    if (myorderdata.getCustomerInformation().getSameAsBillingAddress()) {
    myorderdata.getCustomerInformation().getShipInformation().setCity((shipcity.getValue() == null) ? "" : shipcity.getValue());
    }
    } else if (be.getSource().equals(billstate)) {
    myorderdata.getCustomerInformation().getBillInformation().setState((billstate.getValue() == null) ? "" : billstate.getValue());
    if (myorderdata.getCustomerInformation().getSameAsBillingAddress()) {
    myorderdata.getCustomerInformation().getShipInformation().setState((shipstate.getValue() == null) ? "" : shipstate.getValue());
    }
    } else if (be.getSource().equals(billzipcode)) {
    myorderdata.getCustomerInformation().getBillInformation().setZip((billzipcode.getValue() == null) ? "" : billzipcode.getValue());
    if (myorderdata.getCustomerInformation().getSameAsBillingAddress()) {
    myorderdata.getCustomerInformation().getShipInformation().setCompany((shipcompanyname.getValue() == null) ? "" : shipcompanyname.getValue());
    }
    } else if (be.getSource().equals(billcountry)) {
    myorderdata.getCustomerInformation().getBillInformation().setCountry((billcountry.getValue() == null) ? "" : billcountry.getValue());
    if (myorderdata.getCustomerInformation().getSameAsBillingAddress()) {
    myorderdata.getCustomerInformation().getShipInformation().setCountry((shipcountry.getValue() == null) ? "" : shipcountry.getValue());
    }
    } else if (be.getSource().equals(shipcompanyname)) {
    myorderdata.getCustomerInformation().getShipInformation().setCompany((shipcompanyname.getValue() == null) ? "" : shipcompanyname.getValue());
    } else if (be.getSource().equals(shipstreet1)) {
    myorderdata.getCustomerInformation().getShipInformation().setStreetLine1((shipstreet1.getValue() == null) ? "" : shipstreet1.getValue());
    } else if (be.getSource().equals(shipstreet2)) {
    myorderdata.getCustomerInformation().getShipInformation().setStreetLine2((shipstreet2.getValue() == null) ? "" : shipstreet2.getValue());
    } else if (be.getSource().equals(shipcity)) {
    myorderdata.getCustomerInformation().getShipInformation().setCity((shipcity.getValue() == null) ? "" : shipcity.getValue());
    } else if (be.getSource().equals(shipstate)) {
    myorderdata.getCustomerInformation().getShipInformation().setState((shipstate.getValue() == null) ? "" : shipstate.getValue());
    } else if (be.getSource().equals(shipzipcode)) {
    myorderdata.getCustomerInformation().getShipInformation().setZip((shipzipcode.getValue() == null) ? "" : shipzipcode.getValue());
    } else if (be.getSource().equals(shipcountry)) {
    myorderdata.getCustomerInformation().getShipInformation().setCountry((shipcountry.getValue() == null) ? "" : shipcountry.getValue());
    } else if (be.getSource().equals(attentionto)) {
    myorderdata.getCustomerInformation().setShipAttention((attentionto.getValue() == null) ? "" : attentionto.getValue());
    }
    }

    };

    private Listener<FormEvent> submitlistener = new Listener<FormEvent>() {

    @Override
    public void handleEvent(FormEvent be) {
    if (be.getComponent().equals(myuploadform)) {
    String htmlstring = be.getResultHtml();
    htmlstring = htmlstring.replace("<pre>", "");
    htmlstring = htmlstring.replace("</pre>", "");
    JSONObject jsonObject = JSONParser.parse(htmlstring).isObject();
    if (!jsonObject.containsKey("error")) {
    myorderdata.getCustomerInformation().setCompanyLogo(jsonObject.get("Filename").isString().stringValue());
    companylogo.setValue(myorderdata.getCustomerInformation().getCompanyLogo());
    Info.display("Success", "Company Logo Have Been Uploaded");
    myuploadform.enable();
    } else {
    Throwable myerror = new Throwable(jsonObject.get("error").isString().stringValue());
    NewWorkFlow.get().reLogin2(myerror, uploadlogorelogin);
    }
    }

    }
    };

    BuzzAsyncCallback<String> uploadlogorelogin = new BuzzAsyncCallback<String>() {

    @Override
    public void onFailure(Throwable caught) {
    myuploadform.enable();
    }

    @Override
    public void onSuccess(String result) {
    myuploadform.submit();
    }

    };

    private KeyListener keylistener = new KeyListener() {

    public void componentKeyUp(ComponentEvent event) {
    if (myorderdata.getCustomerInformation().getSameAsBillingAddress()) {
    if (event.getComponent().equals(billcompanyname)) {
    shipcompanyname.setValue(billcompanyname.getValue());
    } else if (event.getComponent().equals(billstreet1)) {
    shipstreet1.setValue(billstreet1.getValue());
    } else if (event.getComponent().equals(billstreet2)) {
    shipstreet2.setValue(billstreet2.getValue());
    } else if (event.getComponent().equals(billcity)) {
    shipcity.setValue(billcity.getValue());
    } else if (event.getComponent().equals(billstate)) {
    shipstate.setValue(billstate.getValue());
    } else if (event.getComponent().equals(billzipcode)) {
    shipzipcode.setValue(billzipcode.getValue());
    } else if (event.getComponent().equals(billcountry)) {
    shipcountry.setValue(billcountry.getValue());
    }
    }

    }

    public void componentKeyPress(ComponentEvent event) {

    if (event.getComponent().equals(eclipseaccountnumber)) {

    if (event.isSpecialKey(event.getKeyCode()) || event.getKeyCode() == KeyCodes.KEY_BACKSPACE || event.getKeyCode() == KeyCodes.KEY_DELETE || event.isControlKey()) {
    return;
    }

    if (!allowed.contains((char) event.getKeyCode()) || eclipseaccountnumber.getSelectedText().isEmpty() && eclipseaccountnumber.getRawValue().length() == 10) {
    event.stopEvent();
    }

    }
    }

    };

    }

    [code]

  4. #4
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    I am not even calling layout at all. But I am gussing while it renders it calls multiple layout.

  5. #5
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Your layout is very big. You are most times better to write a custom layout that fullfills only your needs but does not need all this extra containers.

    But this code is far too much to be read here in the forum.

  6. #6
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    That is only the customer info part i tried to post. I will take a screen shot of how my whole layout looks

    http://i179.photobucket.com/albums/w...zer/layout.jpg

    it gets longer and longer when more products are needed in a order.

    They want everything on a single screen and not in parts.

    the main thing I could not really code up that well was a combobox thats why I switched to using gxt.

    Now i am done coding the UI however it is too slow to show the order screen. My old one takes about 2 seconds and the gxt version takes like 20. That is a huge speed difference.

    I am thinking the main problem now is because gxt widgets are more complex compared to gwt textboxes so it takes longer to render.

    If there was no problems with my coding of the layout, in getting the best speed out of it.


    I did code my own form layout that uses the formlayout and horizontalpanel however maybe I should write my own method that does not use any of those and just draw the textboxes and labels in a horizontal way.

    I am very getting stumped in coding and the company I am at doesnt want to hire more programmers to help me figure stuff out.


    I been looking at other libraries such as smartgwt and vaaldin. Smartgwt does not seem that good because it is just tons of wrappers so I couldn't edit stuff as eaisly.

    vaaldin seems like a good alternative for gxt but the combobox only have one layout I cant do custom display like what I could do with gxt.


    I guess what I could try is to create my own layoutcontainer that is more simplified so it can run though the code faster, however i am not sure if the different gxt widgets such as textfield and stuff is part of the problem that slows down the code.

    What other suggestions you have that might be causing the rendering to be slow?

  7. #7
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    The layout looking into it however if i was suppose to make a custom layout i am not sure how.

    It starts going into more of a javascript type of elements, dom, and wrappers.

  8. #8
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    That layout is far to complex for any browser if you need correct resizings etc.

    Also it is as big that the enduser never sees everything at once. So the first thing i would do is to only render visible things and render the next when the get scrolled into view. This would be the first custom layout. Than you have many horizontal stuff, i hope this are not all standalone containers?

  9. #9
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    It really is when it is rendering the layout.

    I made a tab panel to have the different sections of the order and the order opens lot faster.

    I guess having too many items in gxt on the screen at a time cause it to drag.

  10. #10
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Yes because it is sizing everything dynamically.

Thread Participants: 1