1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    193
    Vote Rating
    0
    rbastic is on a distinguished road

      0  

    Default Dynamic compositefields

    Dynamic compositefields


    Hello all,
    I am having what I believe to be a simple problem with ExtJS compositefields and yet the solution is evading me.

    If I have a compositefield with 3 simple fields inside of it, and I'd like to replace the 3rd field dynamically (when a combobox value changes) and have the window re-layout using .doLayout() or some other construct.... How can I do it? I tried manually modifying the .items arrays with the necessary dynamic field (inside a combobox select event) and then calling .doLayout() on the window itself, but it doesn't work.

    Is there a better approach, or simply one that does what I need?

    Thanks in advance. I can possibly post additional code samples if this is not enough.

    Code:
    // Some sample code (incomplete)
    				globals['broadcast_win'] = Radius.makeWindow({
    					title: 'Broadcast Change',
    					width: 620,
    					height: 350,
    					items: [
    						{
    							xtype: 'compositefield',
    							items: [
    								RT.makeLabel('Changes'),
    								RT.makeTextArea({
    									id: 'filters',
    									name: 'filters',
    									autoScroll: true,
    									readOnly: true,
    						            width:275,
    						            height:100							
    								})
    							]
    						},
    						{
    							xtype: 'compositefield',
    							id: 'source_composite',
    							name: 'source_composite',
    							items: [
    								RT.makeLabel('Source:'),
    								fieldCombo1
    								, opCombo
    								, RT.makeLabel('Value:')
    								, srcValue
    								// (value), changes dynamically!
    							]
    						},
    						{
    							xtype: 'compositefield',
    							id: 'target_composite',
    							name: 'target_composite',
    							items: [
    								RT.makeLabel('Target:')
    								, fieldCombo2
    								, RT.makeLabel('Value:')
    								, destValue
    								// (value), changes dynamically!
    							]
    						},
    						RT.makeHtml('* All values are case-sensitive.<br>'),
    						RT.makeHtml('** All broadcast change rules are combined using "AND" conditions.<br>')
    					],
    					buttons: [
    						new Ext.Button({text: 'Add', handler: bcAddHandler }),
    						new Ext.Button({text: 'Remove', handler: bcRemoveHandler }),
    						new Ext.Button({text: 'Broadcast', handler: broadcastHandler }),
    		    			new Ext.Button({text: 'Cancel', handler: broadcastCancelHandler })
    					]
    	    		});	    		
    	    	}
    
    	    	globals['broadcast_win'].show();

  2. #2
    Ext User
    Join Date
    Apr 2008
    Posts
    193
    Vote Rating
    0
    rbastic is on a distinguished road

      0  

    Default Anyone have any ideas?...

    Anyone have any ideas?...


    It really just comes down to replacing individual elements on a page dynamically. Doesn't necessarily have anything to do with 'compositefield' ....

    Anyone have any thoughts?

Similar Threads

  1. Panel with CompositeFields problem - this.items.items[0] is undefined
    By diablo in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 14 Jun 2011, 9:23 PM
  2. Replies: 5
    Last Post: 20 Jan 2011, 12:21 AM
  3. [FIXED-164] xds-1.0.2.0 Corrupts CompositeFields
    By froamer in forum Ext Designer: Bugs
    Replies: 3
    Last Post: 7 Jul 2010, 7:26 AM
  4. Replies: 3
    Last Post: 3 Jun 2010, 5:33 AM

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