Re: t5.1.x: IOC only app

2009-06-27 Thread Juan E. Maya
It works without problem. It even works now with hibernate.
The only thing u have to do is to startup the registry manually

On Sat, Jun 27, 2009 at 3:38 AM, Angelo Chenangelochen...@yahoo.com.hk wrote:

 Hi Thiago,

 Sorry for that.  Need to create a simple command line app and like to use T5
 IOC in it, one way to do that is, follow the article in the wiki which works
 for 5.0.18, sure it will work for 5.1.x, is there a quickstart or a maven
 target that can easily does that job now in 5.1.x?

 Thanks,

 Angelo


 Angelo Chen wrote:

 Hi,

 is there any easier way now to create IOC only app in 5.1.x? or still the
 same as the one documented in wiki? Thanks

 A.C.


 --
 View this message in context: 
 http://www.nabble.com/t5.1.x%3A-IOC-only-app-tp24228790p24229564.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 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: Tapestry 6: Famous last words?

2009-06-27 Thread Piero Sartini
 I expect the T5 IOC to live well beyond the web framework portion.

T5 IoC is very powerful.

But at this point I am not so sure if Tapestry IoC is the best answer to 
flexibility. Take a look at Struts2 - they are able to switch their DI 
implementation by configuration.

This brings them a lot of possibilities and integrations with third party 
frameworks / products that I do not see for tapestry. One could argument that 
this is a much more flexible approach than relying on one DI container.

Piero






 







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



Re: Tapestry 5 and Event component.

2009-06-27 Thread ningdh
It seems that Button is not designed for ajax.
I wonder why you don't try block/zone?

DH

http://www.gaonline.com.cn/

- Original Message - 
From: b...@umd 
To: users@tapestry.apache.org
Sent: Friday, June 26, 2009 2:48 AM
Subject: Re: Tapestry 5 and Event component.


 
 Ok, it seems to come from the parameter String value in my onButtonClicked
 statement. I removed it and the event is now handled. However it appears
 that I am not allowed to return a JSONObject from the OnButtonClicked
 method. May be is it not possible with this kind of component.
 
 But perhaps you can still help me. I am trying to make a research function
 for my interface. For the moment, it works great with the following code :
 
 gentoo.tml :
 t:textfield t:id=textfield t:value=textFieldValue t:mixins=OnEvent
 event=blur onCompleteCallback=onSearchRequest /
 
 
 gentoo.java :
 @OnEvent(component = textfield, value = blur) 
 public JSONObject onBlurEvent(String value) { 
 System.out.println(Event Caught !);
 String translatedValue = Package not found !; 
 try { 
String category=applicationManager.getCategoryFromApplication(value);
if (category != null) {
 translatedValue = This package is located in category
 strong+category+/strong.;
}
return new JSONObject().put(translatedValue,
 translatedValue);}
 catch(Exception e){}
 return new JSONObject().put(translatedValue, translatedValue);
 }
 
 gentoo.js :
 /* This is to update the Textfield component 'result' */
 function onSearchRequest(response) {
 $('result').update(Search result(s) : +response.translatedValue);
 }
 
 My problem is that the search is performed on blur event (when the user
 click anywhere outside the textfield box) whereas I would like to perform it
 when the user click on a button instead. So that is why I believed I could
 trigger this event by changing the blur event into a clicked event.
 
 Does anyone know how I can simply do that ?
 
 
 
 
 
 -- 
 View this message in context: 
 http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24209012.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 


Re: matriz

2009-06-27 Thread Shing Hing Man

There are a few more maths related utilities on 


http://lombok.demon.co.uk/mathToolkit/app


Shing



--- On Fri, 26/6/09, Igor Drobiazko igor.drobia...@gmail.com wrote:

 From: Igor Drobiazko igor.drobia...@gmail.com
 Subject: Re: matriz
 To: Tapestry users users@tapestry.apache.org
 Date: Friday, 26 June, 2009, 2:28 PM
 Very nice component. Where have you
 been when I had my math lectures? :)
 Do you have more?
 
 On Thu, Jun 25, 2009 at 10:19 PM, Shing Hing Man mat...@yahoo.com
 wrote:
 
 
  I have written a component to input a matrix.
  The following page has an example to input a square
 matrix. (The component
  can input a non-square matrix as well.)
 
   http://lombok.demon.co.uk/mathToolkit/algebra/linear/eigenvalue
 
 
  If you like, I can email you the component source
 files.
 
  Shing
 
 
  --- On Thu, 25/6/09, Gutemberg Albuquerque Da Silva
 sag@gmail.com
  wrote:
 
   From: Gutemberg Albuquerque Da Silva sag@gmail.com
   Subject: matriz
   To: Tapestry users users@tapestry.apache.org
   Date: Thursday, 25 June, 2009, 3:48 AM
   anybody knows some solution for
   working editable matriz? I need to catch
   cell of table.
  
   thanks.
  
   --
   Gutemberg Albuquerque Da Silva
  
 
 
 
 
 
 -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
 
 -- 
 Best regards,
 
 Igor Drobiazko
 




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



Re: t5.1.x: IOC only app

2009-06-27 Thread Thiago H. de Paula Figueiredo
Em Fri, 26 Jun 2009 20:40:20 -0300, Angelo Chen  
angelochen...@yahoo.com.hk escreveu:



Hi,


Hello!


is there any easier way now to create IOC only app in 5.1.x? or still the
same as the one documented in wiki? Thanks


Easier than in the wiki?
It should work in T5.1 just as T5. I don't recall any  
backward-incompatible changes from 5.0.18 to 5.1. I just think the line  
registry.performRegistryStartup(); is not needed now. I have a small T-IoC  
5.1-only application that works without that line.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: T5 change grid column header label

2009-06-27 Thread Thiago H. de Paula Figueiredo
Em Sat, 27 Jun 2009 00:28:50 -0300, haipeng du haipen...@gmail.com  
escreveu:



How could I change label for grid header and keep the sorting function.


The easiest way is?: if you property is named xxx, add xxx-label=Desired  
label to your app.properties.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Tapestry 6: Famous last words?

2009-06-27 Thread Thiago H. de Paula Figueiredo
Em Sat, 27 Jun 2009 05:34:09 -0300, Piero Sartini li...@pierosartini.de  
escreveu:



I expect the T5 IOC to live well beyond the web framework portion.


T5 IoC is very powerful.


Yes it is. And it's a pleasure to use.


But at this point I am not so sure if Tapestry IoC is the best answer to
flexibility. Take a look at Struts2 - they are able to switch their DI
implementation by configuration.


I would agree if Tapestry-IoC wasn't flexible enough to support  
integration with other IoC/DI frameworks, but it is. Hint: take a look at  
the T-IoC' ModuleDef interface and how it's used in tapestry-spring.



This brings them a lot of possibilities and integrations with third party
frameworks / products that I do not see for tapestry.


Could you give us some examples of what possibilities and integrations  
with third-party frameworks or products that you do not see for Tapestry?


One could argument that this is a much more flexible approach than  
relying on one DI container.


I don't think so. Look at how Spring is supported in Tapestry: it's  
absolutely transparent. When I need some Spring bean in my page,  
component, mixin or service, it is injected as if it was a Tapestry-IoC  
defined bean (service). My projects are built with Tapestry and  
transactions are handled by Spring-TX. In the future, when the Tapestry  
project will have it's own transaction support, my only changes my project  
will need are changing the Spring's @Transactional annotation for the  
corresponding Tapestry-TX annotations (which I guess will be the EJB 3  
ones). Anything that needs my services/beans will not change.


Tapestry very flexible architecture needs an IoC framework. Otherwise, it  
would lose a lot of power, simplicity, convention over configuration and


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: gridtable with hashmap

2009-06-27 Thread nille hammer
Hi Gutemberg,

Grid needs a collection as its source parameter. HashMap (i.e. the 
Map-Interface) is no collection itsself, but provides two methods to get the 
collections  CollectionV values() or  SetMap.EntryK,V entrySet(). Use 
one of those as source for Grid.

One sidenote, HashMap does not garantuee the order of its elements. I.e. the 
order might be different on every iteration. That might not look very good to 
your users. You should consider switching the implementation to LinkedHashMap 
or even change the interface to SortedMap and use its implementation TreeMap.

Regards, nillehammer

==
http://www.winfonet.eu

- original Nachricht 

Betreff: gridtable with hashmap
Gesendet: Fr, 26. Jun 2009
Von: Gutemberg Albuquerque Da Silvasag@gmail.com

 somebody knows to make one gridtable with one hashmap?
 
 thanks.
 
 -- 
 Gutemberg Albuquerque Da Silva
 

--- original Nachricht Ende 


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



T5 ajax examples

2009-06-27 Thread haipeng du
What is the good reference for ajax in T5? I did not find any good
documentation from T5 website.
Thanks.

-- 
Haipeng Du
Salt Lake City


Re: T5 ajax examples

2009-06-27 Thread Sergey Didenko
See Ajax  JavaScript in User Guide pane on this page:
http://tapestry.apache.org/tapestry5.1/

On Sun, Jun 28, 2009 at 12:10 AM, haipeng duhaipen...@gmail.com wrote:
 What is the good reference for ajax in T5? I did not find any good
 documentation from T5 website.

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



Returning a file attachment and a page together in a request

2009-06-27 Thread Raghu Yegavakota
I am a newbie to Tapestry and have a question: I have a downloads page that
displays a list of files to the user. When the user clicks on any file link
I need to do one of two things:

1)  If the user is logged in, I need to send the selected file as an
attachment to the browser
2)  If the user is not logged in,  I need to display the Login page. One the
user is successfully logged in, I need to display the downloads page and
also send the selected file as an attachment.

I am able to do (1) using StreamResponse but not sure how to solve (2)- send
a Page response back and a file as an attachment.

Any help is greatly appreciated.

Thanks,
Raghu.


Re: Returning a file attachment and a page together in a request

2009-06-27 Thread Thiago H. de Paula Figueiredo
Em Sat, 27 Jun 2009 23:00:42 -0300, Raghu Yegavakota  
raghu.tapes...@gmail.com escreveu:



I am a newbie to Tapestry and have a question:


Welcome! :)

I am able to do (1) using StreamResponse but not sure how to solve (2)-  
send a Page response back and a file as an attachment.


To redirect the user to a page (Login, for example), just return a page  
instance (got through @InjectPage) or the page class instance  
(Login.class) in the onActivate() method instead of the StreamResponse.


As far as I know, you can't return a page and an attachment in the same  
request. Using Javascript (window.location = ...;) in the returned page,  
you can instruct the user's browser to make another request (in this case,  
a file as an attachment).


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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