Re: T5: using a filter to manage virtual hosts

2007-12-18 Thread Andy Huhn
Hi Angelo,

My solution didn't end up being elegant or complicated.

Every page has a RqeustGlobals injected into it.  And every page has a
pageAttached method something like this:

public void pageAttached()  {
.
.
HttpServletRequest r = _rqstGlbls.getHTTPServletRequest();
setSrvrName( r.getServerName() );
.
.
}

That did the trick!  I didn't have to use any kind of dispatcher or
request filter.

Andy

On Tue, 2007-12-18 at 18:51 -0800, Angelo Chen wrote:
> Hi Andy,
> 
> Were you able to make it run? any tips on accomplishing this? thanks,
> 
> A.C.
> 
> 
> Andy Huhn wrote:
> > 
> > All,
> > 
> > I'm writing an app that will make use of virtual hosts (so that
> > domain1.com, domain2.org, etc. will all point to the same application).
> > The sticky piece is that each page will need to know the hostname by
> > which it was referenced--the data displayed on the page will be
> > different for each virtual host.
> > 
> > As mentioned here
> > 
> > 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using in Tapestry 5

2007-12-18 Thread Yeeswara Nadapana (HCL Financial Services)

Hi,

 

I am new to Tapestry5 and this is my first mail to the group. Can anyone
please explain me the procedure to add a  box to my form? If I
write as: 

 



 

What goes behind the scene? Please explain me what each parameter does?
I couldn't find any tutorial which goes deep into this framework. Also,
please suggest me with some useful links.

 

Thanks

Yeeswara N


***

This mail is transmitted to you on behalf of HCL Technologies.

Diese Post wird Ihnen im Namen der HCL Technologies ubermittelt




 



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.
---

T5:why my dispatcher not got called?

2007-12-18 Thread Angelo Chen

Hi,

I have a dispatcher that I like it to be called before page renders, problem
is, it was never called in the program, anything I miss here? thanks.

Code:

public class LocaleDispatcher implements Dispatcher {
public boolean dispatch(Request request, Response response) throws
IOException {
System.out.println("locale dispatcher");
return false;  
}

in appModule:

   binder.bind(LocaleDispatcher.class).withId("LocaleDispatcher");
   
public static void
contributeLocaleDispatcher(OrderedConfiguration configuration,
@InjectService("LocaleDispatcher") Dispatcher
localeDispatcher) {
configuration.add("LocaleDispatcher", localeDispatcher,
"before:PageRender");
}
-- 
View this message in context: 
http://www.nabble.com/T5%3Awhy-my-dispatcher-not-got-called--tp14411701p14411701.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5-Can't find Ajax doco under tapestry-code

2007-12-18 Thread Howard Lewis Ship
Yes, and that's the point.  The formos site contains nightly builds
and up to date documentation for *unreleased* code.

The main site contains documentation for the most recent release.

On Dec 18, 2007 7:47 PM, Weisu <[EMAIL PROTECTED]> wrote:
>
> Sorry, I can see it now.
> But if you go through the normal website, it is not there. Just in case
> someone is interest in this topic.
> it is under this link:
> http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/ajax.html
> Wei.
>
>
> --
> View this message in context: 
> http://www.nabble.com/T5-Can%27t-find-Ajax-doco-under-tapestry-code-tp14408734p14410747.html
>
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship
TWD Consulting, Inc.

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5-Can't find Ajax doco under tapestry-code

2007-12-18 Thread Weisu

Sorry, I can see it now.
But if you go through the normal website, it is not there. Just in case
someone is interest in this topic.
it is under this link:
http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/ajax.html
Wei.


-- 
View this message in context: 
http://www.nabble.com/T5-Can%27t-find-Ajax-doco-under-tapestry-code-tp14408734p14410747.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: using a filter to manage virtual hosts

2007-12-18 Thread Angelo Chen

Hi Andy,

Were you able to make it run? any tips on accomplishing this? thanks,

A.C.


Andy Huhn wrote:
> 
> All,
> 
> I'm writing an app that will make use of virtual hosts (so that
> domain1.com, domain2.org, etc. will all point to the same application).
> The sticky piece is that each page will need to know the hostname by
> which it was referenced--the data displayed on the page will be
> different for each virtual host.
> 
> As mentioned here
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-using-a-filter-to-manage-virtual-hosts-tp13878517p14410237.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Quartz and the IoC Registry?

2007-12-18 Thread Andy Huhn
Thanks, Howard...ServiceResources did the trick!

On Sat, 2007-12-15 at 06:53 -0800, Howard Lewis Ship wrote:
> The Registry is not exposed, a service may be passed its
> ServiceResources via a constructor parameter. This is an extension of
> ServiceLocator, which includes all the key methods of Registry,
> allowing services to be obtained by type or by service id.
> 
> In addition, starting in 5.0.7., service proxies are serializable,
> which helps when integrating with Quartz.  You can store a reference
> to a service in a non-transient field of your Job.  I did some Quartz
> integration for a project using the 5.0.5 code, and it required
> jumping through some serious hoops.
> 
> In fact, that code code was an example of why I think you are going
> down the wrong path.  I had a JobRunner service that tooks mapped
> contribution of ScheduledJobs; the ScheduledJob was a wrapper around
> some scheduling information and a Runnable object.  Dependencies were
> injected into the contribute method(s) and packaged up as Runnable's
> that are part of the configuration.  The JobRunner was @EagerLoad.
> 
> On Dec 14, 2007 9:22 PM, Andy Huhn <[EMAIL PROTECTED]> wrote:
> > All,
> >
> > I'd like to use Quartz with tapestry.  As such, I'd like to get a
> > reference to the Registry and pass it into a Tapestry service (so that I
> > can use it in my Quartz jobs to instantiate all of my DAOs and Hibernate
> > Sessions).
> >
> > I saw some discussion here on the list a few days ago about the
> > Registry...it sounds like it's not exposed to services at all.  Is this
> > true?  Does anyone have any ideas how I can get a reference to it?
> >
> > I have also thought about building a completely new registry inside this
> > service for all of the quartz jobs to use, but my guess is that there
> > would be quite an impact on the machine's resources.  Does anyone have a
> > good feel for how much memory I can expect to give up if I instantiate a
> > second instance of the Registry?
> >
> > Thanks,
> > Andy
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5-Can't find Ajax doco under tapestry-code

2007-12-18 Thread Weisu

Hi, I am sure I read the Ajax and Zone doco in the tapestry site under
Tapestry 5 Modules -> tapestry-code yesterday, but I can't see them today.
Is there any chance to put them back, because it is very useful.
Thanks in advance!
Wei.
-- 
View this message in context: 
http://www.nabble.com/T5-Can%27t-find-Ajax-doco-under-tapestry-code-tp14408734p14408734.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T5] overriding persistence strategy of all fields to conversation strategy

2007-12-18 Thread Kristian Marinkovic
Hi all,i'm currently implementing a conversation module (similar to seam) by defining an own persistence strategy. i thought of an explicit and an implicit mode for conversations. The explicit mode requires that every persistent field within a conversation is annotated with @Persist("conversation"). the implicit mode would replace the given persistence strategy of any annotated field in a page with "conversation". Can someone help me how to solve this problem? The PersistentFieldManager sets default strategies (@Meta) but cannot be overriden on a per page base.any suggestions? thanksg,kris 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: JumpStart 3.0.0 Preview ready for comments

2007-12-18 Thread Michael Courcy

Thanks a lot, I 'll try it.

Francois Armand a écrit :

Michael Courcy wrote:

Hi

I was really interested on how we could handle the edition of an 
entire list in a single page with T5.


Let's say a  List in a situation where we want the user to be 
able to edit the name and surname of all in a single request.


What could be the more elegant solution ?

I have a listEditor that build a list of property editor with the 
possibility to add/remove/update properties.
I built it to handle simple properties (String, Enum, date...), but it 
seems to work as long as you have an editor associated with the 
property type : I use it to handle a list of criterion, which are a 
complex object (well, complex...). In your case, you would have to 
define a personEditor (surely just a beanEditor).


It should (at least :) need a lot more of polish, but it work rather 
nicely.


For example, if you want to edit a list of string, say "bleue", "red" 
and that the editor for String is "text", the rendered template is :


[blue] 
[red]  


The "[]" are text input fields, "<>" are buttons.

The component generate event on button selection so that the parent 
element can handle matching action (add or remove element, with 
perhaps other business logic).


The project is open source, but the browse SVN is still broken (OW2 
plateform... no comment).

Thought,  you can checkout the source at this address :
--
svn://svn.forge.objectweb.org/svnroot/interldap/interldap-wui-common/trunk 


--
The component is in 
src/main/java/org.interldap.wui.t5lib.components/ListEditor.java.
Example of use are available in 
src/main/java/org/interldap/wui/t5lib/components/eschema/EditClass and 
EditAttribute.


If the god of spare time is with me, I will try to contribute to some 
component repository or another the code in January, cleaner and 
documented.





--
Michael Courcy
http://courcy.blogspot.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 : Failure writing parameter value of component because read only ???

2007-12-18 Thread Francois Armand

Penyihir Kecil wrote:


Failure writing parameter value of component
admin/PlayerForm:positionselect: Expression position for class
edu.its.dreamteam.web.pages.admin.PlayerForm is read-only.

[...]
could anyone could help me what had happened to my code ???
whats wrong with my code ?

here's my code :
[...]
I just think that your PlayerForm.java misses a setter for the position 
property (and only saw a getter for it).
This kind of error is quite explicit : read only : no setter ; write 
only : no getter.



--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: JumpStart 3.0.0 Preview ready for comments

2007-12-18 Thread Francois Armand

Michael Courcy wrote:

Hi

I was really interested on how we could handle the edition of an 
entire list in a single page with T5.


Let's say a  List in a situation where we want the user to be 
able to edit the name and surname of all in a single request.


What could be the more elegant solution ?

I have a listEditor that build a list of property editor with the 
possibility to add/remove/update properties.
I built it to handle simple properties (String, Enum, date...), but it 
seems to work as long as you have an editor associated with the property 
type : I use it to handle a list of criterion, which are a complex 
object (well, complex...). In your case, you would have to define a 
personEditor (surely just a beanEditor).


It should (at least :) need a lot more of polish, but it work rather nicely.

For example, if you want to edit a list of string, say "bleue", "red" 
and that the editor for String is "text", the rendered template is :


[blue] 
[red]  


The "[]" are text input fields, "<>" are buttons.

The component generate event on button selection so that the parent 
element can handle matching action (add or remove element, with perhaps 
other business logic).


The project is open source, but the browse SVN is still broken (OW2 
plateform... no comment).

Thought,  you can checkout the source at this address :
--
svn://svn.forge.objectweb.org/svnroot/interldap/interldap-wui-common/trunk
--
The component is in 
src/main/java/org.interldap.wui.t5lib.components/ListEditor.java.
Example of use are available in 
src/main/java/org/interldap/wui/t5lib/components/eschema/EditClass and 
EditAttribute.


If the god of spare time is with me, I will try to contribute to some 
component repository or another the code in January, cleaner and documented.


--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5 : Failure writing parameter value of component because read only ???

2007-12-18 Thread Penyihir Kecil
Igot this err when i try to insert :

ERROR

Failure writing parameter value of component
admin/PlayerForm:positionselect: Expression position for class
edu.its.dreamteam.web.pages.admin.PlayerForm is read-only.


the error showed higlight in this part (in PlayerForm.tml):




could anyone could help me what had happened to my code ???
whats wrong with my code ?

here's my code :

*Club.java*

public class Club extends BaseBean implements Serializable{
/**
 *
 */
private static final long serialVersionUID = 1L;
private String idClub;
private String clubName;

public String getIdClub() {
return idClub;
}

public void setIdClub(String idClub) {
this.idClub = idClub;
}

public String getClubName() {
return clubName;
}

public void setClubName(String clubName) {
this.clubName = clubName;
}

@Override
protected String getPrimaryKey() {
return getIdClub();
}

}

*Position.java*
public class Position extends BaseBean implements Serializable{
/**
 *
 */
private static final long serialVersionUID = 1L;
private String idPosition;
private String position;
private Integer earnPoint;

public String getIdPosition() {
return idPosition;
}

public void setIdPosition(String idPosition) {
this.idPosition = idPosition;
}

public String getPosition() {
return position;
}

public void setPosition(String position) {
this.position = position;
}

public Integer getEarnPoint() {
return earnPoint;
}

public void setEarnPoint(Integer earnPoint) {
this.earnPoint = earnPoint;
}

@Override
protected String getPrimaryKey() {
return getIdPosition();
}

}

*Player.java

*public class Player extends BaseBean implements Serializable{*
/**
 *
 */
   * private static final long serialVersionUID = 1L;
private String idPlayer;
private String firstName;
private String midName;
private String lastName;
private String idPosition;
private String idClub;
private Integer defaultPrice;
private String number;

private Position position;
private Club club;

public String getIdPlayer() {
return idPlayer;
}
public void setIdPlayer(String idPlayer) {
this.idPlayer = idPlayer;
}

public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}

public String getMidName() {
return midName;
}
public void setMidName(String midName) {
this.midName = midName;
}


public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}

public String getIdPosition() {
idPosition = getPosition().getIdPosition();
return idPosition;
}
public void setIdPosition(String idPosition) {
this.idPosition = idPosition;
this.getPosition().setIdPosition(idPosition);
}

public String getIdClub() {
idClub = getClub().getIdClub();
return idClub;
}
public void setIdClub(String idClub) {
this.idClub = idClub;
getClub().setIdClub(idClub);
}

public Integer getDefaultPrice() {
return defaultPrice;
}

public void setDefaultPrice(Integer defaultPrice) {
this.defaultPrice = defaultPrice;
}

public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}

public Position getPosition() {
if(position==null){
position = new Position();
}
return position;
}

public void setPosition(Position position) {
this.position = position;
}
public Club getClub() {
if(club == null){
club = new Club();
}
return club;
}
public void setClub(Club club) {
this.club = club;
}
@Override
protected String getPrimaryKey() {
return getIdPlayer();
}

}




Re: T5: JumpStart 3.0.0 Preview ready for comments

2007-12-18 Thread Michael Courcy

Hi

I was really interested on how we could handle the edition of an entire 
list in a single page with T5.


Let's say a  List in a situation where we want the user to be 
able to edit the name and surname of all in a single request.


What could be the more elegant solution ?

Michael.


Geoff Callender a écrit :

Hi all,

I've reworked JumpStart to address Tapestry 5, and I need feedback on 
how to make it as good as it can be...


If you don't know JumpStart, its purpose is to get newcomers 
up-to-speed with Tapestry as fast as possible.  It's aim is to dispel 
the myth of Tapestry's steep learning curve by helping people get 
productive quickly.  The better that JumpStart is, the better I hope 
it will be for all the Tapestry community.


So, I'm looking for heaps of feedback on its strengths, weaknesses, 
choice of examples, quality of code, correctness, etc., anything that 
will make it more helpful to more people!


To get it, go to http://files.doublenegative.com.au/jumpstart/ , click 
on Downloads, and look for jumpstart-min-3.0.0.preview.1.zip.


Cheers,

Geoff Callender
http://files.doublenegative.com.au/jumpstart/

You can mail me directly or reply to this thread.  Either is fine.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Michael Courcy
http://courcy.blogspot.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: JumpStart 3.0.0 Preview ready for comments

2007-12-18 Thread Geoff Callender

LOL   I like it.   Marketing comes to the rescue once again!

On 19/12/2007, at 12:28 AM, Francois Armand wrote:


Geoff Callender wrote:
Yes, I've been thinking of doing that.  Not sure what I'd do about  
the elements that update the DB, though.  Concurrency isn't a  
problem for the system but it might be for the user experience -  
when user A goes from the edit screen to the display screen of an  
example they may see unexpected values thanks to user B, C and D  
editing the same objects in the same example. Hmmm...


Just call the demo a "collaborative edition platform",  and you are  
done. Web 2.0 save us from all this transactive mess :)



--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org FederID - http://www.federid.org/
Open Source identities management and federation


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: JumpStart 3.0.0 Preview ready for comments

2007-12-18 Thread Francois Armand

Geoff Callender wrote:
Yes, I've been thinking of doing that.  Not sure what I'd do about the 
elements that update the DB, though.  Concurrency isn't a problem for 
the system but it might be for the user experience - when user A goes 
from the edit screen to the display screen of an example they may see 
unexpected values thanks to user B, C and D editing the same objects 
in the same example. Hmmm...


Just call the demo a "collaborative edition platform",  and you are 
done. Web 2.0 save us from all this transactive mess :)



--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Antwort: Re: T5: Domain level localization

2007-12-18 Thread Angelo Chen

Hi Kristian,

Thanks for the reply,  my need is not to get the locale from the request
but, I have two domain names, all will point to the same IP, one domain will
have 'en' as locale while another one will have 'zh' as its locale, your
solution works except I have to find out first the domain name before
setting the locales.
Thanks,

A.C


kristian.marinkovic wrote:
> 
> ok... just tried it myself... i get the same exception
> if you move your method call to getLocale it works.
> 
> another option is to write a Dispatcher that reads the
> locale from the request and sets it in the ThreadLocale:
> 
> public class LocaleDispatcher implements Dispatcher {
> private final ThreadLocale locale;
> public LocaleDispatcher (ThreadLocale locale) {
> this.locale=locale;
> }
> 
> public boolean dispatch(Request request, Response response) throws 
> IOException {
> locale.setLocale(request.getLocale());
> return false;
> }
> 
> }
> 
> 
> 
> 
> g,
> 
> kris
> 
> 
> 
> 
> Kristian Marinkovic <[EMAIL PROTECTED]> 
> 18.12.2007 12:13
> Bitte antworten an
> "Tapestry users" 
> 
> 
> An
> "Tapestry users" 
> Kopie
> 
> Thema
> Antwort: Re: T5: Domain level localization
> 
> 
> 
> 
> 
> 
> can you show me how you define your DomainThreadLocale service in 
> your module class?
> 
> 
> 
> 
> Angelo Chen <[EMAIL PROTECTED]> 
> 18.12.2007 11:33
> Bitte antworten an
> "Tapestry users" 
> 
> 
> An
> users@tapestry.apache.org
> Kopie
> 
> Thema
> Re: T5: Domain level localization
> 
> 
> 
> 
> 
> 
> 
> 
> Hi Kristian,
> 
> This is a old post, i finally tried it out, it works, but how to check
> domain name? calling 'request' s method cause exceptions, example:
> 
>System.out.println(request.getContextPath());
> 
> ERROR] RequestExceptionHandler Processing of request failed with uncaught
> exception: Error invoking constructor
> org.bfe.myapp.t5.DomainThreadLocale(Request) (at 
> DomainThreadLocale.java:42)
> (for service 'domainThreadLocale'): java.lang.NullPointerException
> java.lang.RuntimeException: Error invoking constructor
> org.bfe.myapp.t5.DomainThreadLocale(Request) (at 
> DomainThreadLocale.java:42)
> (for service 'domainThreadLocale'): java.lang.NullPointerException
>  at
> org.apache.tapestry.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:65)
> 
> 
> kristian.marinkovic wrote:
>> 
>> you could create your own ThreadLocale object that has
>> 
>> 
>> DomainThreadLocale implements ThreadLocale {
>>  public DomainThreadLocale (Request request) {
>>  // check domain and set locale
>>  } 
>> }
>> 
>> 
>> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/T5%3A-Domain-level-localization-tp13032958p14391706.html
> 
> 
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Domain-level-localization-tp13032958p14396833.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: JumpStart 3.0.0 Preview ready for comments

2007-12-18 Thread Geoff Callender
Yes, I've been thinking of doing that.  Not sure what I'd do about the  
elements that update the DB, though.  Concurrency isn't a problem for  
the system but it might be for the user experience - when user A goes  
from the edit screen to the display screen of an example they may see  
unexpected values thanks to user B, C and D editing the same objects  
in the same example. Hmmm...


On 18/12/2007, at 10:16 AM, Angelo Chen wrote:



Hi Geoff,

I can't find a online demo there, might be nice to have one so we  
don't have

to install it. thanks.

A.C.


Geoff Callender-2 wrote:


Hi Penyihir, Michael, and Ted,

Thanks for your help.  I'm looking forward to the critiques (even if
they're bad).

Cheers,

Geoff

On 17/12/2007, at 3:12 PM, Penyihir Kecil wrote:


Hi Geoff

i've also succesfully installed it
i'm looking for user autentification and best practive for ur edit
form.

thnx a lot

On 12/17/07, Michael Courcy <[EMAIL PROTECTED]> wrote:

Hi Geoff

I've successfully installed the jumpstart-min on windows XP with
JBOSS
4.2.2GA

I start  digging now.

Thanks a lot.
Michael


Geoff Callender a écrit :

Hi all,

I've reworked JumpStart to address Tapestry 5, and I need feedback
on
how to make it as good as it can be...

If you don't know JumpStart, its purpose is to get newcomers
up-to-speed with Tapestry as fast as possible.  It's aim is to
dispel
the myth of Tapestry's steep learning curve by helping people get
productive quickly.  The better that JumpStart is, the better I  
hope

it will be for all the Tapestry community.

So, I'm looking for heaps of feedback on its strengths,  
weaknesses,

choice of examples, quality of code, correctness, etc., anything
that
will make it more helpful to more people!

To get it, go to http://files.doublenegative.com.au/jumpstart/ ,
click
on Downloads, and look for jumpstart-min-3.0.0.preview.1.zip.

Cheers,

Geoff Callender
http://files.doublenegative.com.au/jumpstart/

You can mail me directly or reply to this thread.  Either is fine.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Michael Courcy
http://courcy.blogspot.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
View this message in context: 
http://www.nabble.com/T5%3A-JumpStart-3.0.0-Preview-ready-for-comments-tp14346122p14375818.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Antwort: Re: T5: Domain level localization

2007-12-18 Thread Kristian Marinkovic
ok... just tried it myself... i get the same exception
if you move your method call to getLocale it works.

the DomainThreadLocale service is realized by the
IOC container long before tapestry core initializes its
Request service (that itself depends on RequestGlobals)
because it is needed in another service before.


another option is to write a Dispatcher that reads the
locale from the request and sets it in the ThreadLocale:

public class LocaleDispatcher implements Dispatcher {
private final ThreadLocale locale;
public LocaleDispatcher (ThreadLocale locale) {
this.locale=locale;
}

public boolean dispatch(Request request, Response response) throws 
IOException {
locale.setLocale(request.getLocale());
return false;
}

}




g,

kris




Kristian Marinkovic <[EMAIL PROTECTED]> 
18.12.2007 12:13
Bitte antworten an
"Tapestry users" 


An
"Tapestry users" 
Kopie

Thema
Antwort: Re: T5: Domain level localization






can you show me how you define your DomainThreadLocale service in 
your module class?




Angelo Chen <[EMAIL PROTECTED]> 
18.12.2007 11:33
Bitte antworten an
"Tapestry users" 


An
users@tapestry.apache.org
Kopie

Thema
Re: T5: Domain level localization








Hi Kristian,

This is a old post, i finally tried it out, it works, but how to check
domain name? calling 'request' s method cause exceptions, example:

   System.out.println(request.getContextPath());

ERROR] RequestExceptionHandler Processing of request failed with uncaught
exception: Error invoking constructor
org.bfe.myapp.t5.DomainThreadLocale(Request) (at 
DomainThreadLocale.java:42)
(for service 'domainThreadLocale'): java.lang.NullPointerException
java.lang.RuntimeException: Error invoking constructor
org.bfe.myapp.t5.DomainThreadLocale(Request) (at 
DomainThreadLocale.java:42)
(for service 'domainThreadLocale'): java.lang.NullPointerException
 at
org.apache.tapestry.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:65)


kristian.marinkovic wrote:
> 
> you could create your own ThreadLocale object that has
> 
> 
> DomainThreadLocale implements ThreadLocale {
>  public DomainThreadLocale (Request request) {
>  // check domain and set locale
>  } 
> }
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Domain-level-localization-tp13032958p14391706.html


Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Antwort: Re: T5: Domain level localization

2007-12-18 Thread Kristian Marinkovic
can you show me how you define your DomainThreadLocale service in 
your module class?




Angelo Chen <[EMAIL PROTECTED]> 
18.12.2007 11:33
Bitte antworten an
"Tapestry users" 


An
users@tapestry.apache.org
Kopie

Thema
Re: T5: Domain level localization








Hi Kristian,

This is a old post, i finally tried it out, it works, but how to check
domain name? calling 'request' s method cause exceptions, example:

   System.out.println(request.getContextPath());

ERROR] RequestExceptionHandler Processing of request failed with uncaught
exception: Error invoking constructor
org.bfe.myapp.t5.DomainThreadLocale(Request) (at 
DomainThreadLocale.java:42)
(for service 'domainThreadLocale'): java.lang.NullPointerException
java.lang.RuntimeException: Error invoking constructor
org.bfe.myapp.t5.DomainThreadLocale(Request) (at 
DomainThreadLocale.java:42)
(for service 'domainThreadLocale'): java.lang.NullPointerException
 at
org.apache.tapestry.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:65)


kristian.marinkovic wrote:
> 
> you could create your own ThreadLocale object that has
> 
> 
> DomainThreadLocale implements ThreadLocale {
>  public DomainThreadLocale (Request request) {
>  // check domain and set locale
>  } 
> }
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Domain-level-localization-tp13032958p14391706.html

Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: T5: @OnEvent and onActivate

2007-12-18 Thread Angelo Chen

Hi,

I think I found the answer, it is:
@OnEvent("activate")
thanks,
A.C.


Francois Armand wrote:
> 
> Angelo Chen wrote:
>> Hi,
>>
>> Can we use @OnEvent to annotate a onActivate method, say:
>>
>> @OnEvent(???)
>> void myActivate() {
>> }
>>
>>   
> I'm not sure I understand what you want to do.
> 
> What do you want to do ?
> 
> -- 
> Francois Armand
> Etudes & Développements J2EE
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A--%40OnEvent-and-onActivate-tp14377507p14393068.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Domain level localization

2007-12-18 Thread Angelo Chen

Hi Kristian,

This is a old post, i finally tried it out, it works, but how to check
domain name? calling 'request' s method cause exceptions, example:

   System.out.println(request.getContextPath());

ERROR] RequestExceptionHandler Processing of request failed with uncaught
exception: Error invoking constructor
org.bfe.myapp.t5.DomainThreadLocale(Request) (at DomainThreadLocale.java:42)
(for service 'domainThreadLocale'): java.lang.NullPointerException
java.lang.RuntimeException: Error invoking constructor
org.bfe.myapp.t5.DomainThreadLocale(Request) (at DomainThreadLocale.java:42)
(for service 'domainThreadLocale'): java.lang.NullPointerException
at
org.apache.tapestry.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:65)


kristian.marinkovic wrote:
> 
> you could create your own ThreadLocale object that has
> 
> 
> DomainThreadLocale implements ThreadLocale {
>  public DomainThreadLocale (Request request) {
>  // check domain and set locale
>  } 
> }
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Domain-level-localization-tp13032958p14391706.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tree, TreeTable or ...?

2007-12-18 Thread KLessou
Hi !

I search a simple very simple example to insert a Tree into a Html Table.

Thx in advance !

-- 
~
| klessou |
~


Re: T5 tapestry-hibernate error?

2007-12-18 Thread Michael Bernagou
Ok, the problem is the lib version.

So, synchronized all the libraries versions :D

2007/12/18, Michael Bernagou <[EMAIL PROTECTED]>:
>
> Something wired when tapestry try to get the HibernateSession :
>
> Error invoking service builder method
> org.apache.tapestry.hibernate.HibernateModule.build(HibernateSessionSource,
> ThreadCleanupHub) (at HibernateModule.java:62) (for service
> 'HibernateSessionManager'): Exception constructing service
> 'HibernateSessionSource': Error invoking constructor
> org.apache.tapestry.internal.hibernate.HibernateSessionSourceImpl(Log,
> Collection, ClassNameLocator) (at HibernateSessionSourceImpl.java:35) (for
> service 'HibernateSessionSource'): No service implements the interface
> org.apache.commons.logging.Log.
>
> java.lang.RuntimeException No service implements the interface
> org.apache.commons.logging.Log.
> Stack trace
>
>- org.apache.tapestry.ioc.internal.RegistryImpl.getService(
>RegistryImpl.java:553)
>-
>org.apache.tapestry.ioc.internal.services.MasterObjectProviderImpl.provide
>(MasterObjectProviderImpl.java :46)
>- org.apache.tapestry.ioc.internal.RegistryImpl.getObject(
>RegistryImpl.java:665)
>- org.apache.tapestry.ioc.internal.RegistryImpl.getObject(
>RegistryImpl.java:722)
>- org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getObject (
>ObjectLocatorImpl.java:50)
>-
>org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameterValue
>(InternalUtils.java:217)
>-
>org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameters
>(InternalUtils.java :248)
>-
>
> org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParametersForConstructor
>(InternalUtils.java:235)
>-
>org.apache.tapestry.ioc.internal.ConstructorServiceCreator.createObject
>(ConstructorServiceCreator.java :46)
>-
>org.apache.tapestry.ioc.internal.SingletonServiceLifecycle.createService
>(SingletonServiceLifecycle.java:31)
>-
>
> org.apache.tapestry.ioc.internal.LifecycleWrappedServiceCreator.createObject
>(LifecycleWrappedServiceCreator.java :54)
>-
>org.apache.tapestry.ioc.internal.InterceptorStackBuilder.createObject
>(InterceptorStackBuilder.java:54)
>-
>
> org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject
>(RecursiveServiceCreationCheckWrapper.java :61)
>-
>
> org.apache.tapestry.ioc.internal.services.JustInTimeObjectCreator.createObject
>(JustInTimeObjectCreator.java:67)
>- org.apache.tapestry.internal.hibernate.HibernateSessionManagerImpl
>.(HibernateSessionManagerImpl.java :31)
>- org.apache.tapestry.hibernate.HibernateModule.build(
>HibernateModule.java:62)
>- sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>- sun.reflect.NativeMethodAccessorImpl.invoke(
>NativeMethodAccessorImpl.java :39)
>- sun.reflect.DelegatingMethodAccessorImpl.invoke(
>DelegatingMethodAccessorImpl.java:25)
>- java.lang.reflect.Method.invoke(Method.java:585)
>-
>org.apache.tapestry.ioc.internal.ServiceBuilderMethodInvoker.createObject(
>ServiceBuilderMethodInvoker.java:76)
>-
>
> org.apache.tapestry.ioc.internal.services.PerThreadServiceCreator.initialValue
>(PerThreadServiceCreator.java:50)
>- java.lang.ThreadLocal$ThreadLocalMap.getAfterMiss(ThreadLocal.java:374)
>- java.lang.ThreadLocal$ThreadLocalMap.get(ThreadLocal.java:347)
>- java.lang.ThreadLocal$ThreadLocalMap.access$000(ThreadLocal.java
>:225)
>- java.lang.ThreadLocal.get(ThreadLocal.java:127)
>-
>
> org.apache.tapestry.ioc.internal.services.PerThreadServiceCreator.createObject(
>PerThreadServiceCreator.java:56)
>- papo.dao.impl.UserDaoImpl.getUser(UserDaoImpl.java:35)
>
> The origin of the problem is when trying to getSession() :
>
> public class UserDaoImpl implements UserDao {
> private static Log log = LogFactory.getLog(UserDaoImpl.class);
>
> private Session session;
> public Session getSession() { return session; }
> public void setSession(Session session) { this.session = session; }
>
> public UserDaoImpl(Session session) {
> setSession(session);
> }
>
> /**
>  * Récupére un User pour un login et password donné
>  *
>  * @param login
>  * @param password
>  * @return Operateur
>  */
> public User getUser(String login, String password) {
> log.debug("Recherche du User login : " + login);
> try {
> Query q = getSession().createQuery("from User u where u.login= 
> :login and
> u.password = :pwd");
> ...
> }
>
> Tapestry-ioc is responsible to get the constructor call :
>
>public static void bind(ServiceBinder binder) {
>  ...
>  binder.bind(UserDao.class, UserDaoImpl.class);
>  ...
>}
>
>
> No idea, still investigating. I tried to clear tomcat cache, check the
> libraries... maybe something missing somewhere.
>
> T5.0.6 for

T5 tapestry-hibernate error?

2007-12-18 Thread Michael Bernagou
Something wired when tapestry try to get the HibernateSession :

Error invoking service builder method
org.apache.tapestry.hibernate.HibernateModule.build(HibernateSessionSource,
ThreadCleanupHub) (at HibernateModule.java:62) (for service
'HibernateSessionManager'): Exception constructing service
'HibernateSessionSource': Error invoking constructor
org.apache.tapestry.internal.hibernate.HibernateSessionSourceImpl(Log,
Collection, ClassNameLocator) (at HibernateSessionSourceImpl.java:35) (for
service 'HibernateSessionSource'): No service implements the interface
org.apache.commons.logging.Log.

java.lang.RuntimeException No service implements the interface
org.apache.commons.logging.Log.
Stack trace

   - org.apache.tapestry.ioc.internal.RegistryImpl.getService(
   RegistryImpl.java:553)
   -
   org.apache.tapestry.ioc.internal.services.MasterObjectProviderImpl.provide
   (MasterObjectProviderImpl.java:46)
   - org.apache.tapestry.ioc.internal.RegistryImpl.getObject(
   RegistryImpl.java:665)
   - org.apache.tapestry.ioc.internal.RegistryImpl.getObject(
   RegistryImpl.java:722)
   - org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getObject(
   ObjectLocatorImpl.java:50)
   -
   org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameterValue
   (InternalUtils.java:217)
   -
   org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameters
   (InternalUtils.java:248)
   -
   
org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParametersForConstructor
   (InternalUtils.java:235)
   -
   org.apache.tapestry.ioc.internal.ConstructorServiceCreator.createObject
   (ConstructorServiceCreator.java:46)
   -
   org.apache.tapestry.ioc.internal.SingletonServiceLifecycle.createService
   (SingletonServiceLifecycle.java:31)
   -
   org.apache.tapestry.ioc.internal.LifecycleWrappedServiceCreator.createObject
   (LifecycleWrappedServiceCreator.java:54)
   -
   org.apache.tapestry.ioc.internal.InterceptorStackBuilder.createObject(
   InterceptorStackBuilder.java:54)
   -
   
org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject
   (RecursiveServiceCreationCheckWrapper.java:61)
   -
   
org.apache.tapestry.ioc.internal.services.JustInTimeObjectCreator.createObject
   (JustInTimeObjectCreator.java:67)
   - org.apache.tapestry.internal.hibernate.HibernateSessionManagerImpl
   .(HibernateSessionManagerImpl.java:31)
   - org.apache.tapestry.hibernate.HibernateModule.build(
   HibernateModule.java:62)
   - sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   - sun.reflect.NativeMethodAccessorImpl.invoke(
   NativeMethodAccessorImpl.java:39)
   - sun.reflect.DelegatingMethodAccessorImpl.invoke(
   DelegatingMethodAccessorImpl.java:25)
   - java.lang.reflect.Method.invoke(Method.java:585)
   -
   org.apache.tapestry.ioc.internal.ServiceBuilderMethodInvoker.createObject
   (ServiceBuilderMethodInvoker.java:76)
   -
   
org.apache.tapestry.ioc.internal.services.PerThreadServiceCreator.initialValue
   (PerThreadServiceCreator.java:50)
   - java.lang.ThreadLocal$ThreadLocalMap.getAfterMiss(ThreadLocal.java
   :374)
   - java.lang.ThreadLocal$ThreadLocalMap.get(ThreadLocal.java:347)
   - java.lang.ThreadLocal$ThreadLocalMap.access$000(ThreadLocal.java
   :225)
   - java.lang.ThreadLocal.get(ThreadLocal.java:127)
   -
   
org.apache.tapestry.ioc.internal.services.PerThreadServiceCreator.createObject
   (PerThreadServiceCreator.java:56)
   - papo.dao.impl.UserDaoImpl.getUser(UserDaoImpl.java:35)

The origin of the problem is when trying to getSession() :

public class UserDaoImpl implements UserDao {
private static Log log = LogFactory.getLog(UserDaoImpl.class);

private Session session;
public Session getSession() { return session; }
public void setSession(Session session) { this.session = session; }

public UserDaoImpl(Session session) {
setSession(session);
}

/**
 * Récupére un User pour un login et password donné
 *
 * @param login
 * @param password
 * @return Operateur
 */
public User getUser(String login, String password) {
log.debug("Recherche du User login : " + login);
try {
Query q = getSession().createQuery("from User u where u.login =
:login and u.password = :pwd");
...
}

Tapestry-ioc is responsible to get the constructor call :

   public static void bind(ServiceBinder binder) {
 ...
 binder.bind(UserDao.class, UserDaoImpl.class);
 ...
   }


No idea, still investigating. I tried to clear tomcat cache, check the
libraries... maybe something missing somewhere.

T5.0.6 for core/annotation and ioc and T5.0.5 for tapestry-hibernate, maybe
it is that the problem.
-- 
Michael Bernagou
Java Developper


Re: T5: @OnEvent and onActivate

2007-12-18 Thread Francois Armand

Angelo Chen wrote:

Hi,

Can we use @OnEvent to annotate a onActivate method, say:

@OnEvent(???)
void myActivate() {
}

  

I'm not sure I understand what you want to do.

The @OnEvent tag signal a handler for an Event. The method annotated may 
have any name you want, but you SHOULD avoid Tapestry reserved name (I 
think it was said that an exception should be raised if a conventional 
method name is annotated).

. Event handlers can be used in page or components,

The "onActivate" method represent the method(s) called at the page 
activation. Page activation is a special phase before page rendering 
which deals with the context of the page (for example get parameters). 
It's an important phase because it is the last in the response process 
where you can send a redirect or a non HTML response (see the PDF 
tutorial for example).
The activation phase is *always* done in a page, even if no onActivate 
method deals with it.


So,
- you can use @onEvent on any method you want but you SHOULD avoid 
reserved name ;

- onActivate is not an event handler.

What do you want to do ?

--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]