Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-80

Scaffolded entities are not editable on Internet Explorer 8

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.0.0.Beta2
    • Component/s: None
    • Labels:
      None
    • Affects:
      Compatibility/Configuration
    • Workaround Description:
      Hide

      Use Firefox, Chrome etc

      Show
      Use Firefox, Chrome etc
    • Estimated Difficulty:
      Low

      Description

      The entity list produced by scaffold/.../list.xhtml is not editable on IE 8. Probably because the table tags produced by Metawidget are considered to be 'above' (in z-index) the anchor tag, and stop the anchor tag being clicked.

      A few possible workarounds:

      1. Change the Metawidget tag to be...

      <m:metawidget value="#

      {entity}

      " readOnly="true" rendererType="simple"/>

      ...the 'simple' renderer will output spans, not table tags, and so the link is still clickable. You may want a little CSS to space the table tags apart.

      2. Change the Metawidget tag to be...

      <m:metawidget value="#

      {customerBean.list}

      ">
      <f:param name="dataTableRowAction" value="customerBean.load"/>
      </m:metawidget>

      Now Metawidget will render the collection as a DataTable, with a extra column for a 'load' action. It will need a little help to do this. Specifically: a) CustomerBean.getList will need to return a ListDataModel, so that CustomerBean.load can use .getRowData to determine which row was clicked. This is standard JSF behaviour. b) Customer will need either a decent .toString (for a single column table) or some required fields like @Column(nullable = false) getName() so that Metawidget can choose which fields are 'summary' fields for use in table columns

      3. Add in a custom Metawidget WidgetBuilder to render the list just the way you want it

      4. Tweak the z-index order in the CSS, although this may lead to further browser incompatibilities

      Probably 1) is easiest for now?

        Gliffy Diagrams

          Activity

          Hide
          lincolnthree Lincoln Baxter III added a comment -

          Richard, could you please try this again from trunk?

          Let me know if it works with the Z-Index fix. I think that's possibly the easiest for now. Folks can tweak if they need.

          Thanks,
          Lincoln

          Show
          lincolnthree Lincoln Baxter III added a comment - Richard, could you please try this again from trunk? Let me know if it works with the Z-Index fix. I think that's possibly the easiest for now. Folks can tweak if they need. Thanks, Lincoln
          Hide
          kennardconsulting Richard Kennard added a comment -

          No. Metawidget correctly applies the z-index to the XHTML output, but it still doesn't work in IE8. Even if it did, it's a very brittle solution that isn't likely to work on all browsers IMHO.

          I think Option 1 (above) would be much better. It's almost as easy as what you've done. Instead of...

          <m:metawidget value="#

          {entity}" readOnly="true" style="z-index: -50;"/>

          ...just put...

          <m:metawidget value="#{entity}

          " readOnly="true" rendererType="simple"/>

          That should work in all browsers. You'll need a bit of CSS to push the spans apart a little, but that's it.

          Show
          kennardconsulting Richard Kennard added a comment - No. Metawidget correctly applies the z-index to the XHTML output, but it still doesn't work in IE8. Even if it did, it's a very brittle solution that isn't likely to work on all browsers IMHO. I think Option 1 (above) would be much better. It's almost as easy as what you've done. Instead of... <m:metawidget value="# {entity}" readOnly="true" style="z-index: -50;"/> ...just put... <m:metawidget value="#{entity} " readOnly="true" rendererType="simple"/> That should work in all browsers. You'll need a bit of CSS to push the spans apart a little, but that's it.
          Hide
          lincolnthree Lincoln Baxter III added a comment -

          Actually there's a very important question that I need to ask you... not that it's related or influential at all to this situation...

          Why on earth are you using IE8? (Though I'm glad you are at this moment.)

          Show
          lincolnthree Lincoln Baxter III added a comment - Actually there's a very important question that I need to ask you... not that it's related or influential at all to this situation... Why on earth are you using IE8? (Though I'm glad you are at this moment.)
          Hide
          lincolnthree Lincoln Baxter III added a comment -

          Ok. The distribution is working again, you're good to go.

          Show
          lincolnthree Lincoln Baxter III added a comment - Ok. The distribution is working again, you're good to go.
          Hide
          lincolnthree Lincoln Baxter III added a comment -

          Fixed.

          Show
          lincolnthree Lincoln Baxter III added a comment - Fixed.

            People

            • Assignee:
              lincolnthree Lincoln Baxter III
              Reporter:
              kennardconsulting Richard Kennard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development