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



   
 Papers and Presentations
   



   
   
 
   
   
 
   

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



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



   
 Papers and Presentations
   



   
   
 
   
   
 
   

*** 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: [5.4] Use Individual Bootstrap Javascript Files Instead of Just bootstrap.js

2013-08-19 Thread Felix Gonschorek
what you can do is a small hack: you can
point org.apache.tapestry5.SymbolConstants.BOOTSTRAP_ROOT to a folder with
an empty bootstrap.js file and then care by yourselfes to include it
everywhere, where it's needed.

you could include the minimum bootstrap.js in the border layout and then
include the additions (e.g. boostrap-dropdown.js) the same way you are
doing it currently where it's needed.


On Mon, Aug 19, 2013 at 1:54 PM, Peter Hvass  wrote:

> Hi Thiago,
>
>
> Thanks for the reply. I don't think I was clear enough in my first post!
>
>
> In the instance where this is affecting us;
>
>
> Our BootstrapDropdown mixin includes Bootstrap's bootstrap-dropdown.js
> and Tapestry's core components (in this case, Errors) is including
> bootstrap.js.
>
>
> Since bootstrap.js also contains the contents of bootstrap-dropdown.js we
> get a
> double execution.
>
>
> I'm aware that we could just opt to use bootstrap.js ourselves but I was
> wondering
> whether anyone on the dev team would deem using the individual
> bootstrap-*.js files useful
> and more modular as opposed to piling in the entire bootstrap.js each time.
>
>
> Thanks!
> Peter
>
> - Original Message -
>
> From: "Thiago H de Paula Figueiredo" 
> To: "Tapestry users" 
> Sent: Monday, August 19, 2013 2:44:51 PM
> Subject: Re: [5.4] Use Individual Bootstrap Javascript Files Instead of
> Just bootstrap.js
>
> On Mon, 19 Aug 2013 07:10:43 -0300, Peter Hvass 
> wrote:
>
> > Hi all,
>
> Hi!
>
> > We're running into issues where bootstrap.js is included by various core
> > components and scripts are executing twice!
>
> Tapestry checks for duplicate additions of the same file and adds it only
> once, so there's something wrong here: your code or Tapestry. How did you
> include the JS files in your components?
>
> --
> 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 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 
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 ***
  
   
 About
   



   
 Papers and Presentations
   



   
   
 
   
   
 
   

*** 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: [5.4] Use Individual Bootstrap Javascript Files Instead of Just bootstrap.js

2013-08-19 Thread Howard Lewis Ship
It's something that could be visited, but since the bootstrap JS files are
not modules, it would require naming and shimming each one, especially
because there are some dependencies between them.


On Mon, Aug 19, 2013 at 4:54 AM, Peter Hvass  wrote:

> Hi Thiago,
>
>
> Thanks for the reply. I don't think I was clear enough in my first post!
>
>
> In the instance where this is affecting us;
>
>
> Our BootstrapDropdown mixin includes Bootstrap's bootstrap-dropdown.js
> and Tapestry's core components (in this case, Errors) is including
> bootstrap.js.
>
>
> Since bootstrap.js also contains the contents of bootstrap-dropdown.js we
> get a
> double execution.
>
>
> I'm aware that we could just opt to use bootstrap.js ourselves but I was
> wondering
> whether anyone on the dev team would deem using the individual
> bootstrap-*.js files useful
> and more modular as opposed to piling in the entire bootstrap.js each time.
>
>
> Thanks!
> Peter
>
> - Original Message -
>
> From: "Thiago H de Paula Figueiredo" 
> To: "Tapestry users" 
> Sent: Monday, August 19, 2013 2:44:51 PM
> Subject: Re: [5.4] Use Individual Bootstrap Javascript Files Instead of
> Just bootstrap.js
>
> On Mon, 19 Aug 2013 07:10:43 -0300, Peter Hvass 
> wrote:
>
> > Hi all,
>
> Hi!
>
> > We're running into issues where bootstrap.js is included by various core
> > components and scripts are executing twice!
>
> Tapestry checks for duplicate additions of the same file and adds it only
> once, so there's something wrong here: your code or Tapestry. How did you
> include the JS files in your components?
>
> --
> Thiago H. de Paula Figueiredo
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com


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



  
Papers and Presentations
  



  
  

  
  

  

*** 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: [5.4] Use Individual Bootstrap Javascript Files Instead of Just bootstrap.js

2013-08-19 Thread Peter Hvass
Hi Thiago, 


Thanks for the reply. I don't think I was clear enough in my first post! 


In the instance where this is affecting us; 


Our BootstrapDropdown mixin includes Bootstrap's bootstrap-dropdown.js 
and Tapestry's core components (in this case, Errors) is including 
bootstrap.js. 


Since bootstrap.js also contains the contents of bootstrap-dropdown.js we get a 
double execution. 


I'm aware that we could just opt to use bootstrap.js ourselves but I was 
wondering 
whether anyone on the dev team would deem using the individual bootstrap-*.js 
files useful 
and more modular as opposed to piling in the entire bootstrap.js each time. 


Thanks! 
Peter 

- Original Message -

From: "Thiago H de Paula Figueiredo"  
To: "Tapestry users"  
Sent: Monday, August 19, 2013 2:44:51 PM 
Subject: Re: [5.4] Use Individual Bootstrap Javascript Files Instead of Just 
bootstrap.js 

On Mon, 19 Aug 2013 07:10:43 -0300, Peter Hvass  
wrote: 

> Hi all, 

Hi! 

> We're running into issues where bootstrap.js is included by various core 
> components and scripts are executing twice! 

Tapestry checks for duplicate additions of the same file and adds it only 
once, so there's something wrong here: your code or Tapestry. How did you 
include the JS files in your components? 

-- 
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: [5.4] Use Individual Bootstrap Javascript Files Instead of Just bootstrap.js

2013-08-19 Thread Thiago H de Paula Figueiredo
On Mon, 19 Aug 2013 07:10:43 -0300, Peter Hvass   
wrote:



Hi all,


Hi!

We're running into issues where bootstrap.js is included by various core  
components and scripts are executing twice!


Tapestry checks for duplicate additions of the same file and adds it only  
once, so there's something wrong here: your code or Tapestry. How did you  
include the JS files in your components?


--
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: What do we need to learn to use Tapestry 5.4 ?

2013-08-19 Thread Thiago H de Paula Figueiredo
On Sat, 17 Aug 2013 18:11:13 -0300, Muhammad Gelbana   
wrote:


As far as I understand. T5.4 will have a major refactor for the client  
side related code.


They're backward-compatible changes, at least most of them. Documentation  
will be updated when the release is done. Anyway, this post by Steve Eynon  
was everything I needed to start writing my JavaScript under the new T5.4  
JS API:  
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/5-4-Javascript-best-practices-td5719568.html.



And I've passed by many Javascript libraries names like
Backbone, Coffescript and others.


Actually, you don't need to use none of them. Only if you want. T5.4 will  
include automatically compilation of CoffeeScript to JavaScript. I don't  
know where you took that Backbone was going to be used, because it won't.


--
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: What do we need to learn to use Tapestry 5.4 ?

2013-08-19 Thread Lance Java
AFAIK, the main thing you need to learn with tapestry 5.4 is the new
javascript module loading via require.js. Existing js will need require
wrappers. See this thread for some clarification

http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/5-4-Javascript-best-practices-td5719568.html

Also, tapestry 5.4 includes bootstrap CSS/JS so the look and feel has
changed quite drastically. I assume some components have needed to change
slightly to be more "bootstrappy" (eg fields and labels in beaneditform).

There is also the option to write js in coffeescript and css in less. These
are optional and you can continue to code in js and css if you prefer. I
think most of the tapestry js was rewritten as coffeescript, not sure about
the css?

Apart from that, I think it's all the same. I only had a couple of day
playing with 5.4 until I hit this bug and had to switch back
https://issues.apache.org/jira/browse/TAP5-2060.
Note: That bug is now fixed.

Cheers,
Lance.


[5.4] Use Individual Bootstrap Javascript Files Instead of Just bootstrap.js

2013-08-19 Thread Peter Hvass
Hi all, 


Just wondering what you all think about including bootstrap's js in a more 
modular fashion 
(i.e. as it appears when downloaded directly from github, each component's js 
is in its own file). 


Before 5.4 we were using these modular files to be able to pick and choose 
which bits of the bootstrap 
js we pull down. One example is Bootstrap's Dropdown for which we have a mixin 
that goes; 
@Import(module = Bootstrap.DROPDOWN) 


Where Bootstrap.java contains a bunch of constants pointing to the various js 
files. (i.e.: "bootstrap/js/dropdown.js"). 


We're running into issues where bootstrap.js is included by various core 
components and scripts are executing twice! 
If there's no hope for this to be included or overridden (somehow) then we'll 
just opt for using the full bootstrap.js I guess. 


Thanks again! 
Peter 



Re: Weaves library

2013-08-19 Thread Emmanuel DEMEY
You are right. The library use jQuery, but not Tapestry5-jQuery :s.

Do you have JavaScript errors ? Can you check the request sent by the
actionLink is an Ajax request ?

Manu


2013/8/16 David Canteros 

> Sorry, I forgot the code.  There is nothing special, I have only included a
> component called "PagedGrid" in the TML(instead of the classic Grid) file
> and a code for specific GridDataSource in java file. The component works
> fine, but the ajax actionlink  throw the mentioned exception. This only
> happen in the page which i added the component.
>
> TML:
>
>  pagedsource="TestPagedSource">
>
> ${greeting}!
>
>
> JAVA:
>
> public CollectionPagedGridDataSource getTestPagedSource() {
> return new CollectionPagedGridDataSource(this.bookingsResultDS,
> BookingHolder.class);
> }
>
> @Component
> private Zone testZone;
>
>  public String getGreeting(){
>return "Hello";
>  }
>
> public Object onActionFromTest() {
>   return testZone.getBody();
> }
>
>
> --
> David Germán Canteros
>
>
> 2013/8/16 David Canteros 
>
> > The link: https://github.com/intercommit/Weaves
> >
> > I'm pretty sure that "weaves" uses jquery (in the repository I saw the
> > files jquery-1.9.1.min.js and jquery_init.js), can we have a conflict
> > between jquery from weaves and jquery from tapestry5-jquery?
> >
> > --
> > David Germán Canteros
> >
> >
> > 2013/8/16 Emmanuel DEMEY 
> >
> >> I do not think tapestry jquery is the problem. I am maybe wrong. Does
> >> Weaves use tapestry jquery? Can you give a link to this library and some
> >> codes.
> >> Manu
> >> Le 16 août 2013 17:40, "David Canteros"  a
> >> écrit :
> >>
> >> > Hi!
> >> > I'm improving my T5 app interface and during this process I found the
> >> > excellent library called "Weaves". I want to test the "PagedGrid"
> >> > component, it looks great! But I have a little problem:
> >> > when I replace the standard grid by the pagedgrid then all of the ajax
> >> > actionlinks stop working. The pagedgrid seems to work fine, but when i
> >> > click in any "action link" then the application response with the
> >> message
> >> > "Page must be specified before initializing for partial page render."
> >> > Before add the pagedgrid the actionlinks were working fine,.. Any
> ideas?
> >> >
> >> > I'm using tapestry 5.3.7 with org.got5.tapestry5-jquery, may be this
> >> last
> >> > library could be related??
> >> >
> >> > Thanks in advance!
> >> > David
> >> >
> >> >
> >> > --
> >> > David Germán Canteros
> >> >
> >>
> >
> >
>



-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emman...@gmail.com
http://emmanueldemey.fr/

Twitter : @EmmanuelDemey