Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    18
    Vote Rating
    0
    It_Barney is on a distinguished road

      0  

    Default Old Field.setInputStyleAttribute

    Old Field.setInputStyleAttribute


    Working on a migration of an old GXT 2.X application project I have a encountered this setting:

    NumberField currPag = new NumberField();
    ...
    currPag.setInputStyleAttribute("textAlign","right");

    I've tried this kind of "translation" but It doesn't work:

    Code:
        public void onModuleLoad() {
            IntegerPropertyEditor ipe = new IntegerPropertyEditor();
            NumberField<Integer> num = new NumberField<Integer>(ipe);
            XElement xel = num.getElement();
            InputElement iel = num.getCell().getInputElement(xel);
    //        System.out.println(iel);
            iel.setAttribute("textAlign", "right");
    //        System.out.println(iel);
            num.setValue(0);
            RootPanel.get().add(num);
        }
    Is there something wrong ? Or is it a bug ?

  2. #2
    Sencha User
    Join Date
    Oct 2010
    Posts
    18
    Vote Rating
    0
    It_Barney is on a distinguished road

      0  

    Default Not working still in RC2

    Not working still in RC2


    Already tried this:
    Code:
        public void onModuleLoad() {
            IntegerPropertyEditor ipe = new IntegerPropertyEditor();
            NumberField<Integer> num = new NumberField<Integer>(ipe);
            XElement xel = num.getElement();
            InputElement iel = num.getCell().getInputElement(xel);
    //        System.out.println(iel);
            iel.getStyle().setProperty("textAlign", "right");
    //        System.out.println(iel);
            num.setValue(0);
            RootPanel.get().add(num);
        }
    Any idea ? Any hint ?

  3. #3
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    What you can do here is to set a style name on the field itself, then add a rule in your CSS to select for an input element descendent. That is, call num.addStyleName("foo"), then use a selector like .foo input.

    When you set any styles directly on the input element of a cell-based widget, those styles are lost whenever the cell redraws. Because of the architecture of cells, these elements can be redrawn very often (and relatively inexpensively). As a result, any modifications that you made by traversing the DOM tree and modifying elements will likely not be properly long-lived.

    I've moved this thread to Discussion because the behaviour you've described is intentional. Please don't hesitate to start other threads in Bugs if you discover any other behaviour you believe to be a bug.

  4. #4
    Sencha User
    Join Date
    Oct 2010
    Posts
    18
    Vote Rating
    0
    It_Barney is on a distinguished road

      0  

    Default


    Ok, understood what you mean, thanks for that, but how can I right align the content of this new NumberField ?
    Can you tell me just some hint ?
    Thanks again.