-
13 Sep 2010 3:41 AM #1
How to load a XML text to an uneditable field?
How to load a XML text to an uneditable field?
Hi,
I am a newbie to Ext and I would like to know the procedure how to do the following.
I have a data store in my webpage, designed by Ext and its being set by a store. For each and every row, there is a button for load a XML message to a new Window same as a pop-up.
I need to implement this using Ext.Window. and I need to add a uneditable field to that window and get the map the XML into that field.
pls help.
p.s: I m using JSON objects to retrive the data from the DB.
-
13 Sep 2010 3:43 AM #2
"Uneditable field"?
You mean you just want to display some XML?Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
13 Sep 2010 3:44 AM #3
You could do it like the "View Source" button does in http://dev.sencha.com/deploy/dev/exa...dropzones.html
(Which is included in your SDK)Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
13 Sep 2010 6:08 PM #4
Here's my code. But the browser says there is a JS Error on page.
Code:var message_store = new Ext.data.GroupingStore({ baseParams:{ajax_command:'viewMsg'}, proxy: new Ext.data.HttpProxy({ url:'/connectivity/viewMsgDetails.ajax' }), reader: new Ext.data.JsonReader({ root:'archive' }, Ext.data.Record.create([ {name: 'textArchive'} ])), groupField:'', fields: ['textArchive'] }); var message_dataField = new Ext.form.displayField({ value: (message_store.getAt(0)).data.textArchive }); var messageForm = new Ext.FormPanel({ labelWidth: 200, frame: true, displayField: 'textArchive', draggable: false, height: 300, width: 800, items: message_dataField, triggerAction: 'all' }); var viewMessage_window = new Ext.Window({ title: '<%=i18NHelper.getString("view.message","connectivity")%>', width: 800, height:300, floating:true, shadow:true, modal:true, layout: 'fit', plain:false, bodyStyle:'padding:5px;', buttonAlign:'center', closeAction: 'hide', draggable :false, items: messageForm, buttons: [{ text: '<%=i18NHelper.getString("label.close","connectivity")%>', handler : function(){ viewMessage_window.hide(); } }], listeners: { scope:this, beforehide: function(viewMessage_window) { noSplash(); } } }); function showMessageWindow(textArchiveDid) { message_store.proxy.conn.url = '/connectivity/searchMsgDetails.ajax?textArchivedid='+ textArchiveDid; message_store.load({params:{start:0, limit:20}}); viewMessage_window.show(); viewMessage_window.setSize(800,300); viewMessage_window.center(); };
-
14 Sep 2010 12:26 AM #5Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Didn't you ask this question already? You should be loading the form itself and not some store.
Similar Threads
-
Load XML data from field into Ext.data.store?
By jfizer in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 22 May 2009, 3:45 PM -
Need API to load xml content instead of xml file in ETX.Panel
By sankarkumar in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 9 May 2009, 10:32 AM -
Not working mapping between text field and xml tag
By Chamster in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 11 Jun 2008, 2:41 PM -
setting field label and field type based on XML value
By brikonwall in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 18 Mar 2008, 7:16 PM -
XML-Form Demo,Why?Can't Load Data From XML, Who can tell me how to do?
By Glen in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 5 Nov 2007, 12:12 PM


Reply With Quote