Client validation occurs even when there is no t:validate

2009-03-06 Thread Borut Bolčina
Hi,

I am building a date input component with three select input fields
(day, month, year). Actually I am modifying the code from Alexander's
book. The goal is that the initial value of all three select
components are empty if the date parameter is not provided. Although
none of the t:select(s) has t:validate="required"

http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>





the html generated includes this piece of javascript at the bottom:



...so when I submit the form I get two error bubbles - one for day,
and one for year.

Any clues?


This is part of the custom component class:

public class DayMonthYearDateInput implements Field {

...
@Parameter(required = true)
private Date date;

private Calendar c = Calendar.getInstance();

@SetupRender
void setupCalendar() {
logger.info("setupCalendar() : " + date);
if (date!= null) {
c.setTime(date);
}
}

public SelectModel getDayModel() {
return new IntegerSelectModel(1, 31);
}

public SelectModel getYearModel() {
return new IntegerSelectModel(1960, 2010);
}

public SelectModel getMonthModel() {
return new EnumSelectModel(Month.class, messages);
}

public ValueEncoder getEncoder() {
return new IntegerValueEncoder();
}

public int getDay() {
logger.info("getDay() : " + c.get(Calendar.DATE));
return (date==null)?0:c.get(Calendar.DATE);
}

public void setDay(int day) {
c.set(Calendar.DATE, day);
}

public Month getMonth() {
logger.info("getMonth() : " + Month.values()[c.get(Calendar.MONTH)]);
return (date==null)?null:Month.values()[c.get(Calendar.MONTH)];
}

public void setMonth(Month month) {
c.set(Calendar.MONTH, month.getOrder());
}

public int getYear() {
logger.info("getYear() : " + c.get(Calendar.YEAR));
return (date==null)?0:c.get(Calendar.YEAR);
}

}


Thanks,
Borut

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



Re: apache configs to avoid subdirectory conflicts?

2009-03-06 Thread Howard Lewis Ship
My experience hasn't used mod_jk, just running a Tomcat instance and
using Apache proxying:

ProxyPass /bamboo http://localhost:8085/bamboo
ProxyPassReverse /bamboo http://localhost:8085/bamboo

ProxyPass /jira http://localhost:8085/jira
ProxyPassReverse /jira http://localhost:8085/jira

ProxyPass /wiki http://localhost:8085/wiki
ProxyPassReverse /wiki http://localhost:8085/wiki

ProxyPass /svnadmin http://localhost:8085/svnadmin
ProxyPassReverse /svnadmin http://localhost:8085/svnadmin


On Fri, Mar 6, 2009 at 8:12 PM, Alex Kotchnev  wrote:
> Michael,
>   as you indicated, this sounds like an apache/ mod_jk issue that would
> probably be better addressed at the relevant mailing list. You can still try
> to post your specific mod_jk config here and maybe someone who has dealt w/
> a similar config can advise you on the subject. As you indicate, if the
> Tomcat only config works properly, the issue is probably not w/ T5.
>
>   On a separate note, a more concise problem statement would probably help.
> We do want to help, but it is sometimes difficult to read through a very
> long description of the problem (it's much easier to move onto the next
> message).
>
>   One thing that you also note is that T5 is indeed case insensitive, while
> apache isn't. Thus, if your Apache instance is configured to redirect
> requests to /Admin to the T5 app, it would definitely not redirect requests
> to /admin to the same app, unless explicitly configured to do so.
>
> Cheers,
>
> Alex Kotchnev
>
> On Thu, Mar 5, 2009 at 3:10 AM, Michael Huff  wrote:
>
>> greetings,
>>
>> i just signed up to this list; i'm faily new to tapestry, especially 5.
>> i've
>> searched the web extensively trying to find some reference to this issue,
>> with so little success that i think i'm fundamentally misunderstanding
>> something at this point. any assitance or pointers would be greatly
>> appreciated:
>>
>> we have a tapestry 5 webapp running with tomcat (5 and 6, on different
>> environments) and apache2. apache passes along the requests to particular
>> webapp instances via virtual hosts using mod_jk workers to handle the
>> service requests. all pretty standard. however, we can't get the requests
>> for the tml files in a subdirectory (not in WEB-INF) to be handled
>> correctly. i'm fairly convinced that the apache configs are the issue here
>> because on the localhost builds that run from the tomcat root without
>> apache, we don't see this issue, but i can't find a way to resolve it.
>>
>> the app has an 'admin' user interface that imo should be a separate webapp
>> altogether, but that's a different story; in this story, there is an /admin
>> subdir at the webapp root (so, not a subdir of WEB-INF). hitting that admin
>> dir directly should produce the index.tml in that subdir, which is a login
>> form for this subset of users. however, webapp.com/admin produces a
>> directory listing, which clearly is not what we want. webapp.com/Admin,
>> however, does indeed bring us the Index.tml in the admin dir, with a
>> loginForm therein. which brings us to the second issue: submitting the form
>> causes apache/tomcat to throw a 404 because "index.loginform" can't be
>> found.
>>
>> so it seems clearly that there's some kind of proxy/precedence issue
>> happening with apache trying to serve the "admin" directory, but tapestry
>> handling the request for the "Admin" directory correctly. i know tapestry
>> does pretty urls and is largely case-insensitive in that manner, and i'm
>> guessing the above behavior may have something to do with that? we've tried
>> moving components around, creating additional app descriptions and filters
>> in the web.xml, etc, with no luck so far. this seems absurdly trivial, but
>> i'm not sure if we're just trying to do something that is outside of the
>> intended tapestry design or what. we moved all of the files out of the
>> /admin directory, refactoring code accordingly, and it all works fine, but
>> that's not much of a solution for the kind or the scale of development
>> we're
>> doing going forward here. so, again, any help would be much appreciate
>> indeed.
>>
>> cheers,
>>
>> -michael huff
>> tapestry newbie
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: T5 ConcurrentBarrier / Deadlock

2009-03-06 Thread Alex Kotchnev
I also recall the deadlock issues manifested themselves on particular JVM
versions which were fixed in the latest updates. Which Java version are you
running ?

Cheers,

Alex Kotchnev

On Thu, Mar 5, 2009 at 12:40 PM,  wrote:

> Hi!
>
> We encountered a "small" problem in the way tapestry detects changes of
> tml's and classes which causes a server crash: in our special case the
> request which detected changes used the ConcurrentBarrier write-lock to
> block all other threads. This is ok as long you guarantee the request will
> return. Due to a bug in the 64Bit VM concerning regex execution the regex
> parser went into an indefinite loop. This causes a break down of the tomcat
> as all other request where blocked when trying to pass the ConcurrentBarrier
> which was never unlocked as the responsible thread never finished. Same
> applies for example if you need to communicate to external systems and eg a
> network/socket problem causes the thread to freeze which also locks the
> whole server. Is it possible to move the lock/and rereading of tmls/classes
> to a different thread if changes exist? Means regardless if the request
> responsible for firing the update ever returns the tomcat remains accessible
> after rereading? You can argue chances for this are not high, but since
> SEP-08 we had this trouble two times in production...
> Before I forget: affected version is T5.0.13. we are currently moving over
> to T5.0.18, so maybe there is a solution yet?
>
> Jens
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: hi, about the remotelink minixs

2009-03-06 Thread Alex Kotchnev
Nile,
  do re-read the T5 docs (e.g.
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/ActionLink.html,
 ), I think what you're trying to accomplish with your remotelink
mixin is
already being accomplished w/ zones:

Ajaxy goodness


   



   


then, in your code:

@Component
private Block updateBlock

public onActionFromFoo() {
   return updateBlock;
}

Cheers,

Alex Kotchnev

On Thu, Mar 5, 2009 at 4:51 AM, nile black  wrote:

> miss attachments
>
> Nile Black
> -
> 每天一个小时debian.
>
>
>
> On Wed, Mar 4, 2009 at 10:37 PM, nile black  wrote:
>
>> hi
>>i write a simple minixs call remotelink, it look like grails's
>> remotelink.
>>maybe minixs greate!
>>
>> you can simple use
>>
>> > t:type="actionlink" t:update="result"
>> t:mixins="remotelink">action
>> > t:type="pagelink" t:update="result" t:mixins="remotelink">page
>> result will show here.
>>
>>but i confused by the return.
>>My first question is : what should ajax action return? json? html
>> fragment? xml?
>>
>>One of t5's benefit is "you can use dreamweaver edit the tml”.
>> In example code, "pagelink" work fine. because it return "html". but
>> actionlink is not perfect.
>> My seconde question is : how to return  html fragment in action.
>>
>>
>>
>> Nile Black
>> -
>> 每天一个小时debian.
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>


Re: apache configs to avoid subdirectory conflicts?

2009-03-06 Thread Alex Kotchnev
Michael,
   as you indicated, this sounds like an apache/ mod_jk issue that would
probably be better addressed at the relevant mailing list. You can still try
to post your specific mod_jk config here and maybe someone who has dealt w/
a similar config can advise you on the subject. As you indicate, if the
Tomcat only config works properly, the issue is probably not w/ T5.

   On a separate note, a more concise problem statement would probably help.
We do want to help, but it is sometimes difficult to read through a very
long description of the problem (it's much easier to move onto the next
message).

   One thing that you also note is that T5 is indeed case insensitive, while
apache isn't. Thus, if your Apache instance is configured to redirect
requests to /Admin to the T5 app, it would definitely not redirect requests
to /admin to the same app, unless explicitly configured to do so.

Cheers,

Alex Kotchnev

On Thu, Mar 5, 2009 at 3:10 AM, Michael Huff  wrote:

> greetings,
>
> i just signed up to this list; i'm faily new to tapestry, especially 5.
> i've
> searched the web extensively trying to find some reference to this issue,
> with so little success that i think i'm fundamentally misunderstanding
> something at this point. any assitance or pointers would be greatly
> appreciated:
>
> we have a tapestry 5 webapp running with tomcat (5 and 6, on different
> environments) and apache2. apache passes along the requests to particular
> webapp instances via virtual hosts using mod_jk workers to handle the
> service requests. all pretty standard. however, we can't get the requests
> for the tml files in a subdirectory (not in WEB-INF) to be handled
> correctly. i'm fairly convinced that the apache configs are the issue here
> because on the localhost builds that run from the tomcat root without
> apache, we don't see this issue, but i can't find a way to resolve it.
>
> the app has an 'admin' user interface that imo should be a separate webapp
> altogether, but that's a different story; in this story, there is an /admin
> subdir at the webapp root (so, not a subdir of WEB-INF). hitting that admin
> dir directly should produce the index.tml in that subdir, which is a login
> form for this subset of users. however, webapp.com/admin produces a
> directory listing, which clearly is not what we want. webapp.com/Admin,
> however, does indeed bring us the Index.tml in the admin dir, with a
> loginForm therein. which brings us to the second issue: submitting the form
> causes apache/tomcat to throw a 404 because "index.loginform" can't be
> found.
>
> so it seems clearly that there's some kind of proxy/precedence issue
> happening with apache trying to serve the "admin" directory, but tapestry
> handling the request for the "Admin" directory correctly. i know tapestry
> does pretty urls and is largely case-insensitive in that manner, and i'm
> guessing the above behavior may have something to do with that? we've tried
> moving components around, creating additional app descriptions and filters
> in the web.xml, etc, with no luck so far. this seems absurdly trivial, but
> i'm not sure if we're just trying to do something that is outside of the
> intended tapestry design or what. we moved all of the files out of the
> /admin directory, refactoring code accordingly, and it all works fine, but
> that's not much of a solution for the kind or the scale of development
> we're
> doing going forward here. so, again, any help would be much appreciate
> indeed.
>
> cheers,
>
> -michael huff
> tapestry newbie
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: not all hibernate records saving

2009-03-06 Thread Alex Kotchnev
James,
   I am not sure if you've solved your problem, but it sounds like you might
have non-Tapestry related issues to deal with (e.g. Hibernate). If you still
feel that your problems are due to T5, please post some actual code (instead
of pseudocode) with a clear statement of your problem.

Cheers,

Alex Kotchnev

On Wed, Mar 4, 2009 at 10:45 PM, Jsherwood wrote:

>
> Hello,
>
> I have a page that you load an excel file and read each line converting it
> to records.
>
> It works fine with no errors anywhere but out of 15855 lines it only
> actually puts in 11272 records but my count on the loop shows 15855 and I
> cannot figure out why these records are not saving with no errors being
> produced.
>
> This is my basic logic(I have tried @CommitAfter but using
> _session.beginTransaction and commit at each save actually produced some
> errors I was able to fix that @CommitAfter did not)
>
> Loop Lines{
> ReadLine{
>readCells(line)
> }}
>
>
>
> readCells(line){
>   loopCells{
>  read cell and put in corresponding field
>  fields that link, check if the field is in the foreign table, if not
> add it and put id in field
>   }
> }
>
> Again I have tried using @CommitAfter however using the
> beingTransaction/commit around each save produced more errors IE: invalid
> date format in a date field etc. but now there are NO errors being thrown.
>
> Are there errors I cannot see somehow?
>
> Thanks,
> --James
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Page navigation passed value not displayed (@InjectPage style)

2009-03-06 Thread Andy Pahne



That's possible. Have a look at
   http://tapestry.formos.com/nightly/tapestry5/tapestry-ioc/coerce.html
esp. the section "Contributing new Coercions"







Example: I want to pass a User through activation context:

class User { private String name; private String password;...}

Registration{
...
public void onActivate(User user){...}

}








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



Re: 5.1.0.1-SNAPSHOT submit context not workin in a loop

2009-03-06 Thread Howard Lewis Ship
I don't even think I've changed anything in the Submit component, odd.

On Fri, Mar 6, 2009 at 12:27 PM, Ville Virtanen
 wrote:
>
> Hi,
>
> I'm getting weird behavior here, it seems that the submit component is not
> getting the right context anymore to the event handler when used in loop.
> I've double and triple checked that I only have one consistent set of T5
> libraries when the project is run, also the value encoders are there and
> from what I can tell working correctly.
>
> If I use the old "use a hidden field" method copied from howtos wiki,
> everything works ok.
>
> Is anybody else getting this? Is something else changed that could affect
> this?
>
>  - Ville
> --
> View this message in context: 
> http://www.nabble.com/5.1.0.1-SNAPSHOT-submit-context-not-workin-in-a-loop-tp22379936p22379936.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 Apache Tapestry and Apache HiveMind

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



Re: Invoking a custom show javascript method for a Zone

2009-03-06 Thread Alex Kotchnev
Dave,
  I'm curious: what kind of hook would have been helpful for your
particular case? Tapestry, being a framework optimizes for the common
use cases, thus if your case is not i that category, it might be
somewhat more difficult (than the common cases and more difficult than
'no framework') . At the same time as a framework, it is also very
important for T5 to provide hooks for the 'not so common' cases so
that you don't have to hack it when you have a special need. T5 is
very good about the same on the server side (the ioc magic), not so
good on the client side, so it's important to note the difficulties...

On 3/4/09, Dave Greggory  wrote:
>
> yeah I tried both show and update methods, didn't really work.
>
> I finally got it to work by just adding the following to my event link.
>
> onclick="editWindow.show('editWindow'); resizeWindow(500, 500);"
>
> So right after (or is it before) it calls the event method it also shows the
> Window. Not ideal and it could potentially, show the window before Ajax
> event could return the Zone content inside the window, but seems to work.
>
> Tapestry certainly requires a lot of effort to get small things done.
>
> Thanks Thiago for the Ajax.Responder recommendation, I'll look into it.
>
>
>
>
>
> - Original Message 
> From: Thiago H. de Paula Figueiredo 
> To: Tapestry users 
> Sent: Tuesday, March 3, 2009 10:33:44 PM
> Subject: Re: Invoking a custom show javascript method for a Zone
>
> Em Wed, 04 Mar 2009 00:25:35 -0300, Fernando Padilla 
> escreveu:
>
>> so you maybe you should set both?
>
> Maybe we should file a JIRA for another parameter for Zone-supported
> components? One to specify a callback (or set of callbacks) to AJAX
> requests?
>
> Have you guys tried Ajax.Responders.register(responder)? Documentation at
> http://www.prototypejs.org/api/ajax/. It is a way to provide some global
> callback functions to made through Ajax.Request, Ajax.Updater and
> Ajax.PeriodicalUpdater.
>
> --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
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-- 
Sent from my mobile device

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



Re: Page navigation passed value not displayed (@InjectPage style)

2009-03-06 Thread manuel aldana

manuel aldana schrieb:

manuel aldana schrieb:
 
 [...]
Thanks. Adding @Persist made the trick. But I think I will go for the 
activation context,[...]
But I wonder, how to overcome the HttpSession, if I want to pass 
multiple values and want to use activation context for that. So far I 
have only seen onActivation() methods with one parameter of the simple 
types (int, long, String etc.).

Is it possible to pass multiple values through activation context?


It seems that such a similar thing is possible with 
http://code.google.com/p/t5-restful-webservices/wiki/GettingStarted, but 
I think it would be really cool if such a thing would be included in 
tapestry out of the box.


Example: I want to pass a User through activation context:

class User { private String name; private String password;...}

Registration{
...
public void onActivate(User user){...}

}

as URL it could be serialized by tapestry as something like: 
http://domain/targetPage/paulpaulAtdomain




--
manuel aldana
ald...@gmx.de
software-engineering blog: http://www.aldana-online.de


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



Re: Page navigation passed value not displayed (@InjectPage style)

2009-03-06 Thread manuel aldana

manuel aldana schrieb:
 
 [...]
Thanks. Adding @Persist made the trick. But I think I will go for the 
activation context,[...]
But I wonder, how to overcome the HttpSession, if I want to pass multiple values and want to use activation context for that. So far I have only seen onActivation() methods with one parameter of the simple types (int, long, String etc.). 


Is it possible to pass multiple values through activation context?


--
manuel aldana
ald...@gmx.de
software-engineering blog: http://www.aldana-online.de


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



Tapestry and JPA/Spring transactions

2009-03-06 Thread Jason Tan
Is there a library/resource for opening and closing JPA EntityTransactions
per request like how tapestry-hibernate does? I discovered the wiki
pageon
integrating Spring's @Transactional so you could place it on a
setupRender( ), but I'm still unsure how you'd use that to encapsulate the
request (instead of just one method) -- the core problem here is that we
have ORM objects with associations that aren't eagerly fetched (because
they're @OneToMany). Thus, outside of the DAO service call (which is
annotated with @Transactional), the associations are null. We could use
eager fetching per-query or per-class, but I think the most natural fix is
opening and closing a transaction per request. Ideas?

Thanks,
Jason


Re: Tabindex and accesskey in BeanEditForm?

2009-03-06 Thread Luther Baker
Take a look at Thiago's response to my *similar* question earlier today:

http://www.nabble.com/t%3ATextField-and-t%3ATextArea-to22375618.html

-Luther


On Fri, Mar 6, 2009 at 3:25 PM, leechj  wrote:

>
> Hello,
> I was wondering if there was an easy way to add properties to fields in a
> BeanEditForm.
> Our application needs "tabindex" and "accesskey" in all fields in order to
> comply with federal rules dealing with accessibility. Is there a way to add
> these 2 properties to the fields in the form or should I just create the
> form by hand instead of using BeanEditForm?
>
> Thanks for any help!
>
>
> --
> View this message in context:
> http://www.nabble.com/Tabindex-and-accesskey-in-BeanEditForm--tp22380749p22380749.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
>
>


Tabindex and accesskey in BeanEditForm?

2009-03-06 Thread leechj

Hello,
I was wondering if there was an easy way to add properties to fields in a
BeanEditForm.
Our application needs "tabindex" and "accesskey" in all fields in order to
comply with federal rules dealing with accessibility. Is there a way to add
these 2 properties to the fields in the form or should I just create the
form by hand instead of using BeanEditForm?

Thanks for any help!


-- 
View this message in context: 
http://www.nabble.com/Tabindex-and-accesskey-in-BeanEditForm--tp22380749p22380749.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 navigation passed value not displayed (@InjectPage style)

2009-03-06 Thread manuel aldana

Thiago H. de Paula Figueiredo schrieb:

On Thu, Mar 5, 2009 at 10:24 PM, Luther Baker  wrote:
  

Try adding @Persist to the destination class ... otherwise, I'm not sure
you're guaranteed which page instance will get rendered.



I would suggest @Persist("flash"): the field is put in the session and
then removed after it's read the first time. ;)

Manuel, please post you updated code here because the one in the first
message should work when you add @Persist or @Persist("flash") to
SendingActivationEmail.email.
Thanks. Adding @Persist made the trick. But I think I will go for the 
activation context, because I want to avoid HttpSession, even if it is 
for one call. This way I make my webapp-server stateless completely and 
am avoiding sticky-server problems.


public class SendingActivationEmail
{

   @Persist("flash")
   private String email;

   public String getEmail()
   {
   return email;
   }

   public void setEmail(String email)
   {
   this.email = email;
   }
}


--
manuel aldana
ald...@gmx.de
software-engineering blog: http://www.aldana-online.de


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



5.1.0.1-SNAPSHOT submit context not workin in a loop

2009-03-06 Thread Ville Virtanen

Hi,

I'm getting weird behavior here, it seems that the submit component is not
getting the right context anymore to the event handler when used in loop.
I've double and triple checked that I only have one consistent set of T5
libraries when the project is run, also the value encoders are there and
from what I can tell working correctly.

If I use the old "use a hidden field" method copied from howtos wiki,
everything works ok.

Is anybody else getting this? Is something else changed that could affect
this?

 - Ville
-- 
View this message in context: 
http://www.nabble.com/5.1.0.1-SNAPSHOT-submit-context-not-workin-in-a-loop-tp22379936p22379936.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: Tapestry way for email-templates

2009-03-06 Thread Howard Lewis Ship
Correct; you need a separate process; Tapestry is configured quite
differently for templating/mailing than it is for normal, interactive
behavior.

On Fri, Mar 6, 2009 at 2:25 AM, manuel aldana  wrote:
> Don't get this. So I can't use T5 templateAPI inside my tapestry 5 app.
>
> Angelo Chen schrieb:
>>
>> Hi Howard,
>>
>> I like that template API, currently I use Velocity, however T5's
>> templateAPI
>> can't be part of T5 app, would be great if can be part of T5 app like
>> Velocity.
>>
>> Angelo
>>
>>
>> Howard Lewis Ship wrote:
>>
>>>
>>> http://tapestry.formos.com/nightly/tapestry-templating/
>>>
>>> On Thu, Mar 5, 2009 at 4:03 PM, manuel aldana  wrote:
>>>

 Hi,

 for sending out emails I need templates. Is there an internal tapestry
 way
 to solve this (currently .tml are bound to pages/components). Is there a
 .tml way to use templates outside of components and pages or do I need
 to
 resort to something like Velocity  or Freemarker?

 thanks.

 --
 manuel aldana
 ald...@gmx.de
 software-engineering blog: http://www.aldana-online.de


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



>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator Apache Tapestry and Apache HiveMind
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>>
>>>
>>
>>
>
>
> --
> manuel aldana
> ald...@gmx.de
> software-engineering blog: http://www.aldana-online.de
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: Tapestry 5.1: Wait for Page

2009-03-06 Thread Howard Lewis Ship
It only affects Ajax links; they must explicitly add an onclick event
handler attributes. Beyond that, the behavior can be changed by
monkey-patching the JavaScript and the CSS.

On Fri, Mar 6, 2009 at 3:55 AM, Chris Lewis  wrote:
> Will this be configurable? While it can be a useful feature, there are times
> where clicking a link (etc) before the page is ready won't break the app.
> Additionally, I get a little freaked out at any non-essential feature I
> can't control. So, will it be configurable?
>
> sincerely,
> chris
>
> Howard Lewis Ship wrote:
>>
>> I've uploaded a short clip showing how the wait-for-page functionality
>> works in 5.1.
>>
>> http://blip.tv/file/1844614/
>>
>>
>
> --
> http://iamchrislewis.tumblr.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 Apache Tapestry and Apache HiveMind

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



Re: Encoding in activation context

2009-03-06 Thread Marcus Veloso
Hi Fernando,
Maybe this help.
http://code.google.com/p/t5-restful-webservices/

Cheers,

Marcue Veloso


Re: Encoding in activation context

2009-03-06 Thread Thiago H. de Paula Figueiredo
Em Fri, 06 Mar 2009 13:34:45 -0300, Fernando Bellas Permuy  
 escreveu:



Hi!


Hi!

Experimentally, I have observed that the client must use the following  
URL:

http://.../myService/40/The$0020Java$0020Programming$0020Language


This encoding is done by the org.apache.tapestry5.services.URLEncoder  
service. You can write your own and override the default Tapestry one  
using alias overrides:  
http://tapestry.apache.org/tapestry5/guide/alias.html.



Should Tapestry use RFC 2396, as java.net.URI does?


Until some minor versions ago, that's what Tapestry used. Maybe it should  
present some easy way to choose one or another.


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



cross field validation with empty fields

2009-03-06 Thread Ivano Luberti
Hello, we are using T4.1
We have to validate a form and we don't want to do it client side.
Let say we have three text fields.
The validation should implement the following rule:
if (fielda="") && (fieldb="" || fieldc="")
 then throw new Exception("");

The problem is that we cannot link the validation to neither field
because they can be empty and the custom validator we are trying to
implement is nevere called if the field is empty.
We tried to  follow the Identity validator but it is also not called
when the field to which is associated is empty.

Is there another way to accomplish cross field validation ?

It seems to us that in T4.1  lacks a validator attribute for the form
component.


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



Encoding in activation context

2009-03-06 Thread Fernando Bellas Permuy

Hi!

I am implementing a simple service that returns XML (a RESTful service 
invoked by GET) as a Tapestry 5 page. That is, the associated template 
(.tml) does not return HTML/XHTML, but XML. I have used the @ContentType 
annotation on the page class: @ContentType("text/xml"). All is working 
fine. To my understanding, Tapestry does not provide any specific 
support to implement this kind of services. However, the usual page 
support should be enough for GET/POST requests (I am only interested in 
GET requests by now).


The page has an activation context. The activation context represents 
the parameters of my service. To simplify my question, consider that the 
service requires two parameters: category and keywords. Since Tapestry 
embeds the activation context inside the URL's path, to invoke my 
service by GET, the client must make a call to a URL like:


http://.../myservice/<>/<>

e.g. (category=40, keyworkds=Java)

http://.../myService/40/Java

Let us suppose "keywords" contains blank characters, like for example 
"The Java Programming Language"


Experimentally, I have observed that the client must use the following URL:

http://.../myService/40/The$0020Java$0020Programming$0020Language

That is, blank characters must be replaced by $0020. Other non-English 
characters (e.g. latin characters like ñ, á, etc.) must be encoded.


I understand that Tapestry encodes the activation context by using 
org.apache.tapestry5.services.URLEncoder. Does this class follows some 
standard encoding mechanism? - In my case this is necessary, since the 
client is not Java, but .NET.


Should Tapestry use RFC 2396, as java.net.URI does?

Any advice for my client code?

Any other strategy to implement an XML service in Tapestry?

Thanks!

--
Fernando Bellas Permuy

Associate Professor (Titular) at University of A Coruña
Department of Information and Communications Technologies
Facultad de Informática - Campus de Elviña, S/N
15071 - A Coruña - Spain
http://www.tic.udc.es/~fbellas - fbel...@udc.es
Tel: +34 981 167 000 (ext: 1353) - Fax: +34 981 167 160

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



Re: t:TextField and t:TextArea

2009-03-06 Thread Thiago H. de Paula Figueiredo
Em Fri, 06 Mar 2009 13:16:44 -0300, Luther Baker   
escreveu:



Is there a global way to explicitly set or override *html *(non-CSS)
attributes on tapestry components like textfield and textarea?


What you need is to implement a DataTypeAnalyzer, define two "Tapestry  
types" (in parenthesis because they're just a name) and provide edition  
blocks for them. And contributing your DataTypeAnalyzer to the  
DataTypeAnalyzer service:


public static void  
contributeDataTypeAnalyzer(OrderedConfiguration  
configuration) {
configuration.add("SomeIdJustUsedForSorting", new  
YourDataTypeAnalyzer(), "before:Default");

}

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



t:TextField and t:TextArea

2009-03-06 Thread Luther Baker
Is there a global way to explicitly set or override *html *(non-CSS)
attributes on tapestry components like textfield and textarea?

For instance, in one particular app, I have to override almost all of my
components with t:Parameters that define slightly custom sizes for these:

textfield: size="106" maxlength="105"
textarea: cols="80" rows="4"

But in my case, these custom sizes apply to 90% of the fields in the 15
forms.

-Luther


[T5.0.18] How to change default persistence strategy for the whole application?

2009-03-06 Thread Tapestry Infodea

Hi guys,
I've tried to change the configuration in my application module as follows:

public static void contributeFactoryDefaults(MappedConfigurationString> configuration) {
	configuration.add(PersistentFieldManagerImpl.META_KEY, 
PersistenceConstants.FLASH);

}

This approach don't works :(

Have you any idea?

Regards,

Roberto.


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



Re: How to refresh the page if user click "back" button.

2009-03-06 Thread Thiago H. de Paula Figueiredo
On Fri, Mar 6, 2009 at 9:05 AM, Tan cyb...@n  wrote:
> hi,

Hi!

> May I know is there any way the tapestry able to detect the page is clicked
> by "back" button. then it will refresh itself automatically?
> I don wan to use javascript history.foward() to control.

HTTP does not automatically warns the server that the page was closed
or the user clicked any browser button. Given that, your solution is
JavaScript.

-- 
Thiago

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



Re: Page navigation passed value not displayed (@InjectPage style)

2009-03-06 Thread Thiago H. de Paula Figueiredo
On Thu, Mar 5, 2009 at 10:24 PM, Luther Baker  wrote:
> Try adding @Persist to the destination class ... otherwise, I'm not sure
> you're guaranteed which page instance will get rendered.

I would suggest @Persist("flash"): the field is put in the session and
then removed after it's read the first time. ;)

Manuel, please post you updated code here because the one in the first
message should work when you add @Persist or @Persist("flash") to
SendingActivationEmail.email.

-- 
Thiago

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



How to refresh the page if user click "back" button.

2009-03-06 Thread Tan cyb...@n
hi,

May I know is there any way the tapestry able to detect the page is clicked
by "back" button. then it will refresh itself automatically?
I don wan to use javascript history.foward() to control.
Thank you.

Regards,
Tan


Re: Tapestry 5.1: Wait for Page

2009-03-06 Thread Chris Lewis
Will this be configurable? While it can be a useful feature, there are 
times where clicking a link (etc) before the page is ready won't break 
the app. Additionally, I get a little freaked out at any non-essential 
feature I can't control. So, will it be configurable?


sincerely,
chris

Howard Lewis Ship wrote:

I've uploaded a short clip showing how the wait-for-page functionality
works in 5.1.

http://blip.tv/file/1844614/

  


--
http://iamchrislewis.tumblr.com/


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



Re: Tapestry JSONObject : no 'function' type, any workaround ?

2009-03-06 Thread Francois Armand

Rico Landefeld wrote:

Hello,

I had the same annoying problem, but the patch works for me. But my question
is: when will be a tapestry maintenance release which contains already this
patch? btw, the same problem was solved in tapestry 4.1 long ago.
  
I would like - much prefer in fact - a workaround that does not imply to 
have my own version of T5... Already does that some times ago for an 
UTF-8 problem in URLs, and it's a mess to maintain (pom with non 
standard T5 repos, etc.).


So, if someone has a less disruptive workaround, I will be glad to hear 
it :) (nonetheless, I keep in mind this solution...)



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

Open Source identities management and federation


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



Re: Tapestry JSONObject : no 'function' type, any workaround ?

2009-03-06 Thread Rico Landefeld
Hello,

I had the same annoying problem, but the patch works for me. But my question
is: when will be a tapestry maintenance release which contains already this
patch? btw, the same problem was solved in tapestry 4.1 long ago.

rico

On Fri, Mar 6, 2009 at 11:29 AM, Francois Armand wrote:

> Hello,
>
> The JSONObject type doesn't have a "javascript" type that would allows to
> produce unquoted string value.
> I'm aware of the https://issues.apache.org/jira/browse/TAP5-39 issue, so
> my question is : anybody knows a good workaround for that ?
>
> Tanks,
>
> --
> Francois Armand
> Etudes & Développements J2EE
> Groupe Linagora - http://www.linagora.com
> Tél.: +33 (0)1 58 18 68 28
> ---
> http://fanf42.blogspot.com
> InterLDAP - http://interldap.org FederID - http://www.federid.org/
> Open Source identities management and federation
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [T5 5.0.18] java.lang.IllegalStateException: Cannot create a session after the response has been committed

2009-03-06 Thread Angelo Chen

I have same error, the reason is, I have a filer to trim off the long
jsession IDs from url, solution was, I stopped using invalidate in the T5
side. however, according to Peter, this happens when you have a sendRedirect
without a matching return true in a dispatcher, you can try that.


Harald Geritzer-2 wrote:
> 
> 
> hi all,
> 
> the following code causes IllegalStateExceptions on tomcat 6 while using
> jetty it works without 
> errors. any idea?
> 
>   public URL onActionFromLinkLogoff() {
>   User user = userDao.load(getVisit().getUserId());
>   auditDao.audit(AuditType.LOGOFF, user);
> 
>   String startPage = getVisit().getStartPage();
>   Session session = request.getSession(false);
>   
>   componentResources.discardPersistentFieldChanges();
>   
>   if (null != session)
>   session.invalidate();
>   try {
>   return new URL(startPage);
>   } catch (MalformedURLException e) {
>   return null;
>   }
>   }
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5-5.0.18--java.lang.IllegalStateException%3A-Cannot-create-a-session-after-the-response-has-been-committed-tp22369307p22369465.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



Tapestry JSONObject : no 'function' type, any workaround ?

2009-03-06 Thread Francois Armand

Hello,

The JSONObject type doesn't have a "javascript" type that would allows 
to produce unquoted string value.
I'm aware of the https://issues.apache.org/jira/browse/TAP5-39 issue, so 
my question is : anybody knows a good workaround for that ?


Tanks,

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

Open Source identities management and federation


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



Re: Tapestry way for email-templates

2009-03-06 Thread Sven Homburg
try http://www.chenillekit.org/chenillekit-template/index.html

2009/3/6 manuel aldana 

> Don't get this. So I can't use T5 templateAPI inside my tapestry 5 app.
>
> Angelo Chen schrieb:
>
>> Hi Howard,
>>
>> I like that template API, currently I use Velocity, however T5's
>> templateAPI
>> can't be part of T5 app, would be great if can be part of T5 app like
>> Velocity.
>>
>> Angelo
>>
>>
>> Howard Lewis Ship wrote:
>>
>>
>>> http://tapestry.formos.com/nightly/tapestry-templating/
>>>
>>> On Thu, Mar 5, 2009 at 4:03 PM, manuel aldana  wrote:
>>>
>>>
 Hi,

 for sending out emails I need templates. Is there an internal tapestry
 way
 to solve this (currently .tml are bound to pages/components). Is there a
 .tml way to use templates outside of components and pages or do I need
 to
 resort to something like Velocity  or Freemarker?

 thanks.

 --
 manuel aldana
 ald...@gmx.de
 software-engineering blog: http://www.aldana-online.de


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




>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator Apache Tapestry and Apache HiveMind
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> manuel aldana
> ald...@gmx.de
> software-engineering blog: http://www.aldana-online.de
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
with regards
Sven Homburg
http://www.chenillekit.org
http://tapestry5-components.googlecode.com


Re: Tapestry way for email-templates

2009-03-06 Thread manuel aldana

Don't get this. So I can't use T5 templateAPI inside my tapestry 5 app.

Angelo Chen schrieb:

Hi Howard,

I like that template API, currently I use Velocity, however T5's templateAPI
can't be part of T5 app, would be great if can be part of T5 app like
Velocity.

Angelo


Howard Lewis Ship wrote:
  

http://tapestry.formos.com/nightly/tapestry-templating/

On Thu, Mar 5, 2009 at 4:03 PM, manuel aldana  wrote:


Hi,

for sending out emails I need templates. Is there an internal tapestry
way
to solve this (currently .tml are bound to pages/components). Is there a
.tml way to use templates outside of components and pages or do I need to
resort to something like Velocity  or Freemarker?

thanks.

--
manuel aldana
ald...@gmx.de
software-engineering blog: http://www.aldana-online.de


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


  


--
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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






  



--
manuel aldana
ald...@gmx.de
software-engineering blog: http://www.aldana-online.de


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



Re: Tapestry way for email-templates

2009-03-06 Thread Angelo Chen

Hi Howard,

I like that template API, currently I use Velocity, however T5's templateAPI
can't be part of T5 app, would be great if can be part of T5 app like
Velocity.

Angelo


Howard Lewis Ship wrote:
> 
> http://tapestry.formos.com/nightly/tapestry-templating/
> 
> On Thu, Mar 5, 2009 at 4:03 PM, manuel aldana  wrote:
>> Hi,
>>
>> for sending out emails I need templates. Is there an internal tapestry
>> way
>> to solve this (currently .tml are bound to pages/components). Is there a
>> .tml way to use templates outside of components and pages or do I need to
>> resort to something like Velocity  or Freemarker?
>>
>> thanks.
>>
>> --
>> manuel aldana
>> ald...@gmx.de
>> software-engineering blog: http://www.aldana-online.de
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator Apache Tapestry and Apache HiveMind
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tapestry-way-for-email-templates-tp22363660p22369256.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



[T5 5.0.18] java.lang.IllegalStateException: Cannot create a session after the response has been committed

2009-03-06 Thread Harald Geritzer


hi all,

the following code causes IllegalStateExceptions on tomcat 6 while using jetty it works without 
errors. any idea?


public URL onActionFromLinkLogoff() {
User user = userDao.load(getVisit().getUserId());
auditDao.audit(AuditType.LOGOFF, user);

String startPage = getVisit().getStartPage();
Session session = request.getSession(false);

componentResources.discardPersistentFieldChanges();

if (null != session)
session.invalidate();
try {
return new URL(startPage);
} catch (MalformedURLException e) {
return null;
}
}

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



Why t5 ioc module 'id' was removed?

2009-03-06 Thread 丁振波
In t5's former version, module has a id like hivemind does, using format 
like below


-
package org.example.myapp.services;

import org.apache.tapestry.ioc.annotations.Id;

@Id("myapp")
public class MyAppModule
{
 public static Indexer buildIndexer()
  {
   return new IndexerImpl();
  }
}

Inject("service:myapp.Indexer")
private Indexer   indexer;

-

Why the feature was removed? are there any reasons? 



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