Re: AJAX zone refresh not working in IE9 and IE10

2013-08-29 Thread Jonathan Martin
After some debugging, I've found that when a zone update is initiated 
all browsers call the 'onAction' function associated with the clicked 
action or event link. However, only IE9 and IE10 proceed to call 
'setupRender' and do a full page refresh, resetting the entire page.


This is why the null check fixed my earlier problem, but the issue is 
still occurring in code that is more complicated. Any ideas on why 
'setupRender' is being called each time an action/event link is clicked?


On 8/28/2013 3:52 PM, Jonathan Martin wrote:
* Although I fixed my original issue, I'm getting the same exception 
elsewhere. Every case I find this error occurring, it involves an 
actionlink trying to do a zone update. It is my understanding that 
this invokes an AJAX request and, for some reason I have not found 
yet, only IE9 and IE10 throw an exception.


* Is there any Tapestry documentation or related issues regarding the 
error Page must be specified before initializing for partial page 
render? My searches have come up nil and I'm curious what other 
people have done to fix this.


* a component inside a zone declared in the parent page or component
Could you elaborate on this in regards to how this may cause the 
exception to occur?


On 8/21/2013 10:27 PM, Geoff Callender wrote:

Are you sure that's what was happening - how is it IE-related?

If the zone to update is *inside* the page or component that has a
setupRender(), then setupRender() *will not be called* during 
handling of

an Ajax event request (see
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/whatiscalledandwhen 


).

So I'd guess that either you have a component inside a zone declared 
in the

parent page or component, or the request is not Ajax.


On 22 August 2013 01:18, Jonathan Martin jmar...@aer.com wrote:

I figured out what was happening. I was using the 'setupRender' 
method to

set the default value for the enumeration, like this:
 void setupRender() {
 _selectedBlockEnum = StoreFrontBlocks.HOME;
 }

I didn't realize until now that this method is called after an 
'onAction'

method, effectively overwriting the value set in the 'onAction' method.
Therefore I changed 'setupRender' to this:
 void setupRender() {
 if (_selectedBlockEnum == null) {
 _selectedBlockEnum = StoreFrontBlocks.HOME;
 }
 }

-Jonathan Martin


On 8/19/2013 4:15 PM, Thiago H de Paula Figueiredo wrote:


On Mon, 19 Aug 2013 16:15:47 -0300, Jonathan Martin jmar...@aer.com
wrote:

  Tapestry version 5.3.6
Hmm, it should have an up-to-date version. Have you checked the 
browser

error console for JavaScript errors?



On 8/19/2013 2:22 PM, Thiago H de Paula Figueiredo wrote:


Hi!

Whch Tapestry version? Old ones use an old version of Prototype that
didn't support IE9 and IE10 yet. Your code and template look ok.


On Mon, 19 Aug 2013 12:07:25 -0300, Jonathan Martin 
jmar...@aer.com

wrote:

  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 ***


Re: AJAX zone refresh not working in IE9 and IE10

2013-08-28 Thread Jonathan Martin
* Although I fixed my original issue, I'm getting the same exception 
elsewhere. Every case I find this error occurring, it involves an 
actionlink trying to do a zone update. It is my understanding that this 
invokes an AJAX request and, for some reason I have not found yet, only 
IE9 and IE10 throw an exception.


* Is there any Tapestry documentation or related issues regarding the 
error Page must be specified before initializing for partial page 
render? My searches have come up nil and I'm curious what other people 
have done to fix this.


* a component inside a zone declared in the parent page or component
Could you elaborate on this in regards to how this may cause the 
exception to occur?


On 8/21/2013 10:27 PM, Geoff Callender wrote:

Are you sure that's what was happening - how is it IE-related?

If the zone to update is *inside* the page or component that has a
setupRender(), then setupRender() *will not be called* during handling of
an Ajax event request (see
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/whatiscalledandwhen
).

So I'd guess that either you have a component inside a zone declared in the
parent page or component, or the request is not Ajax.


On 22 August 2013 01:18, Jonathan Martin jmar...@aer.com wrote:


I figured out what was happening. I was using the 'setupRender' method to
set the default value for the enumeration, like this:
 void setupRender() {
 _selectedBlockEnum = StoreFrontBlocks.HOME;
 }

I didn't realize until now that this method is called after an 'onAction'
method, effectively overwriting the value set in the 'onAction' method.
Therefore I changed 'setupRender' to this:
 void setupRender() {
 if (_selectedBlockEnum == null) {
 _selectedBlockEnum = StoreFrontBlocks.HOME;
 }
 }

-Jonathan Martin


On 8/19/2013 4:15 PM, Thiago H de Paula Figueiredo wrote:


On Mon, 19 Aug 2013 16:15:47 -0300, Jonathan Martin jmar...@aer.com
wrote:

  Tapestry version 5.3.6
Hmm, it should have an up-to-date version. Have you checked the browser
error console for JavaScript errors?



On 8/19/2013 2:22 PM, Thiago H de Paula Figueiredo wrote:


Hi!

Whch Tapestry version? Old ones use an old version of Prototype that
didn't support IE9 and IE10 yet. Your code and template look ok.


On Mon, 19 Aug 2013 12:07:25 -0300, Jonathan Martin jmar...@aer.com
wrote:

  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-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org





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





--**--**-
To 

Re: AJAX zone refresh not working in IE9 and IE10

2013-08-21 Thread Jonathan Martin
I figured out what was happening. I was using the 'setupRender' method 
to set the default value for the enumeration, like this:

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

I didn't realize until now that this method is called after an 
'onAction' method, effectively overwriting the value set in the 
'onAction' method. Therefore I changed 'setupRender' to this:

void setupRender() {
if (_selectedBlockEnum == null) {
_selectedBlockEnum = StoreFrontBlocks.HOME;
}
}

-Jonathan Martin

On 8/19/2013 4:15 PM, Thiago H de Paula Figueiredo wrote:
On Mon, 19 Aug 2013 16:15:47 -0300, Jonathan Martin jmar...@aer.com 
wrote:



Tapestry version 5.3.6


Hmm, it should have an up-to-date version. Have you checked the 
browser error console for JavaScript errors?




On 8/19/2013 2:22 PM, Thiago H de Paula Figueiredo wrote:

Hi!

Whch Tapestry version? Old ones use an old version of Prototype that
didn't support IE9 and IE10 yet. Your code and template look ok.


On Mon, 19 Aug 2013 12:07:25 -0300, Jonathan Martin jmar...@aer.com
wrote:


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







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







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



Re: AJAX zone refresh not working in IE9 and IE10

2013-08-20 Thread Jonathan Martin

Here's what the error console looks like after I click on a link:*
**HTML1114: Codepage utf-8 from (HTTP header) overrides conflicting 
codepage iso-8859-1 from (META tag) **

**start.showabout;jsessionid=1a4um0obrqkoj1a9azzoceuogx**
**HTML1113: Document mode restart from Quirks to IE9 Standards **
**start**
**HTML1114: Codepage utf-8 from (HTTP header) overrides conflicting 
codepage iso-8859-1 from (META tag) **

**start

*Previously, a separate zone was attached to each link and the 
AjaxResponseRenderer was used to render the selected zone. Clicking on 
the link using this style resulted in the following exception:


*Exception = org.apache.tapestry5.ioc.internal.OperationException: Page must be 
specified before initializing for partial page render. [at context:Start.tml, 
line 102]
Cause = org.apache.tapestry5.runtime.ComponentEventException: Page must be 
specified before initializing for partial page render. [at context:Start.tml, 
line 102]*

Hopefully this provides some clue as to what's happening.

On 8/19/2013 4:15 PM, Thiago H de Paula Figueiredo wrote:
On Mon, 19 Aug 2013 16:15:47 -0300, Jonathan Martin jmar...@aer.com 
wrote:



Tapestry version 5.3.6


Hmm, it should have an up-to-date version. Have you checked the 
browser error console for JavaScript errors?




On 8/19/2013 2:22 PM, Thiago H de Paula Figueiredo wrote:

Hi!

Whch Tapestry version? Old ones use an old version of Prototype that
didn't support IE9 and IE10 yet. Your code and template look ok.


On Mon, 19 Aug 2013 12:07:25 -0300, Jonathan Martin jmar...@aer.com
wrote:


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







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








AJAX zone refresh not working in IE9 and IE10

2013-08-19 Thread Jonathan Martin

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



Re: AJAX zone refresh not working in IE9 and IE10

2013-08-19 Thread Thiago H de Paula Figueiredo

Hi!

Whch Tapestry version? Old ones use an old version of Prototype that
didn't support IE9 and IE10 yet. Your code and template look ok.


On Mon, 19 Aug 2013 12:07:25 -0300, Jonathan Martin jmar...@aer.com
wrote:


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




--
Thiago H. de Paula Figueiredo

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



Re: AJAX zone refresh not working in IE9 and IE10

2013-08-19 Thread Jonathan Martin

Tapestry version 5.3.6

On 8/19/2013 2:22 PM, Thiago H de Paula Figueiredo wrote:

Hi!

Whch Tapestry version? Old ones use an old version of Prototype that
didn't support IE9 and IE10 yet. Your code and template look ok.


On Mon, 19 Aug 2013 12:07:25 -0300, Jonathan Martin jmar...@aer.com
wrote:


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







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



Re: AJAX zone refresh not working in IE9 and IE10

2013-08-19 Thread Thiago H de Paula Figueiredo
On Mon, 19 Aug 2013 16:15:47 -0300, Jonathan Martin jmar...@aer.com  
wrote:



Tapestry version 5.3.6


Hmm, it should have an up-to-date version. Have you checked the browser  
error console for JavaScript errors?




On 8/19/2013 2:22 PM, Thiago H de Paula Figueiredo wrote:

Hi!

Whch Tapestry version? Old ones use an old version of Prototype that
didn't support IE9 and IE10 yet. Your code and template look ok.


On Mon, 19 Aug 2013 12:07:25 -0300, Jonathan Martin jmar...@aer.com
wrote:


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







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




--
Thiago H. de Paula Figueiredo

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