HZGN.COM
welcome to my space
X
Search:  
Welcome to:hzgn.com
Feng Shui | Graphic Design | Cosmetics | Causes and Organizations | Regulatory Compliance | Gadgets and Gizmos | Computer Forensics | Tools and Equipment | Related articles
NAVIGATION - HOME
setting fieldLabel dynamically
Published by: smith 2009-01-07
  • [2.0][SOLVED] tabs in a form in a window - padding [Archive] - Ext JS ::
    (just as in the examples/form/dynamic.js in the distribution) the result setting. bodyStyle: padding:10px on the tabpanel itself (not on the child panels)
    http://extjs.com/forum/archive/index.php/t-20193.html
    HOME
    Hi,

    I am wondering if I can set labelSeparator of textfields in formPanel dynamically.
    I need to change labelSeparator of one textfield based on user's selection on other combox box in my formPanel.
    Following code is not working right now.
    prescriber is comboBox and state_license is textfield.
    Help on creating a drop =down input box with static values. [Archive ::
    With the jsonTypeList being set from the Business Layer and is a JSonObject and { fieldLabel: Name, hiddenName:name, displayField:text, valueField:value
    http://extjs.com/forum/archive/index.php/t-36713.html
    HOME


    prescriber.on('select',function(){
    if(prescriber.getValue()=='No'){
    state_license.labelSeparator = '*';
    }else{
    state_license.labelSeparator = '';
    }
    });


    Thanks.


  • labelSeparator is just a config containing the text, you can't change at runtime. You could probably do something similar to the examples that remove or hide the label on the fly by using up() to get the container. See this example (http://extjs.com/forum/showthread.php?t=11698).


    var f = frmAttendee.getForm().findField('state_license');
    if(prescriber.getValue()=='Yes'){
    document.getElementById(f.container.up('div.x-form-item').id).childNodes[0].innerHTML = 'State License#*';
    }
    else{
    document.getElementById(f.container.up('div.x-form-item').id).childNodes[0].innerHTML = 'State License#';
    }



    I just changed the fieldLabel by manipulating DOM to show red asterisks. That's fine for me.


  • Hello,
    Can you explain this code to me
    f.container.up('div.x-form-item').id

    I understand that variable 'f' is of type Ext.Form.Field.

    Thanks


  • Hello,
    Can you explain this code to me
    FormPanel Not Loading Dynamic Fields [Archive] - Ext JS Forums::
    the form (form.load) it will not set the value of any of the check { xtype:radio, fieldLabel:status, name:display, boxLabel:show, inputValue:y
    http://extjs.com/forum/archive/index.php/t-30283.html
    HOME
    IMS Common Cartridge Profile::
    2.5 Execution of Dynamic Content - Client-side 15 6.3 Test Data Set 70. Appendix A - Profile XSDs 71. Appendix B - Profile Schema Package 72
    http://ims.edna.edu.au/cc/CCv1p0pd/imscc_profilev1p0pd.html
    HOME
    f.container.up('div.x-form-item').id

    I understand that variable 'f' is of type Ext.Form.Field.

    Thanks

    According to tryanDLS's link http://extjs.com/forum/showthread.php?t=11698, I found that
    f.container.up('div.x-form-item').id is the html id of outer div wrapping around my textfield's label and input text box. I got that from firebug's inspect tool. My fieldlabel is first child node of that div element. I think it could be different for your formpanel layout. You should inspect with your firebug. I can't really explain that code as I got it from above mentioned forum thread. API documentation would help you.


  • Hello,
    Can we control the spacing between a field and its label?

    Thanks
    Hi markfigley,
    Try labelWidth config option when you create formPanel's items.


  • labelSeparator is just a config containing the text, you can't change at runtime. You could probably do something similar to the examples that remove or hide the label on the fly by using up() to get the container. See this example (http://extjs.com/forum/showthread.php?t=11698).


  • Hello,
    Can we control the spacing between a field and its label?

    Thanks


  • labelSeparator is just a config containing the text, you can't change at runtime. You could probably do something similar to the examples that remove or hide the label on the fly by using up() to get the container. See this example (http://extjs.com/forum/showthread.php?t=11698).

    Thanks, I will try that.





  • Red Hat's Rough Recovery From CFO Exit
    Windows Live Finds a New, Pre-installed Home
    PRINT Add to favorites
  • fileupload in a gxt dialog
  • error messages
  • text wrap in table row
  • tabpanel setlayoutdata bug rc2
  • add button as a widget
  • tabpanel layout problems
  • reloading combobox in layoutcontainer
  • formpanel peformance
  • how to do proper layout to see scroll bars using accordion layout
  • best practices for displaying data
  • hiding tabitems
  • setdefaulttheme doesn t work in ff 2 x
  • modal dialog isn t really modal gxt 1 0
  •  
  • treestore loading exception
  • ext all css s padding properties
  • field values being wiped out
  • visualization problems
  • java lang classcastexception com extjs gxt ui client widget layout borderlayout data
  • show hide table column
  • unable to transfer basemodeldata object graphs through gwt rpc
  • form fields bounded to store record
  • add doubleclick handler to textfield
  • possible bug in head and maybe a bugtracking system would be useful
  • table inside tabpanel
  • question about getdata deprecated
  • error displaying a form in a window
  • radio buttons lost field label
  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about setting fieldLabel dynamically , Please add it free.
    About us |Contact us |Advertisement |Site map |Exchange links
    Copyright© 2008hzgn.com All Rights Reserved