Creating an HTML "popup" or pane?

edited February 2012 in Enyo 1.0
I've tried adding HTML tags to a Popup kind and I get the raw HTML, and not the table I expected.

I'm trying to temporarily display a report as a table in a popup. I don't really want to create a new Pane, as the data will have changed before it is displayed again, and I don't want the user to be able to go back to the previous pane later.

Any suggestions?...........Phil

Comments

  • Are you adding a HTMLContent kind within the popup? This works for me. So, create the popup kind, and as a component, add the HTML content. Within the HTMLContent, include your html-formatted stuff.
  • In Enyo 1.0, kinds default to having any HTML in the content attribute escaped. Fix this in your control definition by adding the attribute 'allowHtml' set to true.
  • edited February 2012

    {name: "mdAbout", kind: "ModalDialog", caption: "About TouchTax", dismissWithClick: true, components: [
    {layoutKind: "HFlexLayout", pack: "center", components: [
    {kind: "Image", src: "icon.png", onclick: "actionOpenSupport"},
    {kind: "HtmlContent", style: "padding-left: 10px; font-size: 75%", components: [
    {content: "TouchTax - Mobile
    Tax Code and Regulations
    2.0.1 (20120216)
    "}
    ]}
    ]},
    {kind: "HtmlContent", style: "padding-left: 10px; font-size: 75%", components: [
    {content: "Copyright © 2012 BlackCatWorks Enterprises. All Rights Reserved.
    TouchTax is your convenient mobile tax reference solution for webOS (HP TouchPad, Pre, Veer), Android tablets and phones, Apple iOS (iPhone and iPad) phones and tablets and the BlackBerry PlayBook. Made with 100% enyo:"} ]}, {layoutKind: "HFlexLayout", pack: "center", components: [ {kind: "Image", src: "images/enyo-logo.png", onclick: "actionGoEnyo"} ]}, {layoutKind: "HFlexLayout", pack: "center", components: [ {kind: "Button", caption: "Go back", onclick: "actionAboutGoBack"} ]} ]},
  • Thanks. Using allowHTML: true didn't seem to work with the existing Control, but changing it to HtmlContent gave me what I wanted, provided I didn't specify components with content in the kind. Instead, without components, I've used setContent() to achieve the desired result.

    Now that I've got the Popup to work, I sometimes have to refresh the screen, as the Popup leaves a blank space when it closes. Will using refresh() on the main screen's VFlexBox work?

    ............Phil
  • I've now realised that allowHtml: true was what I should have used, but HtmlContent works, so I'm sticking with that for now.

    .........Phil
Sign In or Register to comment.