Re: get component according to ID

2010-01-13 Thread LiborGMC

Thanks for the reply. 
 Sorry but I still don't understand. I think my problem is not to obtain id
of Zone but get Zone as an object according to this ID. A can obtain from
actionLink only zoneID not the Zone as instance, right?
I have handler for handle action when user click "Refresh table" link. This
method must return zone.getBody() to refresh table. I have zoneID but I
don't know how to obtain the instance of Zone. I'm using construct "zone =
(Zone) componentSource.getComponent(resources.getPageName()+":table.zone");"
so far. But this construct is using name of elemnts not IDs of elements.
This prevent me to put more my Grid components on same page.

I'm really greening in Tapestry. Maybe I'm still missing something. 

Libor
-- 
View this message in context: 
http://old.nabble.com/get-component-according-to-ID-tp27144243p27157158.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: Changing the DropDownDatePicker style

2010-01-13 Thread Andreas Andreou
Inspect with firebug the dom that the widget generates and the classnames
it assigns to nodes and provide a more specific css rule that will
override the default ones provided by dojo

On Thu, Jan 14, 2010 at 06:43, Chitraleka Appalanaidu
 wrote:
> Hi all,
>
> I use Tapestry 4.1. I currently have a Dojo DropdownDatePicker widget on my
> page. I am getting the following bug:
> 1. User clicks on a 'Submit' button
> 2. Graphs get generated (scroll bar appears to allow users to scroll down to
> see all graphs)
> 3. User then click on the DropdownDatePicker widget at the top of the page
> 4. The whole page shifts down (except for the widget that remains static)
>
> Im presuming the reason why the page shifts down has got something to do
> with the style of the widget (which has position:static). How do I change
> the style of the widget to allow me to debug why the whole page shifts down?
>
>
> Thank you very much.
>
> Kind regards,
> Chitra
>



-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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



Changing the DropDownDatePicker style

2010-01-13 Thread Chitraleka Appalanaidu
Hi all,

I use Tapestry 4.1. I currently have a Dojo DropdownDatePicker widget on my
page. I am getting the following bug:
1. User clicks on a 'Submit' button
2. Graphs get generated (scroll bar appears to allow users to scroll down to
see all graphs)
3. User then click on the DropdownDatePicker widget at the top of the page
4. The whole page shifts down (except for the widget that remains static)

Im presuming the reason why the page shifts down has got something to do
with the style of the widget (which has position:static). How do I change
the style of the widget to allow me to debug why the whole page shifts down?


Thank you very much.

Kind regards,
Chitra


Re: SEO and duplicate content due to language prefix

2010-01-13 Thread Stephan Schwab


Howard Lewis Ship wrote:
> 
> Seems like a bug to me that if you turn ENCODE_LOCALE_INTO_PATH off,
> it doesn't then substitute some other approach (like a cookie from
> 5.0, or a query parameter).
> 

I'm trying to add that other approach. So far I've added a link creation
listener via the LinkCreationHub as stated by the JavaDoc for
ENCODE_LOCALE_INTO_PATH. That gets called, if ENCODE_LOCALE_INTO_PATH is set
to false and the locale encoding now appears as a query parameter
(eventually I want to use cookies but query parameter is more visible for
the moment).

I see a number of @Inject Locale in different places. However I could not
yet figure out how to let Tapestry know what the new locale is.

In ComponentEventLinkEncoderImpl.decodePageRenderRequest() I see that the
locale is taken from the URL and then it gets set via the
LocalizationSetter. I don't see how I can intercept that and take the Local
from my way of preserving it.


-
--
http://www.caimito.net - Caimito One Team - Agile Collaboration and Planning
tool
http://www.stephan-schwab.com - Personal blog
http://code.google.com/p/tapestry-sesame - Authentication extension for
Tapestry 5

-- 
View this message in context: 
http://old.nabble.com/SEO-and-duplicate-content-due-to-language-prefix-tp27019442p27154947.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: I'd like to have a page with no session for unauthenticated users, and with a session when the user is authenticated

2010-01-13 Thread Kalle Korhonen
Yes, that was my understanding. But nevertheless, if you run into this
issue, it's not that huge of an expense to make a minor modification
compared to researching possible solutions on your own or having to
wait for a new version of Tapestry. Fortunately, I'm still ok, memory
is cheap :)

Kalle


On Wed, Jan 13, 2010 at 2:19 PM, Robin D. Wilson  wrote:
> FYI, that 'configuration switch' isn't available on the DeltaManager that 
> comes with Tomcat... We had to modify the DeltaManager and
> created this setting for our own use. If there is a significant enough 
> demand, I would be willing to post our changes - so that
> others can benefit from them, but you'll need to wait until we finish testing 
> and iron out any bugs we find.
>
> --
> Robin D. Wilson
> Director of Web Development
> KingsIsle Entertainment, Inc.
> CELL: 512-426-3929
> DESK: 512-623-5913
> www.KingsIsle.com
>
>
> -Original Message-
> From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com]
> Sent: Wednesday, January 13, 2010 2:48 PM
> To: Tapestry users
> Subject: Re: I'd like to have a page with no session for unauthenticated 
> users, and with a session when the user is authenticated
>
> On Wed, Jan 13, 2010 at 12:38 PM, Robin D. Wilson  wrote:
>> In the interim, we've opted for a different solution. We've modified the 
>> DeltaManager for Tomcat (clustering manager) to not
> create
>> sessions that are of short durations (we created a configuration switch for 
>> "sessionReplicationDurationThreshold"). If the session
>> TTL is shorter than the threshold, it won't be replicated to the other 
>> members of the cluster. Moreover, DeltaManager kills it off
>> for us if it's already expired. So that essentially solved the problem for 
>> us.
>
> This is very handy tip, thanks Robin.
>
> Kalle
>
> -
> 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: I'd like to have a page with no session for unauthenticated users, and with a session when the user is authenticated

2010-01-13 Thread Robin D. Wilson
FYI, that 'configuration switch' isn't available on the DeltaManager that comes 
with Tomcat... We had to modify the DeltaManager and
created this setting for our own use. If there is a significant enough demand, 
I would be willing to post our changes - so that
others can benefit from them, but you'll need to wait until we finish testing 
and iron out any bugs we find.

--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
CELL: 512-426-3929
DESK: 512-623-5913
www.KingsIsle.com


-Original Message-
From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com] 
Sent: Wednesday, January 13, 2010 2:48 PM
To: Tapestry users
Subject: Re: I'd like to have a page with no session for unauthenticated users, 
and with a session when the user is authenticated

On Wed, Jan 13, 2010 at 12:38 PM, Robin D. Wilson  wrote:
> In the interim, we've opted for a different solution. We've modified the 
> DeltaManager for Tomcat (clustering manager) to not
create
> sessions that are of short durations (we created a configuration switch for 
> "sessionReplicationDurationThreshold"). If the session
> TTL is shorter than the threshold, it won't be replicated to the other 
> members of the cluster. Moreover, DeltaManager kills it off
> for us if it's already expired. So that essentially solved the problem for us.

This is very handy tip, thanks Robin.

Kalle

-
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: How to obtain current page in component's code

2010-01-13 Thread Michael Gentry
How timely.  I just needed to figure out how to do this and the answer
was in my inbox.  You get a double thank you today!

Thanks!

mrg


On Wed, Jan 13, 2010 at 7:45 AM, Jun Tsai  wrote:
> @Inject
> private ComponentResources resources;
>
> resources.getPageName();
>
> 2010/1/13 LiborGMC 
>
>>
>> Hi,
>> can I obtain page in the code of component? I would like to get Zone
>> component by calling
>> "componentSource.getComponent("pageName:componentName.zone");" but I'm not
>> sure how can I find out pageName.
>> Thanks in advance
>> --
>> View this message in context:
>> http://old.nabble.com/How-to-obtain-current-page-in-component%27s-code-tp27144292p27144292.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
>>
>>
>
>
> --
> regards,
> Jun Tsai
>

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



Re: I'd like to have a page with no session for unauthenticated users, and with a session when the user is authenticated

2010-01-13 Thread Kalle Korhonen
On Wed, Jan 13, 2010 at 12:38 PM, Robin D. Wilson  wrote:
> In the interim, we've opted for a different solution. We've modified the 
> DeltaManager for Tomcat (clustering manager) to not create
> sessions that are of short durations (we created a configuration switch for 
> "sessionReplicationDurationThreshold"). If the session
> TTL is shorter than the threshold, it won't be replicated to the other 
> members of the cluster. Moreover, DeltaManager kills it off
> for us if it's already expired. So that essentially solved the problem for us.

This is very handy tip, thanks Robin.

Kalle

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



RE: I'd like to have a page with no session for unauthenticated users, and with a session when the user is authenticated

2010-01-13 Thread Robin D. Wilson
Thanks. I've been swamped trying to work on our next release.

In the interim, we've opted for a different solution. We've modified the 
DeltaManager for Tomcat (clustering manager) to not create
sessions that are of short durations (we created a configuration switch for 
"sessionReplicationDurationThreshold"). If the session
TTL is shorter than the threshold, it won't be replicated to the other members 
of the cluster. Moreover, DeltaManager kills it off
for us if it's already expired. So that essentially solved the problem for us.

I agree however, that the ideal solution would be to have Tapestry be a little 
more aware of the cost of creating sessions for every
page request, even when we don't really need them for the end-user's session.

On our side, we've implemented some of our code to use 'thread local' caches 
that are available as a sort of global space while a
request is being processed, but go away after the page is delivered.

--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
CELL: 512-426-3929
DESK: 512-623-5913
www.KingsIsle.com


-Original Message-
From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com] 
Sent: Wednesday, January 13, 2010 2:20 PM
To: Tapestry users
Subject: Re: I'd like to have a page with no session for unauthenticated users, 
and with a session when the user is authenticated

I'm also quite keen on having a better solution for this - it didn't
seem Robin had created an issue for this, so I did:
https://issues.apache.org/jira/browse/TAP5-985. Please vote if the
issue is important to you.

Kalle


On Mon, Jan 11, 2010 at 2:28 PM, Howard Lewis Ship  wrote:
> True; perhaps the logic could be changed such that the VT is not
> stored in the session ... oh, I know a good way to do that, actually
> (a proxy to the real validation delegate).  Add an issue and we'll see
> if we can get that to work ... it would be a big performance boost for
> a typical form (that submits succesfully).
>
> On Mon, Jan 11, 2010 at 2:20 PM, Josh Canfield  wrote:
>> Is there a reason the form needs to persist data when it hasn't been
>> submitted? perhaps ValidationTracker should be null until it's needed.
>>
>> On Mon, Jan 11, 2010 at 1:56 PM, Howard Lewis Ship  wrote:
>>> The mostly likely culprit is the use of a Form component, which stores
>>> its ValidationTracker object (by default) in  session, creating a
>>> session as needed.
>>>
>>> You can bind the tracker parameter of the Form component to a simple,
>>> non-persistent, property of type ValidationTracker.  Your only
>>> problem, then, is dealing with server-side input validation errors ...
>>> the tracker exists to capture user input and validation errors from
>>> the from submit request so that that information can be presented on
>>> the subsequent page render request.
>>>
>>> On Mon, Jan 11, 2010 at 12:16 PM, robinwilson2  wrote:

 We are running a high-volume environment on a 4 server tomcat cluster. 
 Every
 so often (about 1 time per month) during peak load times, our Tomcats will
 start to thrash on garbage collection. We've traced the problem down to the
 sessions being created are taking up all the heap space - even though the
 vast majority of sessions are unnecessary because the user is completely
 unauthenticated at the time the session is created.

 We have a 6GB heap space on each server - but the authenticated users take
 up less then 1/10th of this space, the rest is going to unauthenticated
 users.

 We have tuned our session durations down for unauthenticated users to 1
 seconds, but we can still encounter loads that generate sessions for
 unauthenticated users so fast that we run out of heap. (Not because we
 generate sessions faster than they are being expired - but because Tomcat's
 expiration code is very slow, so "old" (past expiration time) sessions
 linger for more than an hour during peak load.

 To us, the ideal solution would be to not create sessions if the user is
 unauthenticated. We're using Tapestry 5.1.05, and we can't figure out how 
 to
 make a page that does not create a session in Tapestry. Can someone point 
 us
 in the direction of the documentation on this (if there is any)?
 --
 View this message in context:
http://old.nabble.com/I%27d-like-to-have-a-page-with-no-session-for-unauthenticated-users%2C-and-with-a-session-when-the-user-is-aut
henticated-tp27116942p27116942.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


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

Re: I'd like to have a page with no session for unauthenticated users, and with a session when the user is authenticated

2010-01-13 Thread Kalle Korhonen
I'm also quite keen on having a better solution for this - it didn't
seem Robin had created an issue for this, so I did:
https://issues.apache.org/jira/browse/TAP5-985. Please vote if the
issue is important to you.

Kalle


On Mon, Jan 11, 2010 at 2:28 PM, Howard Lewis Ship  wrote:
> True; perhaps the logic could be changed such that the VT is not
> stored in the session ... oh, I know a good way to do that, actually
> (a proxy to the real validation delegate).  Add an issue and we'll see
> if we can get that to work ... it would be a big performance boost for
> a typical form (that submits succesfully).
>
> On Mon, Jan 11, 2010 at 2:20 PM, Josh Canfield  wrote:
>> Is there a reason the form needs to persist data when it hasn't been
>> submitted? perhaps ValidationTracker should be null until it's needed.
>>
>> On Mon, Jan 11, 2010 at 1:56 PM, Howard Lewis Ship  wrote:
>>> The mostly likely culprit is the use of a Form component, which stores
>>> its ValidationTracker object (by default) in  session, creating a
>>> session as needed.
>>>
>>> You can bind the tracker parameter of the Form component to a simple,
>>> non-persistent, property of type ValidationTracker.  Your only
>>> problem, then, is dealing with server-side input validation errors ...
>>> the tracker exists to capture user input and validation errors from
>>> the from submit request so that that information can be presented on
>>> the subsequent page render request.
>>>
>>> On Mon, Jan 11, 2010 at 12:16 PM, robinwilson2  wrote:

 We are running a high-volume environment on a 4 server tomcat cluster. 
 Every
 so often (about 1 time per month) during peak load times, our Tomcats will
 start to thrash on garbage collection. We've traced the problem down to the
 sessions being created are taking up all the heap space - even though the
 vast majority of sessions are unnecessary because the user is completely
 unauthenticated at the time the session is created.

 We have a 6GB heap space on each server - but the authenticated users take
 up less then 1/10th of this space, the rest is going to unauthenticated
 users.

 We have tuned our session durations down for unauthenticated users to 1
 seconds, but we can still encounter loads that generate sessions for
 unauthenticated users so fast that we run out of heap. (Not because we
 generate sessions faster than they are being expired - but because Tomcat's
 expiration code is very slow, so "old" (past expiration time) sessions
 linger for more than an hour during peak load.

 To us, the ideal solution would be to not create sessions if the user is
 unauthenticated. We're using Tapestry 5.1.05, and we can't figure out how 
 to
 make a page that does not create a session in Tapestry. Can someone point 
 us
 in the direction of the documentation on this (if there is any)?
 --
 View this message in context: 
 http://old.nabble.com/I%27d-like-to-have-a-page-with-no-session-for-unauthenticated-users%2C-and-with-a-session-when-the-user-is-authenticated-tp27116942p27116942.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


>>>
>>>
>>>
>>> --
>>> 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
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> --
>> TheDailyTube.com. Sign up and get the best new videos on the internet
>> delivered fresh to your inbox.
>>
>> -
>> 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
>
> -
> 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: Does anyone deploy on Tomca6 (ubuntu)

2010-01-13 Thread Jonathan Barker
I hit the same problem on Debian with Tomcat 5.5.  I eventually gave up
trying to grant permissions, and turned off the security manager.

If that's OK with you, edit your startup file in /etc/init.d (presumably
tomcat6).  You should find a line saying whether or not to use the Java
security manager.  Say "no".

OTOH, if you ever figure out the magic combination of permissions required
to get T5 to work in that environment, let the list know.

Regards,

Jonathan

On Mon, Jan 11, 2010 at 11:58 AM, Massimo Lusetti wrote:

> I'm sorry to ask this one here but this one is somehow related to T5.
>
> TapestryFilter at line 88 try to get the system property
> tapestry.execution-mode and tomcat6 on ubuntu 9.10 as a policy
> (security) restriction on system properties letting only
> java.io.tmpdir (or maybe a little more) to be read.
>
> So, there's anyone here using tomcat6, on ubuntu or any other
> platform, that may tell me if that setting is due to ubuntu o tomcat
> defaults?
> If that is tomcat6 it seems something to be told on deployment notes,
> don't you think so?
>
> BTW Jetty works very very well and didn't have given to me any gotchas so
> far...
>
> Cheers
> --
> Massimo
> http://meridio.blogspot.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Jonathan Barker
ITStrategic


Re: currentLocale vs persistentLocale

2010-01-13 Thread Daniel Kleine-Albers
Dear Gunnar,

did you by chance find a solution to this problem? I seem to have the same 
problem with a very similar implementation of the PPGK. As soon as I remove the 
PPGK the locale is switched correctly. If I leave it in, the locale is always 
en_US even if this is not in the SUPPORTED_LOCALES.

Cheers and thanks
Daniel




On 31.10.2009, at 09:30, Gunnar Eketrapp wrote:

> And here is the relevant part from PPGK
> 
>/**
> * Check the rights of the user for the page requested
> *
> * @throws IOException
> */
>public boolean checkAccess(String pageName, Request request, Response
> response) throws IOException {
>boolean canAccess = true;
> 
> 
>/* Is the requested page private ? */
>Component page = componentSource.getPage(pageName);
>ProtectedPage pp =
> page.getClass().getAnnotation(ProtectedPage.class);
>boolean protectedPage = pp != null;
> 
>if (protectedPage) {
>// logger.debug("checkAccess: " + pageName);
>canAccess = false;
> 
>// If User exists and he has the required role give him access
>if (sessionStateManager.exists(User.class)) {
>User user = sessionStateManager.get(User.class);
>canAccess = user.isSuperAdmin() || user.hasRole(pp.role());
>if (!canAccess)
>logger.debug("User " + user + " Role " + pp.role() + "
> needed by page " + pageName);
>}
>}
> 
>/*
> * This page can't be requested by a non-authenticated user => we
> redirect him to the LogIn page
> */
>if (!canAccess) {
>if (page != null) {
>// Setup Login page to redirect to the secured page after
> the login
>Object obj = componentSource.getPage(Login.class);
>ILogin login = (ILogin) obj;
>login.setRedirectTo(page);
>}
>response.sendRedirect(request.getContextPath() + LOGIN_PAGE);
>return true; // Make sure to leave the chain
>}
> 
>return false;
>}
> 
> 
> 2009/10/31 Gunnar Eketrapp 
> 
>> Hi!
>> 
>> This morning I made a test since I suspected that it was the introduction
>> of the ProtectedPageGateKeeper that hade sideeffects on the locale handling.
>> 
>> When I removed the PPGK everyhting worked as normal!
>> 
>> So now I am investigating why the PPGK dispacther interferes with T5's
>> locale handling.
>> 
>> A clue anyone?
>> 
>> 
>> /Gunnar
>> 
>> 2009/10/30 Gunnar Eketrapp 
>> 
>>> Hi !
>>> 
>>> Given these injections ...
>>> 
>>>@Inject
>>>private PersistentLocale persistentLocale;
>>> 
>>>@Inject
>>>private Locale currentLocale;
>>> 
>>> ... what should be the value of currentLocale. I.e. after that the
>>> persistent locale has been set, should curentLocale follow?
>>> 
>>> I will conduct tests tomorrow with a minimal project but the locale
>>> handling in my project is quite fucked up right now and it is driving me
>>> crazy.
>>> 
>>> I assume that it should just be to call persistentLocale.set() in an
>>> action link method and after that things should work. But for me they are
>>> not ...
>>> 
>>> /Gunnar
>>> 
>>> 
>>> 
>>> 2009/10/30 Gunnar Eketrapp 
>>> 
 Hi!
 
 The code below is not PROD ready yet. The first section is to setup input
 fields with label inside them.
 Something that our "designers" seems slick!
 
 The state locale is used it to remember the locale when called from a
 flash menu
 that "discarded" the persistent locale. The flash menu is feeded with
 special pages
 that resets the persitent locale ... and redirects to the actial page.
 
 Shit this seems messy ...
 
 Thanks for the help anyway!
 
 /Gunnar
 
  @SetupRender
void setupComponent()
{
if (!userExists) {
username = messages.get("username");
password = messages.get("password");
} else {
username = user.getUsername();
password = messages.get("password");
}
 
language = currentLocale.getLanguage();
 
log.debug(LOGPRE + "1:
 TellLayout.setupComponent(currentLocale.language=" + language + ")");
if ((null == state.getLocale()) && (language != null)) {
state.setLocale(new Locale(language));
log.debug(LOGPRE + "2: TellLayout.setupComponent(state.locale
 initiated to " + state.getLocale() + ")");
}
 
if (!persistentLocale.isSet()) {
persistentLocale.set(state.getLocale());
log.debug(LOGPRE + "3:
 TellLayout.setupComponent(persistentLocale.set(" + persistentLocale.get() +
 ")");
} else {
log.debug(LOGPRE + "4:
 TellLayout.setupComponent(persistentLocale=" + persistentLocale.get() +
 ")");
 

Re: JavaScript inside .tml breaks ZoneUpdate for IE

2010-01-13 Thread Moritz Gmelin
Thanks,

We solved it that way but I'd say that probably many people might stumble upon 
this and its hard to track it down.

Could this problem be related to

http://issues.apache.org/jira/browse/TAP5-714

And thus fixed in 5.1.0.7?

M.


Am 12.01.2010 um 20:25 schrieb Kalle Korhonen:

> Or simply with @IncludeJavaScriptLibrary annotation
> (http://tapestry.apache.org/tapestry5.1/guide/ajax.html). Because
> Javascript files are combined, this doesn't incur additional load time
> cost.
> 
> Kalle
> 
> 
> On Tue, Jan 12, 2010 at 8:55 AM, Thiago H. de Paula Figueiredo
>  wrote:
>> On Tue, 12 Jan 2010 14:53:05 -0200, Moritz Gmelin 
>> wrote:
>> 
>>> Hi,
>> 
>> Hi!
>> 
>>>   clickme
>> 
>> @Inject RenderSupport and use its addScript() methods instead of adding the
>> JavaScript inline inside your .tml.
>> 
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
>> instructor
>> Owner, software architect and developer, Ars Machina Tecnologia da
>> Informação Ltda.
>> http://www.arsmachina.com.br
>> 
>> -
>> 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: Loop, RadioGroup and Coercion

2010-01-13 Thread antb59

Hi again,

In fact, I have a correct behavior for the display of the forms when I used
formState="NONE" in the loop inside form.

But the problem is on the parameter "action" of the form that contains the
loop on suggestions.

Here is the HTML code generated when I fix the surveyId value on the first
Loop :




Here is the HTML code generated when I iterate on surveys :





The problem seems to be on "index.surveysuggestionsform.survey_form"

Which modification I have to do in order to have dynamic "action" parameters
for the loop of forms ?

I want the "action" parameter to be 
"index.surveysuggestionsform_0.survey_form"
"index.surveysuggestionsform_1.survey_form"
"index.surveysuggestionsform_2.survey_form"

when I use the component in the following loop :






Regards,
Antoine.
-- 
View this message in context: 
http://old.nabble.com/Loop%2C-RadioGroup-and-Coercion-tp26944581p27147181.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: get component according to ID

2010-01-13 Thread Jun Tsai
2010/1/13 LiborGMC 

>
>
> > You can use prop prefix to get your zone id.
>
>
> 
>  zone="prop:zoneId">refresh data
> 
> 
> 
>
> In page class:
> public String getZoneId(){
>   return "zone_"+entity.getId();
> }
>
> --
> regards,
> Jun Tsai
>
> Thank you for quick reply. I'm not sure if I understand properly your code.
> I have used prop prefix as you have mentioned. And I generated zone ID
> similar to your way.
> But I need to obtain Zone according its ID so I can return Zone in handler
> of "refresh" action link.
>


refresh data

You can use prop prefix to obtain zoneid in actionlink.


>
> Libor
>
> --
> View this message in context:
> http://old.nabble.com/get-component-according-to-ID-tp27144243p27144886.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
>
>


-- 
regards,
Jun Tsai


Re: Bug Fix Release

2010-01-13 Thread Ulrich Stärk

The release is currently being voted upon over at the dev list.

Uli

On 13.01.2010 16:26 schrieb p.stavrini...@albourne.com:

Hi,

I have noticed through jira that the intended release date for the next stable 
version of tapestry 5.1 was Jan 10th (version 5.1.0.7). Is this is still 
pending... I haven't found the jars in the main repo, or will it be pushed back?

Thanks,
Peter





-
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



Bug Fix Release

2010-01-13 Thread P . Stavrinides
Hi,

I have noticed through jira that the intended release date for the next stable 
version of tapestry 5.1 was Jan 10th (version 5.1.0.7). Is this is still 
pending... I haven't found the jars in the main repo, or will it be pushed back?

Thanks,
Peter





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



Re: OT: windows mobile

2010-01-13 Thread Ivano Luberti
Thanks Robin: let say that your link helped me understanding IE Mobile
doesn't support much of Javascript.
Fortunately we are developing ofr an intranet and we can force users to
use Opera Mobile.


Robin Komiwes ha scritto:
> Hi!
>
> Maybe you cold have a look at : http://www.quirksmode.org/m/table.html
>
> On Tue, Jan 12, 2010 at 3:29 PM, Ivano Luberti  wrote:
>
>   
>> Hi, I have to develop a web application for Widnows Mobile 6.1
>> Anyone hear can point me to some documentation about how to configure
>> properly IE Mobile ?
>> It seems that Javascript is not enabled or at least that even most
>> trivial javascript don't run and I cannot find a way to tweak IE
>> configuration?
>> I have already spent half a day on Microsoft Web site : the worst ever !
>>
>> --
>> ==
>> dott. Ivano Mario Luberti
>> Archimede Informatica societa' cooperativa a r. l.
>> Sede Operativa
>> Via Gereschi 36 - 56126- Pisa
>> tel.: +39-050- 580959
>> tel/fax: +39-050-9711344
>> web: www.archicoop.it
>> ==
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>> 
>
>   

-- 
==
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==


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



Re: get component according to ID

2010-01-13 Thread LiborGMC


> You can use prop prefix to get your zone id.



refresh data




In page class:
public String getZoneId(){
   return "zone_"+entity.getId();
}

-- 
regards,
Jun Tsai

Thank you for quick reply. I'm not sure if I understand properly your code.
I have used prop prefix as you have mentioned. And I generated zone ID
similar to your way.
But I need to obtain Zone according its ID so I can return Zone in handler
of "refresh" action link.

Libor

-- 
View this message in context: 
http://old.nabble.com/get-component-according-to-ID-tp27144243p27144886.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: How to obtain current page in component's code

2010-01-13 Thread LiborGMC

Thank you very much!
-- 
View this message in context: 
http://old.nabble.com/How-to-obtain-current-page-in-component%27s-code-tp27144292p27144805.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: get component according to ID

2010-01-13 Thread Jun Tsai
2010/1/13 LiborGMC 

>
> Hi,
> I'm trying develop component which is basically Grid which is quite dynamic
> (count of columns, different types of displayed objects). This table is in
> Zone to ensure that if user wants refresh just grid then page is not
> reloaded. I would like to have more these components on single page.
> I have problem with obtaining proper Zone for proper Grid. I generate ID
> for
> zone according to id of component. But I don't know how to get zone
> according its ID. I have checked
> "ComponentResources.getComponentModel().getEmbeddedComponentIds()" but this
> method returns only ids which are injected into Java class of component.
> Could anybody helps me?
> Thanks
>
> You can use prop prefix to get your zone id.



refresh data




In page class:
public String getZoneId(){
   return "zone_"+entity.getId();
}



> --
> View this message in context:
> http://old.nabble.com/get-component-according-to-ID-tp27144243p27144243.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
>
>


-- 
regards,
Jun Tsai


Re: How to obtain current page in component's code

2010-01-13 Thread Jun Tsai
@Inject
private ComponentResources resources;

resources.getPageName();

2010/1/13 LiborGMC 

>
> Hi,
> can I obtain page in the code of component? I would like to get Zone
> component by calling
> "componentSource.getComponent("pageName:componentName.zone");" but I'm not
> sure how can I find out pageName.
> Thanks in advance
> --
> View this message in context:
> http://old.nabble.com/How-to-obtain-current-page-in-component%27s-code-tp27144292p27144292.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
>
>


-- 
regards,
Jun Tsai


Maybe jdk or T5 bug about generic service interface.

2010-01-13 Thread Jun Tsai
hi,
 I have a base interface for my service.
 public interface BaseInterface {
public  List find(T parent);
public  List findAll();
 }
//- ServiceA
 public interface ServiceAInterface extends BaseInterface {
   @Cacheable(clazz=Member.class,cacheKey="xxx")
public  List find(Member parent);
   @Cacheable(clazz=Member.class,cacheKey="x")
public  List findAll();

 }
public class ServiceA implements ServiceAInterface{
 ..
}


I use an advice to enhance the service;

If I call service.findAll(),I find the advice works fine.But if I call
service.find(parent),The advice never be called.
I debug the AspectInterceptorBuilderImpl class,I find

69   remainingMethods.addAll(Arrays.asList(serviceInterface.getMethods()));

serviceInteface.getMethods() that incluedes three method:

List findAll()
List find(com.xxx.Distirct)
List find(java.lang.Object) .

The method List findAll() and List find(com.xxx.Distirct) was enhanced.When
I call service.find(district),It will call List find(java.lang.Object)
method, the advice doesn't works.


But I think If serviceInterface.getMethods() returns  two method:

List findAll()
List find(com.xxx.Distirct).

All works fine;


JDK bug or T5 bug?give me some advice.thanks.



-- 
regards,
Jun Tsai


How to obtain current page in component's code

2010-01-13 Thread LiborGMC

Hi,
can I obtain page in the code of component? I would like to get Zone
component by calling
"componentSource.getComponent("pageName:componentName.zone");" but I'm not
sure how can I find out pageName.
Thanks in advance
-- 
View this message in context: 
http://old.nabble.com/How-to-obtain-current-page-in-component%27s-code-tp27144292p27144292.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



get component according to ID

2010-01-13 Thread LiborGMC

Hi,
I'm trying develop component which is basically Grid which is quite dynamic
(count of columns, different types of displayed objects). This table is in
Zone to ensure that if user wants refresh just grid then page is not
reloaded. I would like to have more these components on single page.
I have problem with obtaining proper Zone for proper Grid. I generate ID for
zone according to id of component. But I don't know how to get zone
according its ID. I have checked
"ComponentResources.getComponentModel().getEmbeddedComponentIds()" but this
method returns only ids which are injected into Java class of component.
Could anybody helps me?
Thanks


-- 
View this message in context: 
http://old.nabble.com/get-component-according-to-ID-tp27144243p27144243.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: page generic problem

2010-01-13 Thread Jun Tsai
2010/1/13 Thiago H. de Paula Figueiredo 

> On Wed, 13 Jan 2010 10:14:00 -0200, Jun Tsai  wrote:
>
>  Two levels works fine.but three levels doesn't work.
>>
>
> This looks like a bug or improvement. What about a JIRA about it?
>
>
>
https://issues.apache.org/jira/browse/TAP5-982


> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
regards,
Jun Tsai


Re: page generic problem

2010-01-13 Thread Thiago H. de Paula Figueiredo

On Wed, 13 Jan 2010 10:14:00 -0200, Jun Tsai  wrote:


Two levels works fine.but three levels doesn't work.


This looks like a bug or improvement. What about a JIRA about it?

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Re: page generic problem

2010-01-13 Thread Jun Tsai
2010/1/13 Thiago H. de Paula Figueiredo 

> On Wed, 13 Jan 2010 01:13:29 -0200, DH  wrote:
>
>  I think T5 doens't support generic well in page class, I got some
>> unexpected exceptions too.
>>
>
> I use generic superclasses a lot without problems. In this case, a generic
> interface is used. Maybe that's the source of the problem. Another one is
> that the hierarchy has three levels (PageA -> PageB -> PageC). I use two
> levels.
>
>
Two levels works fine.but three levels doesn't work.


> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
regards,
Jun Tsai


Re: page generic problem

2010-01-13 Thread Thiago H. de Paula Figueiredo

On Wed, 13 Jan 2010 01:13:29 -0200, DH  wrote:

I think T5 doens't support generic well in page class, I got some  
unexpected exceptions too.


I use generic superclasses a lot without problems. In this case, a generic  
interface is used. Maybe that's the source of the problem. Another one is  
that the hierarchy has three levels (PageA -> PageB -> PageC). I use two  
levels.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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