Note that there are some explanatory texts on larger screens.

plurals
  1. POImage form field Sencha Touch 2
    primarykey
    data
    text
    <p>I'm trying to create a <em>Sencha Touch 2</em> form panel for a model in which one of the fields contains the <em>URL</em> to an image file. If I include a textfield, it'll display the text of the <em>URL</em> correctly, but what I really want is <strong>to display the image found at that URL</strong>, and I'm not sure how to do that. If I use <code>xtype: image</code>, I think I need a <code>src config</code>, and I'm not sure how to specify that the desired value is in one of the form fields. My view looks like this:</p> <pre><code>Ext.define("CatalogApp.view.ItemDetailView", { extend: "Ext.form.Panel", requires: "Ext.form.FieldSet", alias: "widget.itemdetailview", config:{ scrollable:'vertical' }, initialize: function () { this.callParent(arguments); var backButton = { xtype: "button", ui: "back", text: "Home", handler: this.onBackButtonTap, scope: this }; var topToolbar = { xtype: "toolbar", docked: "top", title: "Item Detail", items: [ backButton ] }; var mainLayout = { xtype: "container", layout: 'hbox', items: [ { xtype: 'textfield', width: 200, name: 'thumbUrl' }, { xtype: "fieldset", flex: 1, items : [ { xtype: 'textfield', name: 'itemNbr', label: 'Item Nbr', disabled: true }, { xtype: 'textfield', name: 'itemDesc', label: 'Item Desc', disabled: true } ] } ] }; this.add([ topToolbar, mainLayout ]); }, onBackButtonTap: function () { console.log("backToHomeCommand"); this.fireEvent("backToHomeCommand", this); } }); </code></pre> <p>How can I set up this view to display the image correctly?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload