Greetings,

I'm having issues with the zone refresh from an AJAX request in Internet Explorer 9 and 10 (it works fine in IE8, firefox, and chrome). I will click on the link and the new content will appear in the zone for about a half-second, then revert back to the original content. Request.isXHR() is returning false, indicating that a non-AJAX request is occurring, which should not be the case. Is there a way to fix what I have or do these versions of Internet Explorer require a different approach to updating a zone and/or AJAX requests? I've included the relevant tml and java code below. Thanks in advance.

-Jonathan Martin

*** tml file ***
 <div>
  <a t:type="actionlink" t:id="showAbout" zone="storefrontZone">
    About
  </a>
</div>

<div>
  <a t:type="actionlink" t:id="showTechPapers" zone="storefrontZone">
    Papers and Presentations
  </a>
</div>

<t:zone t:id="storefrontZone" t:update="show">
  <t:delegate to="selectedBlock" />
  <t:block t:id="aboutBlock">
    <span t:id="about" />
  </t:block>
  <t:block t:id="techPapersBlock">
    <span t:id="techPapers" />
  </t:block>
</t:zone>
*** end of tml ***

*** java file ***
@Inject
private Block _aboutBlock;

@Inject
private Block _techPapersBlock;

@Persist
private StoreFrontBlocks _selectedBlockEnum;

void setupRender(){
    _selectedBlockEnum = StoreFrontBlocks.ABOUT;
}

public Object getSelectedBlock() {
    Object result = null;
    switch (_selectedBlockEnum) {
    case ABOUT:
        result = _aboutBlock;
        break;
    case TECH_PAPERS:
        result = _techPapersBlock;
        break;
    default:
        break;
    }
    return result;
}

Object onActionFromShowAbout() {
    _selectedBlockEnum = StoreFrontBlocks.ABOUT;
    return _request.isXHR() ? _storefrontZone.getBody() : null;
}

Object onActionFromShowTechPapers() {
    _selectedBlockEnum = StoreFrontBlocks.TECH_PAPERS;
    return _request.isXHR() ? _storefrontZone.getBody() : null;
}

private enum StoreFrontBlocks {
    TECH_PAPERS, ABOUT
}
*** end of java ***

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to