1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    13
    Vote Rating
    0
    chuckie474 is on a distinguished road

      0  

    Default Unanswered: Validation on Read-Only document

    Unanswered: Validation on Read-Only document


    My application has a document that contains a button to move it from a "Draft" state to a "Publish" state. The document itself is in "view-mode" meaning that all the model data within is displayed using a combination of content panels and HTML span elements. When the document goes from Draft to Publish, all of the data within the model has to be validated. I'd like to reuse some of the validation icons/tooltip messages that is used in the TextField components to keep the user experience consistent. Is it possible to do something like this?

    For example, I'd like to show the "!" icon next to the Admin heading and the Description label below, with a tooltip explaining what the error is:

    <gxt:FramedPanel ui:field="adminFrame" headingText="Admin">
    <g:VerticalPanel spacing="5">
    <span class="fieldLabel">Name:</span>
    <span class="fieldText" ui:field="nameFld"/>
    <span class="fieldLabel">Address:</span>
    <span class="fieldText" ui:field="addressFld"/>
    <span class="fieldLabel">Description:</span>
    <span class="fieldText" ui:field="descFld"/>
    </g:VerticalPanel>
    </gxt:FramedPanel>

    Thanks!

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,643
    Answers
    107
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    The errors on fields are drawn by one of the four built-in ErrorHandler classes. They are designed to modify a widget to either show or clear errors. It may be possible for you to use them outside of the Fields they were built to work with. The default is a SideErrorHandler, which draws the '!' icon off to the right - that would probably be a good place to start.

  3. #3
    Sencha User
    Join Date
    Jul 2011
    Posts
    13
    Vote Rating
    0
    chuckie474 is on a distinguished road

      0  

    Default


    Thanks, I was looking into that, but in order to mark a section invalid to display the "!" icon using the markInvalid() method, you have to pass in a list of EditorError. EditorError has to be linked to an Editor, and I don't have one of those on my document.

    I'm kind of heading in that direction where I can use the same TipAppearance and image that SideErrorHandler uses, but the trick is trying to get it to display in the ContentPanel header. I can't use the addTool() method, since it needs to go to the left of the heading text, e.g.:

    "!" Admin

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar