Question about Tapestry 5.0

2006-11-07 Thread Vinicius Carvalho

Hello there! It's been a while since my last post, I tried to catch up, but
after reading over 500 topics I gave up ;). I was checking Tapestry 5 site
(Wow it changed so much that I could not even recognize it as Tapestry ;) ).

One thing that intrigues me is the use of DOM from the MarkupWriter.
Wouldn't it degrade performance?

Regards

--
IBM Certified SOA Solution Designer
IBM Certified Database Associate - DB2 V8.1 Family
Sun Certified Enterprise Architect (Part I)


Re: Contrib:Table pagination and validation issue

2006-10-05 Thread Vinicius Carvalho

I tried that, I'm pretty sure I missed something, but it did not work
for a reason (at least I believe that) my ImageSubmit buttons where
located around the register form. Even using Javascript
(document.forms['tableForm'].submit()) for some reason, some methods
like the remove all (its a table with checkboxes) did not update the
rows of the table, not marking the boolean property of the rows.
Gotta check that again someday :)

On 10/5/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

Why don't you just have a separate form wrapping your table ? Seems like the
easiest solution to me. Maybe I've missed something though.

On 10/5/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> Hi there Jesse! It's a master detail page: So I have a form to
> register/update Seminars, and a Table with all the Seminars registred
> so far.
> As any form, it has validation on many fields. So, when I get a
> pagination, and the user clicks on the navigation, the page renders
> with errors from the validators.
> I understand (or at least I believe I did) the reason for the submit,
> once it submit the form, the values are preserved through navigation.
> What I was expecting is that inside the table component it would clear
> my delegate from any errors so no errors should be presented since I'm
> not trying to persist my Entity...
> I solved this on the onchage of the PropertySelection for instance, by
> adding a few lines to my onRefresh method:
> getDelegate().clear(); :D
>
> For this issue with the Table component I removed every validator
> bound to my form, and used manual validation on my listener:
>
> public void onSave(){
> validate(getDelegate());
> }
>
> private void validate(ValidationDelegate delegate){
> //validate fields, and record errors on the delegate object
> }
>
> But would be real nice If the table component had a property like:
> skipValidation="true/false" and if possible, somehow clear the
> delegate / skip validation.
>
> Anyway I've solved the issue no problems, thanks once again for all
> support. I hope this demonstrates my scenario.
>
> Regards
> On 10/2/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > I'm not sure what the original problem was now.
> >
> > Can you show a clear example of what you expect vs what is happening?
> >
> > On 10/2/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > >
> > > Still stuck on this, I'm moving to the coding each validator on hand,
> > > dumping the automatic validation. I'm just sad, cuz my form has a lot
> > > of validators, and It's taking quite some time, I wish it had a better
> > > way...
> > >
> > > Regards
> > >
> > > On 9/29/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > > > I belive this is the reason for the problem:
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > 
> > > > 
> > > >
> > > > 
> > > > some checkboxes nested inside
> > > > 
> > > >
> > > > 
> > > >
> > > > problem is, when I click on the imagesubmit it submits the first
> form,
> > > > tried to override it by using a javascript onclick =
> > > > "document.forms['tableForm'].submit()"
> > > >
> > > > but it seems to have no effect at all :(
> > > >
> > > > Any help would be real nice :)
> > > >
> > > > Regards
> > > >
> > > > On 9/29/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > > > > Jesse I tried this, but I'm stuck in something Im sure its a dumb
> > > > > mistake from my self. Having two forms, now, the checkbox I have
> on
> > > > > the table does not updates the object field as it did before when
> the
> > > > > table was nested inside the same form as the detail form...
> > > > >
> > > > > Any hints?
> > > > >
> > > > > Regards
> > > > >
> > > > > On 9/28/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > > > > > Why don't you just separate the table from your other form and
> have
> > > two
> > > > > > forms instead? Most of the form based functionality of the table
> is
> > > best
> > > > > > realized when doing things like providing a "search" component
> or
> > > nesting
> > > > > > form fields within table columns. (Like checkboxes 

Re: Contrib:Table pagination and validation issue

2006-10-05 Thread Vinicius Carvalho

Hi there Jesse! It's a master detail page: So I have a form to
register/update Seminars, and a Table with all the Seminars registred
so far.
As any form, it has validation on many fields. So, when I get a
pagination, and the user clicks on the navigation, the page renders
with errors from the validators.
I understand (or at least I believe I did) the reason for the submit,
once it submit the form, the values are preserved through navigation.
What I was expecting is that inside the table component it would clear
my delegate from any errors so no errors should be presented since I'm
not trying to persist my Entity...
I solved this on the onchage of the PropertySelection for instance, by
adding a few lines to my onRefresh method:
getDelegate().clear(); :D

For this issue with the Table component I removed every validator
bound to my form, and used manual validation on my listener:

public void onSave(){
validate(getDelegate());
}

private void validate(ValidationDelegate delegate){
//validate fields, and record errors on the delegate object
}

But would be real nice If the table component had a property like:
skipValidation="true/false" and if possible, somehow clear the
delegate / skip validation.

Anyway I've solved the issue no problems, thanks once again for all
support. I hope this demonstrates my scenario.

Regards
On 10/2/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

I'm not sure what the original problem was now.

Can you show a clear example of what you expect vs what is happening?

On 10/2/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> Still stuck on this, I'm moving to the coding each validator on hand,
> dumping the automatic validation. I'm just sad, cuz my form has a lot
> of validators, and It's taking quite some time, I wish it had a better
> way...
>
> Regards
>
> On 9/29/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > I belive this is the reason for the problem:
> >
> > 
> >
> > 
> >
> > 
> > 
> >
> > 
> > some checkboxes nested inside
> > 
> >
> > 
> >
> > problem is, when I click on the imagesubmit it submits the first form,
> > tried to override it by using a javascript onclick =
> > "document.forms['tableForm'].submit()"
> >
> > but it seems to have no effect at all :(
> >
> > Any help would be real nice :)
> >
> > Regards
> >
> > On 9/29/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > > Jesse I tried this, but I'm stuck in something Im sure its a dumb
> > > mistake from my self. Having two forms, now, the checkbox I have on
> > > the table does not updates the object field as it did before when the
> > > table was nested inside the same form as the detail form...
> > >
> > > Any hints?
> > >
> > > Regards
> > >
> > > On 9/28/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > > > Why don't you just separate the table from your other form and have
> two
> > > > forms instead? Most of the form based functionality of the table is
> best
> > > > realized when doing things like providing a "search" component or
> nesting
> > > > form fields within table columns. (Like checkboxes ..etc...Soon to
> be
> > > > InlineEditBox s as well )
> > > >
> > > > On 9/28/06, andyhot <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Vinicius Carvalho wrote:
> > > > > > ouch... I guess I'll have to dump my validators ... and validate
> each
> > > > > > input on the save button, those side effects are too dangerous
> for my
> > > > > > screen.
> > > > >
> > > > > It's not as bad as it sounds. That's how Tap3 worked.
> > > > > It simply made sure that on rewind you'd iterate over the same
> elements
> > > > > you had during render - it would throw stale link exception
> otherwise.
> > > > >
> > > > > So, if that's never happens in your case, go ahead and try it.
> > > > >
> > > > > >
> > > > > > :(
> > > > > >
> > > > > > Regards
> > > > > >
> > > > > > On 9/28/06, andyhot <[EMAIL PROTECTED]> wrote:
> > > > > >> Vinicius Carvalho wrote:
> > > > > >> > onrefresh did not work... :( I've noticed that the links
> points to a
> > > > > >> > Tapestry javascript function: Tapestry.submitform.

Yet another contrib:table question

2006-10-03 Thread Vinicius Carvalho

Hello there, Sorry for another question regarding table...
I have a master detail page (damn all my pages are master detail :P ) It has
a propertyselection which has all the Seminars. Selecting one, it displays
in a table the user list, and there's a form to add users to that specific
Seminar (hope I made my self clear).

Everything was ok, untill pagination happens, when moving from one page to
the other, the selected Seminar was changed (ok expected), So I defined the
Seminar to be a persistent property. Problem solved.

Now, what's odd:

User selects the Seminar3 for example, navigates to the , lets say, 3rd page
on the table, then, user selects the Seminar2, the user is presented with
the 3rd page of the table from the users of the Seminar3. I haven't event
tested with a Seminar with no users at all.

Why is this happening? Is it possible to reset the Table Persistence
mechanism or something like this?

Best Regards


Re: Contrib:Table pagesClass not working

2006-10-02 Thread Vinicius Carvalho

Just adding, I'm moving the tablePages to the bottom. I've seen that is
possible to modify the arrow asset, what If I just want a previous/next
links, no pages, or first/last? is it possible?

Regards

On 10/2/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:


Really did not work for me, what i did was split it into
tableview/columns/rows/values/pages and inside the 

Regards

On 10/2/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> It's working for me.
>
> Here's my html:
>
> 
> 
> 
> Inv Num
> ...snip...
> 
> 
> 123
> ...snip...
> 
> 
> 
>
> Here's my jwc:
>
> 
> 
> 
> 
> 
> ...snip...
> 
>
> And my css:
>
> #edisTable .pager {
> display: block;
> text-align: center;
> margin-bottom: .25em;
> }
> #edisTable .pager b, #edisTable .pager a {
> margin-left: .10em;
> margin-right: .10em;
> }
>
>
> -Original Message-
> From: Andreas Andreou [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 02, 2006 11:52 AM
> To: Tapestry users
> Subject: Re: Contrib:Table pagesClass not working
>
> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/s
> rc/java/org/apache/tapestry/contrib/table/components/Table.jwc?view=mark
> up
>
> 
>  parameter-name="pagesDisplayed"/>
>  parameter-name="pagesClass"/>
> 
>
>
>
>
> Vinicius Carvalho wrote:
> > Hello there! I'm defening a pagesClass parameter on my table
> > component, but
> > its not working. I've searched the source and did not see any
> > reference to
> > it on the parameter, only in the jwc, no reference at the componente
> java
> > source or the template...
> > Anyone else having the same issue?
> >
> > Regards
> >
>
> --
> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> -
> 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: Contrib:Table pagesClass not working

2006-10-02 Thread Vinicius Carvalho

Really did not work for me, what i did was split it into
tableview/columns/rows/values/pages and inside the 

Regards

On 10/2/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


It's working for me.

Here's my html:




Inv Num
...snip...


123
...snip...




Here's my jwc:






...snip...


And my css:

#edisTable .pager {
display: block;
text-align: center;
margin-bottom: .25em;
}
#edisTable .pager b, #edisTable .pager a {
margin-left: .10em;
margin-right: .10em;
}


-Original Message-
From: Andreas Andreou [mailto:[EMAIL PROTECTED]
Sent: Monday, October 02, 2006 11:52 AM
To: Tapestry users
Subject: Re: Contrib:Table pagesClass not working

http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/s
rc/java/org/apache/tapestry/contrib/table/components/Table.jwc?view=mark
up



    
    




Vinicius Carvalho wrote:
> Hello there! I'm defening a pagesClass parameter on my table
> component, but
> its not working. I've searched the source and did not see any
> reference to
> it on the parameter, only in the jwc, no reference at the componente
java
> source or the template...
> Anyone else having the same issue?
>
> Regards
>

--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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




Contrib:Table pagesClass not working

2006-10-02 Thread Vinicius Carvalho

Hello there! I'm defening a pagesClass parameter on my table component, but
its not working. I've searched the source and did not see any reference to
it on the parameter, only in the jwc, no reference at the componente java
source or the template...
Anyone else having the same issue?

Regards


Re: Validation question

2006-10-02 Thread Vinicius Carvalho

Never mind, I'm using commons-validator for that. I really would like
to see a way of bypassing validation on the table component
navigation, clearing the delegate for the form after the component
finish rendering??? I wonder if it is a validation request for a JIRA
enhancement?

Regards

On 10/2/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:

Hello there! I need to validate my fields by hand (table component
navigation issues :) )

I'd like to know if its possible to use the validators on my listener
instead of binding them? If so, how?

For instance:

IFormComponent name = (IFormComponent)getComponent("name");
//validate the name using required + maxlength ...

How can I accomplish this? Also, I need to record the errors to my delegate

Best Regards

--
IBM Certified SOA Solution Designer




--
IBM Certified SOA Solution Designer

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



Validation question

2006-10-02 Thread Vinicius Carvalho

Hello there! I need to validate my fields by hand (table component
navigation issues :) )

I'd like to know if its possible to use the validators on my listener
instead of binding them? If so, how?

For instance:

IFormComponent name = (IFormComponent)getComponent("name");
//validate the name using required + maxlength ...

How can I accomplish this? Also, I need to record the errors to my delegate

Best Regards

--
IBM Certified SOA Solution Designer

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



Re: Contrib:Table pagination and validation issue

2006-10-02 Thread Vinicius Carvalho

Still stuck on this, I'm moving to the coding each validator on hand,
dumping the automatic validation. I'm just sad, cuz my form has a lot
of validators, and It's taking quite some time, I wish it had a better
way...

Regards

On 9/29/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:

I belive this is the reason for the problem:









some checkboxes nested inside




problem is, when I click on the imagesubmit it submits the first form,
tried to override it by using a javascript onclick =
"document.forms['tableForm'].submit()"

but it seems to have no effect at all :(

Any help would be real nice :)

Regards

On 9/29/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> Jesse I tried this, but I'm stuck in something Im sure its a dumb
> mistake from my self. Having two forms, now, the checkbox I have on
> the table does not updates the object field as it did before when the
> table was nested inside the same form as the detail form...
>
> Any hints?
>
> Regards
>
> On 9/28/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > Why don't you just separate the table from your other form and have two
> > forms instead? Most of the form based functionality of the table is best
> > realized when doing things like providing a "search" component or nesting
> > form fields within table columns. (Like checkboxes ..etc...Soon to be
> > InlineEditBox s as well )
> >
> > On 9/28/06, andyhot <[EMAIL PROTECTED]> wrote:
> > >
> > > Vinicius Carvalho wrote:
> > > > ouch... I guess I'll have to dump my validators ... and validate each
> > > > input on the save button, those side effects are too dangerous for my
> > > > screen.
> > >
> > > It's not as bad as it sounds. That's how Tap3 worked.
> > > It simply made sure that on rewind you'd iterate over the same elements
> > > you had during render - it would throw stale link exception otherwise.
> > >
> > > So, if that's never happens in your case, go ahead and try it.
> > >
> > > >
> > > > :(
> > > >
> > > > Regards
> > > >
> > > > On 9/28/06, andyhot <[EMAIL PROTECTED]> wrote:
> > > >> Vinicius Carvalho wrote:
> > > >> > onrefresh did not work... :( I've noticed that the links points to a
> > > >> > Tapestry javascript function: Tapestry.submitform. Just one question,
> > > >> > why pagination invokes a form submission?
> > > >>
> > > >> cause otherwise you would lose the updated inputs. This was the
> > > original
> > > >> idea,
> > > >> before refresh or cancel listeners existed.
> > > >>
> > > >> You can try setting volatile="true" in your form. This is :
> > > >> "Only active in a form. Determines whether to avoid creating hidden
> > > >> fields within a form.
> > > >> Using this parameter may make the form structure different during
> > > render
> > > >> and rewind,
> > > >> and cause exceptions as a result. Please use with caution."
> > > >>
> > > >> As a sideffect, it forces normal links to be displayed (instead of form
> > > >> submiting ones)
> > > >>
> > > >> > Any ideas on how to clear the delegate messages?
> > > >> >
> > > >> > Regards
> > > >> >
> > > >> > On 9/28/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > > >> >> Hello there! When using the pagination of the contrib:table that is
> > > >> >> inside a form it is displaying errors of my validation delegate
> > > >> (since
> > > >> >> the form fields are blank). I override this with the property
> > > >> >> selection using a onRefresh method, does it work for contrib as
> > > well?
> > > >> >>
> > > >> >> Regards
> > > >> >>
> > > >> >> --
> > > >> >> IBM Certified SOA Solution Designer
> > > >> >>
> > > >> >
> > > >> >
> > > >>
> > > >>
> > > >> --
> > > >> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> > > >> Tapestry / Tacos developer
> > > >> Open Source / J2EE Consulting
> > > >>
> > > >>
> > > >> -
> > > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> > > --
> > > Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> > > Tapestry / Tacos developer
> > > Open Source / J2EE Consulting
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
>
>
> --
> IBM Certified SOA Solution Designer
>


--
IBM Certified SOA Solution Designer




--
IBM Certified SOA Solution Designer

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



Re: Contrib:Table pagination and validation issue

2006-09-29 Thread Vinicius Carvalho

I belive this is the reason for the problem:









some checkboxes nested inside




problem is, when I click on the imagesubmit it submits the first form,
tried to override it by using a javascript onclick =
"document.forms['tableForm'].submit()"

but it seems to have no effect at all :(

Any help would be real nice :)

Regards

On 9/29/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:

Jesse I tried this, but I'm stuck in something Im sure its a dumb
mistake from my self. Having two forms, now, the checkbox I have on
the table does not updates the object field as it did before when the
table was nested inside the same form as the detail form...

Any hints?

Regards

On 9/28/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> Why don't you just separate the table from your other form and have two
> forms instead? Most of the form based functionality of the table is best
> realized when doing things like providing a "search" component or nesting
> form fields within table columns. (Like checkboxes ..etc...Soon to be
> InlineEditBox s as well )
>
> On 9/28/06, andyhot <[EMAIL PROTECTED]> wrote:
> >
> > Vinicius Carvalho wrote:
> > > ouch... I guess I'll have to dump my validators ... and validate each
> > > input on the save button, those side effects are too dangerous for my
> > > screen.
> >
> > It's not as bad as it sounds. That's how Tap3 worked.
> > It simply made sure that on rewind you'd iterate over the same elements
> > you had during render - it would throw stale link exception otherwise.
> >
> > So, if that's never happens in your case, go ahead and try it.
> >
> > >
> > > :(
> > >
> > > Regards
> > >
> > > On 9/28/06, andyhot <[EMAIL PROTECTED]> wrote:
> > >> Vinicius Carvalho wrote:
> > >> > onrefresh did not work... :( I've noticed that the links points to a
> > >> > Tapestry javascript function: Tapestry.submitform. Just one question,
> > >> > why pagination invokes a form submission?
> > >>
> > >> cause otherwise you would lose the updated inputs. This was the
> > original
> > >> idea,
> > >> before refresh or cancel listeners existed.
> > >>
> > >> You can try setting volatile="true" in your form. This is :
> > >> "Only active in a form. Determines whether to avoid creating hidden
> > >> fields within a form.
> > >> Using this parameter may make the form structure different during
> > render
> > >> and rewind,
> > >> and cause exceptions as a result. Please use with caution."
> > >>
> > >> As a sideffect, it forces normal links to be displayed (instead of form
> > >> submiting ones)
> > >>
> > >> > Any ideas on how to clear the delegate messages?
> > >> >
> > >> > Regards
> > >> >
> > >> > On 9/28/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > >> >> Hello there! When using the pagination of the contrib:table that is
> > >> >> inside a form it is displaying errors of my validation delegate
> > >> (since
> > >> >> the form fields are blank). I override this with the property
> > >> >> selection using a onRefresh method, does it work for contrib as
> > well?
> > >> >>
> > >> >> Regards
> > >> >>
> > >> >> --
> > >> >> IBM Certified SOA Solution Designer
> > >> >>
> > >> >
> > >> >
> > >>
> > >>
> > >> --
> > >> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> > >> Tapestry / Tacos developer
> > >> Open Source / J2EE Consulting
> > >>
> > >>
> > >> -
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >>
> > >
> > >
> >
> >
> > --
> > Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> > Tapestry / Tacos developer
> > Open Source / J2EE Consulting
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>


--
IBM Certified SOA Solution Designer




--
IBM Certified SOA Solution Designer

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



Re: Contrib:Table pagination and validation issue

2006-09-29 Thread Vinicius Carvalho

Jesse I tried this, but I'm stuck in something Im sure its a dumb
mistake from my self. Having two forms, now, the checkbox I have on
the table does not updates the object field as it did before when the
table was nested inside the same form as the detail form...

Any hints?

Regards

On 9/28/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

Why don't you just separate the table from your other form and have two
forms instead? Most of the form based functionality of the table is best
realized when doing things like providing a "search" component or nesting
form fields within table columns. (Like checkboxes ..etc...Soon to be
InlineEditBox s as well )

On 9/28/06, andyhot <[EMAIL PROTECTED]> wrote:
>
> Vinicius Carvalho wrote:
> > ouch... I guess I'll have to dump my validators ... and validate each
> > input on the save button, those side effects are too dangerous for my
> > screen.
>
> It's not as bad as it sounds. That's how Tap3 worked.
> It simply made sure that on rewind you'd iterate over the same elements
> you had during render - it would throw stale link exception otherwise.
>
> So, if that's never happens in your case, go ahead and try it.
>
> >
> > :(
> >
> > Regards
> >
> > On 9/28/06, andyhot <[EMAIL PROTECTED]> wrote:
> >> Vinicius Carvalho wrote:
> >> > onrefresh did not work... :( I've noticed that the links points to a
> >> > Tapestry javascript function: Tapestry.submitform. Just one question,
> >> > why pagination invokes a form submission?
> >>
> >> cause otherwise you would lose the updated inputs. This was the
> original
> >> idea,
> >> before refresh or cancel listeners existed.
> >>
> >> You can try setting volatile="true" in your form. This is :
> >> "Only active in a form. Determines whether to avoid creating hidden
> >> fields within a form.
> >> Using this parameter may make the form structure different during
> render
> >> and rewind,
> >> and cause exceptions as a result. Please use with caution."
> >>
> >> As a sideffect, it forces normal links to be displayed (instead of form
> >> submiting ones)
> >>
> >> > Any ideas on how to clear the delegate messages?
> >> >
> >> > Regards
> >> >
> >> > On 9/28/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> >> >> Hello there! When using the pagination of the contrib:table that is
> >> >> inside a form it is displaying errors of my validation delegate
> >> (since
> >> >> the form fields are blank). I override this with the property
> >> >> selection using a onRefresh method, does it work for contrib as
> well?
> >> >>
> >> >> Regards
> >> >>
> >> >> --
> >> >> IBM Certified SOA Solution Designer
> >> >>
> >> >
> >> >
> >>
> >>
> >> --
> >> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> >> Tapestry / Tacos developer
> >> Open Source / J2EE Consulting
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
>
>
> --
> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com





--
IBM Certified SOA Solution Designer

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



Re: Contrib:Table pagination and validation issue

2006-09-28 Thread Vinicius Carvalho

ouch... I guess I'll have to dump my validators ... and validate each
input on the save button, those side effects are too dangerous for my
screen.

:(

Regards

On 9/28/06, andyhot <[EMAIL PROTECTED]> wrote:

Vinicius Carvalho wrote:
> onrefresh did not work... :( I've noticed that the links points to a
> Tapestry javascript function: Tapestry.submitform. Just one question,
> why pagination invokes a form submission?

cause otherwise you would lose the updated inputs. This was the original
idea,
before refresh or cancel listeners existed.

You can try setting volatile="true" in your form. This is :
"Only active in a form. Determines whether to avoid creating hidden
fields within a form.
Using this parameter may make the form structure different during render
and rewind,
and cause exceptions as a result. Please use with caution."

As a sideffect, it forces normal links to be displayed (instead of form
submiting ones)

> Any ideas on how to clear the delegate messages?
>
> Regards
>
> On 9/28/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>> Hello there! When using the pagination of the contrib:table that is
>> inside a form it is displaying errors of my validation delegate (since
>> the form fields are blank). I override this with the property
>> selection using a onRefresh method, does it work for contrib as well?
>>
>> Regards
>>
>> --
>> IBM Certified SOA Solution Designer
>>
>
>


--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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





--
IBM Certified SOA Solution Designer

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



Re: Contrib:Table pagination and validation issue

2006-09-28 Thread Vinicius Carvalho

onrefresh did not work... :( I've noticed that the links points to a
Tapestry javascript function: Tapestry.submitform. Just one question,
why pagination invokes a form submission?
Any ideas on how to clear the delegate messages?

Regards

On 9/28/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:

Hello there! When using the pagination of the contrib:table that is
inside a form it is displaying errors of my validation delegate (since
the form fields are blank). I override this with the property
selection using a onRefresh method, does it work for contrib as well?

Regards

--
IBM Certified SOA Solution Designer




--
IBM Certified SOA Solution Designer

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



Contrib:Table pagination and validation issue

2006-09-28 Thread Vinicius Carvalho

Hello there! When using the pagination of the contrib:table that is
inside a form it is displaying errors of my validation delegate (since
the form fields are blank). I override this with the property
selection using a onRefresh method, does it work for contrib as well?

Regards

--
IBM Certified SOA Solution Designer

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



Re: [OT] Problems with xmlhttprequest and proxy servers

2006-09-13 Thread Vinicius Carvalho

Thanks Jesse, :) For this project we are not using dojo (yet) but we
will for the upcoming projects. What did solve my problem was:

req.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" );

I know this is very fragile, but we are in a rush here, tomorrow, we
have a presentation with some big shots to present the application.

I found: 
http://en.wikipedia.org/wiki/XMLHttpRequest#Microsoft_Internet_Explorer_cache_issues

which do explain a lot about it.

It's funny, back in 1997, when I was a ColdFusion developer, I always
need to worry with netscape 3.0, because IE 4.0 always parsed
everything (for good or bad).  Today, its totally the opposite

Regards

On 9/13/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

This is the annoying IE bug. Even with the best cache breaking strategies
setup you won't be able to fix it unless you make the urls being used
unique. With dojo all you have to do is set preventCache:true in the
dojo.io.bind calls.

On 9/13/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> Sorry about the OT, but since we have some masters of Ajax/JS here,
> I'm giving a shot.
>
> Today we experienced problems with our chat application. When running
> in clients that pass though a proxy, and use IE (this does not happens
> to Mozzila browsers). The user receives only the same message, and
> loops through it. What really happens is that the request never made
> to the server, so the user get the same message over and over.
>
> To try to bypass it. I've add the following to the function that polls
> the server:
>
> http_request.setRequestHeader("Cache-Control","no-store, no-cache,
> must-revalidate");
> http_request.setRequestHeader("Cache-Control","post-check=0,
> pre-check=0");
> http_request.setRequestHeader("Pragma", "no-cache");
>
> But the errors keep happening.
>
> Does anyone has any idea on how can I solve this?
>
> Regards
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com





--
Oracle AS is the worst application server in the world. Avoid it at
all cost. You always have alternatives:
Jboss, Websphere, BEA, Geronimo, Jonas, anything is better than that.

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



Re: [OT] Problems with xmlhttprequest and proxy servers

2006-09-13 Thread Vinicius Carvalho

BTW I'm also adding those headers on the servlet that pull the
messages and render it back to the user.

Regards

On 9/13/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:

Sorry about the OT, but since we have some masters of Ajax/JS here,
I'm giving a shot.

Today we experienced problems with our chat application. When running
in clients that pass though a proxy, and use IE (this does not happens
to Mozzila browsers). The user receives only the same message, and
loops through it. What really happens is that the request never made
to the server, so the user get the same message over and over.

To try to bypass it. I've add the following to the function that polls
the server:

http_request.setRequestHeader("Cache-Control","no-store, no-cache,
must-revalidate");
http_request.setRequestHeader("Cache-Control","post-check=0, pre-check=0");
http_request.setRequestHeader("Pragma", "no-cache");

But the errors keep happening.

Does anyone has any idea on how can I solve this?

Regards




--
Oracle AS is the worst application server in the world. Avoid it at
all cost. You always have alternatives:
Jboss, Websphere, BEA, Geronimo, Jonas, anything is better than that.

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



[OT] Problems with xmlhttprequest and proxy servers

2006-09-13 Thread Vinicius Carvalho

Sorry about the OT, but since we have some masters of Ajax/JS here,
I'm giving a shot.

Today we experienced problems with our chat application. When running
in clients that pass though a proxy, and use IE (this does not happens
to Mozzila browsers). The user receives only the same message, and
loops through it. What really happens is that the request never made
to the server, so the user get the same message over and over.

To try to bypass it. I've add the following to the function that polls
the server:

http_request.setRequestHeader("Cache-Control","no-store, no-cache,
must-revalidate");
http_request.setRequestHeader("Cache-Control","post-check=0, pre-check=0");
http_request.setRequestHeader("Pragma", "no-cache");

But the errors keep happening.

Does anyone has any idea on how can I solve this?

Regards

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



Re: Asynchronous form submission

2006-09-12 Thread Vinicius Carvalho

Forget about debug, sorry, just saw the browserLogLevel option :P



On 9/12/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:

Jesse, I've enable debug but it is only working when something bad happens.
The last system I've developed (the chat application) I was using
ajax, but bare, on the hand dealing with all dom elements. Is it
possible to do so? I guess that's what I was asking in another thread,
about having other functions called after the response from the
server.

I'll keep looking for more tracing on this :) Thanks again folks

Regards

On 9/12/06, Denis Souza <[EMAIL PROTECTED]> wrote:
> I guess you can always refresh the entire table. I do it in one of my pages
> and it works pretty well. The downside is that on a really large table it
> would defeat part of the purpose of using ajax in the first place since it
> wouldn't be so efficient.
>
> -Original Message-
> From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
> Sent: terça-feira, 12 de setembro de 2006 13:39
> To: Tapestry users
> Subject: Re: Asynchronous form submission
>
> Does the server return valid html in your areas though? FireBug or tapestry
> browser debug (via Shell) should be able to show you this.
>
> Either way I don't think you can add tr elements like this in IE
> anyways..You'd have to do it through the dom interface.
>
> On 9/12/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> >
> > Hum, thanks Denis, that almos did the trick :)
> >
> > I guess the updateComponent does not work the way I expected, I was
> > misunderstanding it...
> >
> > Here's what's happening using Denis' solution:
> > Let's say the list was empty, so no rows are displayed on the table
> > ok. So the user add a row. Since the @Any is surrounding the 
> > element, it writes the  elements outside the tr, messing the whole
> > document format. So let's say the user leaves the page and comes back.
> > This time, when the for renders, it displays the values (ok expected
> > :) ) but a side effect comes when the user add another value, the
> > whole list is displayed on top of the previous.
> > I guess the whole problem I'm having is that I'm not being able to
> > refresh the for inner elements.
> > I'll keep trying different stuff here and let you know.
> >
> > Thanks for all the support
> >
> > On 9/12/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > > Ahh..Good call..You can also give For the "element" parameter to have it
> > > render itself as an html dom node.
> > >
> > > On 9/12/06, Denis Souza <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I think the problem is the way that the "For" component renders.
> > You're
> > > > trying to update a component named "userList" where:
> > > >
> > > >  > value="ognl:userDetail">
> > > >
> > > >...
> > > >
> > > > 
> > > >
> > > > My guess is the for component is rendering it's body but not it's own
> > tag.
> > > > Usually the component's name is placed on the id property on the
> > > > component's
> > > > tag. When the ajax/js logic runs it looks for a tag which
> > id="userList".
> > > > In
> > > > this case it probably can't find "userList" because it's not there,
> > the
> > > > For
> > > > component didn't render it.
> > > > Try using wrapping another component around it and naming it
> > "userList".
> > > > I guess something like this would work:
> > > >
> > > > 
> > > > > > > element="tr">
> > > >...
> > > >
> > > > 
> > > >
> > > > -Original Message-
> > > > From: Vinicius Carvalho [mailto:[EMAIL PROTECTED]
> > > > Sent: terça-feira, 12 de setembro de 2006 11:42
> > > > To: Tapestry users
> > > > Subject: Re: Asynchronous form submission
> > > >
> > > > Hum, thanks but nope. Didn't work either. I can't get the @For to get
> > > > updated. When I nested it inside an @Any, it almost work :). I mean
> > > > that because it only the last value inserted in the list is returned.
> > > > Even with the list being persisted to the session.
> > > >
> > > > Anyone done this before?
> > > >
> > > >
> 

Re: EventListener: How to send values to the listener :)

2006-09-12 Thread Vinicius Carvalho

Hi there Jesse. Let me post some examples :

There's a form, with some fields (let's say an invoce form). All
fields are marked as read only  but the invoice number.
User enters the invoice number and hits TAB
There's an onchange listener for that component, the listener is
called (so far is everything ok), question is, how do I retreive the
value from the input? If I use getInvoice.getId() inside the listener
it returns null. Would be possible to bind the values from the view to
the model when activating the listener?

2nd. So, I get a response, (filling all the values from the invoice
form). Now a JS function is called so all fields should be not marked
as readonly anymore :)

Was I clear on my state?

Best Regards

Vinicius

On 9/12/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

To answer number 1, I'm not sure...I guess that depends on what you are
trying to send. Since this isn't a direct component used it is harder to
find a good way to provide DirectLink parameters to the listener. If you
have a specific example in mind I can be more helpful.

For number 2, is this something you wanted to invoke globally after all
async calls or only specific to this particular event listener call? It's
very easy to add "things" to be updated to a request from within a listener
method(getResponseBuilder().updateComponent()), but  I want to be sure you
didn't want some sort of client side UI effect for requests instead.

On 9/12/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> Hello there! I've seen examples (and tried it, really cool, I'm still
> amazed, and all my co-workers with your job Jesse) using the
> EventListener. I'd like to know if it is possible to send some values
> to the listener? Also, is there a way, maybe a callback or something,
> to interact within it? I mean, after calling the ajax function that
> sends the values to the server, call a javascript function provided by
> the developer?
>
> Best Regards
>
> Vinicius
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com




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



Re: Asynchronous form submission

2006-09-12 Thread Vinicius Carvalho

Jesse, I've enable debug but it is only working when something bad happens.
The last system I've developed (the chat application) I was using
ajax, but bare, on the hand dealing with all dom elements. Is it
possible to do so? I guess that's what I was asking in another thread,
about having other functions called after the response from the
server.

I'll keep looking for more tracing on this :) Thanks again folks

Regards

On 9/12/06, Denis Souza <[EMAIL PROTECTED]> wrote:

I guess you can always refresh the entire table. I do it in one of my pages
and it works pretty well. The downside is that on a really large table it
would defeat part of the purpose of using ajax in the first place since it
wouldn't be so efficient.

-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
Sent: terça-feira, 12 de setembro de 2006 13:39
To: Tapestry users
Subject: Re: Asynchronous form submission

Does the server return valid html in your areas though? FireBug or tapestry
browser debug (via Shell) should be able to show you this.

Either way I don't think you can add tr elements like this in IE
anyways..You'd have to do it through the dom interface.

On 9/12/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> Hum, thanks Denis, that almos did the trick :)
>
> I guess the updateComponent does not work the way I expected, I was
> misunderstanding it...
>
> Here's what's happening using Denis' solution:
> Let's say the list was empty, so no rows are displayed on the table
> ok. So the user add a row. Since the @Any is surrounding the 
> element, it writes the  elements outside the tr, messing the whole
> document format. So let's say the user leaves the page and comes back.
> This time, when the for renders, it displays the values (ok expected
> :) ) but a side effect comes when the user add another value, the
> whole list is displayed on top of the previous.
> I guess the whole problem I'm having is that I'm not being able to
> refresh the for inner elements.
> I'll keep trying different stuff here and let you know.
>
> Thanks for all the support
>
> On 9/12/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > Ahh..Good call..You can also give For the "element" parameter to have it
> > render itself as an html dom node.
> >
> > On 9/12/06, Denis Souza <[EMAIL PROTECTED]> wrote:
> > >
> > > I think the problem is the way that the "For" component renders.
> You're
> > > trying to update a component named "userList" where:
> > >
> > >  value="ognl:userDetail">
> > >
> > >...
> > >
> > > 
> > >
> > > My guess is the for component is rendering it's body but not it's own
> tag.
> > > Usually the component's name is placed on the id property on the
> > > component's
> > > tag. When the ajax/js logic runs it looks for a tag which
> id="userList".
> > > In
> > > this case it probably can't find "userList" because it's not there,
> the
> > > For
> > > component didn't render it.
> > > Try using wrapping another component around it and naming it
> "userList".
> > > I guess something like this would work:
> > >
> > > 
> > > > > element="tr">
> > >...
> > >
> > > 
> > >
> > > -Original Message-
> > > From: Vinicius Carvalho [mailto:[EMAIL PROTECTED]
> > > Sent: terça-feira, 12 de setembro de 2006 11:42
> > > To: Tapestry users
> > > Subject: Re: Asynchronous form submission
> > >
> > > Hum, thanks but nope. Didn't work either. I can't get the @For to get
> > > updated. When I nested it inside an @Any, it almost work :). I mean
> > > that because it only the last value inserted in the list is returned.
> > > Even with the list being persisted to the session.
> > >
> > > Anyone done this before?
> > >
> > >
> > > Regards
> > >
> > > On 9/12/06, Chaitanya Jeerage <[EMAIL PROTECTED]> wrote:
> > > > not sure if the same applies to 4.1, but using "action" instead of
> > > > "listener" in your form submit should solve the problem of list not
> > > > being populated
> > > >
> > > > action="listener:formSubmit"
> > > >
> > > > instead of
> > > >
> > > > listener="listener:formSubmit"
> > > >
> > > &g

Re: Asynchronous form submission

2006-09-12 Thread Vinicius Carvalho

Hum, thanks Denis, that almos did the trick :)

I guess the updateComponent does not work the way I expected, I was
misunderstanding it...

Here's what's happening using Denis' solution:
Let's say the list was empty, so no rows are displayed on the table
ok. So the user add a row. Since the @Any is surrounding the 
element, it writes the  elements outside the tr, messing the whole
document format. So let's say the user leaves the page and comes back.
This time, when the for renders, it displays the values (ok expected
:) ) but a side effect comes when the user add another value, the
whole list is displayed on top of the previous.
I guess the whole problem I'm having is that I'm not being able to
refresh the for inner elements.
I'll keep trying different stuff here and let you know.

Thanks for all the support

On 9/12/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

Ahh..Good call..You can also give For the "element" parameter to have it
render itself as an html dom node.

On 9/12/06, Denis Souza <[EMAIL PROTECTED]> wrote:
>
> I think the problem is the way that the "For" component renders. You're
> trying to update a component named "userList" where:
>
> 
>
>...
>
> 
>
> My guess is the for component is rendering it's body but not it's own tag.
> Usually the component's name is placed on the id property on the
> component's
> tag. When the ajax/js logic runs it looks for a tag which id="userList".
> In
> this case it probably can't find "userList" because it's not there, the
> For
> component didn't render it.
> Try using wrapping another component around it and naming it "userList".
> I guess something like this would work:
>
> 
> element="tr">
>...
>
> 
>
> -Original Message-
> From: Vinicius Carvalho [mailto:[EMAIL PROTECTED]
> Sent: terça-feira, 12 de setembro de 2006 11:42
> To: Tapestry users
> Subject: Re: Asynchronous form submission
>
> Hum, thanks but nope. Didn't work either. I can't get the @For to get
> updated. When I nested it inside an @Any, it almost work :). I mean
> that because it only the last value inserted in the list is returned.
> Even with the list being persisted to the session.
>
> Anyone done this before?
>
>
> Regards
>
> On 9/12/06, Chaitanya Jeerage <[EMAIL PROTECTED]> wrote:
> > not sure if the same applies to 4.1, but using "action" instead of
> > "listener" in your form submit should solve the problem of list not
> > being populated
> >
> > action="listener:formSubmit"
> >
> > instead of
> >
> > listener="listener:formSubmit"
> >
> > -Chaitanya
> >
> > On 9/12/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > > Well the synchronous submission was fixed after I updated my version
> :P
> But
> > > I still get no updates on my list, event setting it as a persistent
> > > property. I'm adding values, and they are not being updated. As it is
> a
> > > persistent property I was hoping that re-loading the page would set it
> > > values, but they come blank again.
> > >
> > > Any hint?
> > >
> > > Regards
> > >
> > > On 9/11/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi there! I'm trying to get two things to work with Tapestryt 4.1and
> > > > Ajax support:
> > > >
> > > > 1st a master detail form
> > > > 2nd a auto populated form from server (I'll explain it better)
> > > >
> > > >
> > > > The first one is pretty easy, but its reloading the entire page,
> I've
> > > > checked the list and saw some discussions about it, I tried but it
> > > > seems not to be working:
> > > >
> > > >  debugContainerId="dojoDebug"
> > > > title="AjaxForm" disableCaching="true">
> > > > 
> > > >  > > > updateComponents="ognl:{'userList'}">
> > > > 
> > > > 
> > > > Name:
> > > >  jwcid="
> > > > [EMAIL PROTECTED]"
> > > > value="ognl:user.name"/>
> > > > 
> > > > 
> > > > 

Re: Asynchronous form submission

2006-09-12 Thread Vinicius Carvalho

Hum, thanks but nope. Didn't work either. I can't get the @For to get
updated. When I nested it inside an @Any, it almost work :). I mean
that because it only the last value inserted in the list is returned.
Even with the list being persisted to the session.

Anyone done this before?


Regards

On 9/12/06, Chaitanya Jeerage <[EMAIL PROTECTED]> wrote:

not sure if the same applies to 4.1, but using "action" instead of
"listener" in your form submit should solve the problem of list not
being populated

action="listener:formSubmit"

instead of

listener="listener:formSubmit"

-Chaitanya

On 9/12/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> Well the synchronous submission was fixed after I updated my version :P But
> I still get no updates on my list, event setting it as a persistent
> property. I'm adding values, and they are not being updated. As it is a
> persistent property I was hoping that re-loading the page would set it
> values, but they come blank again.
>
> Any hint?
>
> Regards
>
> On 9/11/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> >
> > Hi there! I'm trying to get two things to work with Tapestryt 4.1 and
> > Ajax support:
> >
> > 1st a master detail form
> > 2nd a auto populated form from server (I'll explain it better)
> >
> >
> > The first one is pretty easy, but its reloading the entire page, I've
> > checked the list and saw some discussions about it, I tried but it
> > seems not to be working:
> >
> >  > title="AjaxForm" disableCaching="true">
> > 
> >  > updateComponents="ognl:{'userList'}">
> > 
> > 
> > Name:
> >  > value="ognl:user.name"/>
> > 
> > 
> > Email:
> >  > value="ognl:user.email"/>
> > 
> > 
> > Age:
> >  > value="ognl:user.age
> > "/>

> > 
> >  > listener="listener:formSubmit"/>
> > 
> > 
> > 
> > 
> > 
> >  > style="background-color:aqua">Name
> >  > style="background-color:aqua">Email
> > Age
> > 
> >  > value="ognl:userDetail">
> > 
> >  > style="background-color:aqua"> > value="ognl:userDetail.name"/>
> >  > style="background-color:aqua"> > value="ognl:userDetail.email"/>
> >  > style="background-color:aqua"> > value="ognl:userDetail.age"/>
> > 
> > 
> > 
> > 
> > 
> >
> > public abstract class Home extends BasePage{
> > @InitialValue("new java.util.ArrayList()")
> > public abstract List getUsers();
> > @InitialValue("new com.mgjug.tapestry.model.User()")
> > public abstract User getUser();
> > @InitialValue("new com.mgjug.tapestry.model.User()")
> > public abstract User getUserDetail();
> >
> > public void formSubmit(IRequestCycle cycle){
> > ResponseBuilder builder = cycle.getResponseBuilder();
> > getUsers().add(getUser());
> > }
> >
> > }
> >
> > I'm guessing the problem is withing the submit button that will submit
> > the form, bypassing any javascript.
> >
> > Another question is about the state of my list. Do i need to use a
> > persist model for that? I'm worried about the amount of stuff that
> > will be set on the session, or if not, the number of fetches on th

EventListener: How to send values to the listener :)

2006-09-12 Thread Vinicius Carvalho

Hello there! I've seen examples (and tried it, really cool, I'm still
amazed, and all my co-workers with your job Jesse) using the
EventListener. I'd like to know if it is possible to send some values
to the listener? Also, is there a way, maybe a callback or something,
to interact within it? I mean, after calling the ajax function that
sends the values to the server, call a javascript function provided by
the developer?

Best Regards

Vinicius

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



Re: Asynchronous form submission

2006-09-11 Thread Vinicius Carvalho

Well the synchronous submission was fixed after I updated my version :P But
I still get no updates on my list, event setting it as a persistent
property. I'm adding values, and they are not being updated. As it is a
persistent property I was hoping that re-loading the page would set it
values, but they come blank again.

Any hint?

Regards

On 9/11/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:


Hi there! I'm trying to get two things to work with Tapestryt 4.1 and
Ajax support:

1st a master detail form
2nd a auto populated form from server (I'll explain it better)


The first one is pretty easy, but its reloading the entire page, I've
checked the list and saw some discussions about it, I tried but it
seems not to be working:






Name:



Email:



Age:









Name
Email
Age












public abstract class Home extends BasePage{
@InitialValue("new java.util.ArrayList()")
public abstract List getUsers();
@InitialValue("new com.mgjug.tapestry.model.User()")
public abstract User getUser();
@InitialValue("new com.mgjug.tapestry.model.User()")
public abstract User getUserDetail();

public void formSubmit(IRequestCycle cycle){
ResponseBuilder builder = cycle.getResponseBuilder();
getUsers().add(getUser());
}

}

I'm guessing the problem is withing the submit button that will submit
the form, bypassing any javascript.

Another question is about the state of my list. Do i need to use a
persist model for that? I'm worried about the amount of stuff that
will be set on the session, or if not, the number of fetches on the DB
will be needed ex:
setUsers(dao.getOldValues())
getUsers.add(getUser());

know what I mean?

2nd is pretty much like this one, but I need a form that will have
almost all the fields set to read only. The user enters the id, and
clicks on the TAB button, it will fetch the values from the server and
populate it and setting all the fields back to editable form.

I guess my question here is: how do I interact with local javascript
using @EventListener?

I'm creating examples with those to use at my company, in a Tapestry
4.1 presentation, as soon as I get it done, would be a pleasure to
share with anyone interested.

Regards

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




Asynchronous form submission

2006-09-11 Thread Vinicius Carvalho

Hi there! I'm trying to get two things to work with Tapestryt 4.1 and
Ajax support:

1st a master detail form
2nd a auto populated form from server (I'll explain it better)


The first one is pretty easy, but its reloading the entire page, I've
checked the list and saw some discussions about it, I tried but it
seems not to be working:






Name:



Email:



Age:
  
   




   


Name
Email
Age












public abstract class Home extends BasePage{
@InitialValue("new java.util.ArrayList()")
public abstract List getUsers();
@InitialValue("new com.mgjug.tapestry.model.User()")
public abstract User getUser();
@InitialValue("new com.mgjug.tapestry.model.User()")
public abstract User getUserDetail();

public void formSubmit(IRequestCycle cycle){
ResponseBuilder builder = cycle.getResponseBuilder();
getUsers().add(getUser());
}

}

I'm guessing the problem is withing the submit button that will submit
the form, bypassing any javascript.

Another question is about the state of my list. Do i need to use a
persist model for that? I'm worried about the amount of stuff that
will be set on the session, or if not, the number of fetches on the DB
will be needed ex:
setUsers(dao.getOldValues())
getUsers.add(getUser());

know what I mean?

2nd is pretty much like this one, but I need a form that will have
almost all the fields set to read only. The user enters the id, and
clicks on the TAB button, it will fetch the values from the server and
populate it and setting all the fields back to editable form.

I guess my question here is: how do I interact with local javascript
using @EventListener?

I'm creating examples with those to use at my company, in a Tapestry
4.1 presentation, as soon as I get it done, would be a pleasure to
share with anyone interested.

Regards

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



Re: @EventListener question

2006-09-11 Thread Vinicius Carvalho

Thanks, that was it :D

On 9/11/06, Chaitanya Jeerage <[EMAIL PROTECTED]> wrote:

I have faced problems before while updating components other than div,
may be I was doing something wrong, anyway afaik this should work


   


I think this is what Josh was indicating too.

-Chaitanya


On 9/11/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> Josh, I really can't see how would that work... since I'm using @Any,
> where would the text be rendered? I gave it a try and it is not
> working...
>
> Any other ideas?
>
> Regards
>
> On 9/10/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > Also, just as an FYI a lot of the examples I've been seeing lately include
> > what appears to be a lot of redundant  enclosures around content you
> > want to update.
> >
> > I've worked very hard to make sure the component id logic is universally
> > correct, so you should be able to just reference a particular component
> > directly for updating..
> >
> > The only time you need to enclose something is when it may not actually be
> > rendered yet (and therefore not have any html element to replace on an
> > update)..One example of this is a  type block.
> >
> > On 9/9/06, Josh Long <[EMAIL PROTECTED]> wrote:
> > >
> > > I'm not 100% sure, but try changing div id ="quoteDiv" to  > > jwcid="[EMAIL PROTECTED]"> ...
> > >
> > > That way, builder.updateComponent wil update a tapestry component..
> > >
> > > Peace,
> > > Josh
> > >
> > > On 9/8/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > > > Hello there! Does EventListener + ResponseBuilder supports all
> > > > components? For instance, is it possible to update contents presented
> > > > by a @Insert?
> > > > I was trying a simple quote app and can't get it working:
> > > >
> > > > @EventListener(elements = "fetchQuotes", events="onmouseover")
> > > > public void getQuotes(IRequestCycle cycle){
> > > > ResponseBuilder builder = cycle.getResponseBuilder();
> > > > setQuote(getQuotesFromDB());
> > > > builder.updateComponent("quoteDiv");
> > > >
> > > > }
> > > >
> > > > Mouse
> > > > over here to get more quotes...
> > > >
> > > >  > > > value="ognl:quote">
> > > >
> > > > What's the right way?
> > > >
> > > >
> > > > Regards
> > > >
> > > > -
> > > > 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]
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.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]



Re: @EventListener question

2006-09-11 Thread Vinicius Carvalho

Josh, I really can't see how would that work... since I'm using @Any,
where would the text be rendered? I gave it a try and it is not
working...

Any other ideas?

Regards

On 9/10/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

Also, just as an FYI a lot of the examples I've been seeing lately include
what appears to be a lot of redundant  enclosures around content you
want to update.

I've worked very hard to make sure the component id logic is universally
correct, so you should be able to just reference a particular component
directly for updating..

The only time you need to enclose something is when it may not actually be
rendered yet (and therefore not have any html element to replace on an
update)..One example of this is a  type block.

On 9/9/06, Josh Long <[EMAIL PROTECTED]> wrote:
>
> I'm not 100% sure, but try changing div id ="quoteDiv" to  jwcid="[EMAIL PROTECTED]"> ...
>
> That way, builder.updateComponent wil update a tapestry component..
>
> Peace,
> Josh
>
> On 9/8/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > Hello there! Does EventListener + ResponseBuilder supports all
> > components? For instance, is it possible to update contents presented
> > by a @Insert?
> > I was trying a simple quote app and can't get it working:
> >
> > @EventListener(elements = "fetchQuotes", events="onmouseover")
> > public void getQuotes(IRequestCycle cycle){
> > ResponseBuilder builder = cycle.getResponseBuilder();
> > setQuote(getQuotesFromDB());
> > builder.updateComponent("quoteDiv");
> >
> > }
> >
> > Mouse
> > over here to get more quotes...
> >
> >  > value="ognl:quote">
> >
> > What's the right way?
> >
> >
> > Regards
> >
> > -
> > 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]
>
>


--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com




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



@EventListener question

2006-09-08 Thread Vinicius Carvalho

Hello there! Does EventListener + ResponseBuilder supports all
components? For instance, is it possible to update contents presented
by a @Insert?
I was trying a simple quote app and can't get it working:

@EventListener(elements = "fetchQuotes", events="onmouseover")
public void getQuotes(IRequestCycle cycle){
ResponseBuilder builder = cycle.getResponseBuilder();
setQuote(getQuotesFromDB());
builder.updateComponent("quoteDiv");

}

Mouse
over here to get more quotes...



What's the right way?


Regards

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



MasterDetail page + Hibernate + rewinding phase question (question from stupid person :) )

2006-09-05 Thread Vinicius Carvalho

Hello there! From now on I'll just assume I'm stupid. So if anyone
cares to help me (remember you are going to be explaining to a stupid
person ;) )

I've post this before (a topic comparing with JSF). here's my situation:

A master detail page ok? An Event has a mediator and a set of participants.
You have the edit block for it, and a table with every record beneath
it with a link that fetches the object from the database (Hibernate,
hence, proxies for the mediator (many-to-one) and the  Set).

Here's some code for it:

//Selects the current event and put it on the screen
public IPage exibirDetalhesEvento(IRequestCycle cycle, Long id){
Evento evento = getEventoService().obterEvento(id);
if(evento.getStatus().equals(Evento.STATUS_ONLINE)){
ValidationDelegate delegate = (ValidationDelegate)
getBeans().getBean("customDelegate");

delegate.record(null,getMessages().getMessage("error.eventoExecucao"));
return null;
}
if(evento.getStatus().equals(Evento.STATUS_FECHADO)){
ValidationDelegate delegate = (ValidationDelegate)
getBeans().getBean("customDelegate");

delegate.record(null,getMessages().getMessage("error.eventoTerminado"));
return null;
}
setEvento(evento);
return this;
}


// Updates the event (or create a new one) from the DB
public IPage cadastrarEvento(IRequestCycle cycle){
ValidationDelegate delegate = (ValidationDelegate)
getBeans().getBean("customDelegate");

Evento evento = null;
if(getEvento().isAberto()){
if(getEvento().getMaxPessoas() == null ||
getEvento().getMaxPessoas().intValue() <= 0){
delegate.record((IFormComponent) 
getComponent("capacidade"),
getMessages().getMessage("error.capacidade.required"));
}else{
if(getEvento().getMaxPessoas() <= 2 && 
getEvento().getMaxPessoas() > 100){
delegate.record((IFormComponent) 
getComponent("capacidade"),"O
número máximo de participantes deve estar entre 2-100");
}
}
}
if(delegate.getHasErrors()){
return null;
}

try{
evento = 
getEventoService().cadastrarEvento(getEvento(),getPath(cycle)); 
   
}catch (ChatException e) {

delegate.record(null,getMessages().getMessage(e.getMessage()));
return null;
}

setEvento(new Evento());
return this;
}

Now in the above code that everything gets messed up. The getEvento()
property is the one mapped for the screen, as I said before what is
happening is the getEvento() returns a plain new object, so the
mediator, and the set comes with null values. I know I'm stupid and
messing with the request cycle. So in order to get the original from
db and merge with new values where do I put a line of code like this:

setEvento(getEventoService().getEvento(getEvento.getId())?

I do fell ashamed about asking this, but I'm a f**king hurry here.

Best regards and thanks for the time

Vinicius

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



Re: Table component + OpenSessionInView problems

2006-09-05 Thread Vinicius Carvalho

Nope, I don't have any persistent anymore, I used to have but not anymore...

Regards

On 9/5/06, Eric Fesler <[EMAIL PROTECTED]> wrote:

Do you have any persistent properties related to Evento on your page ?

If somehow, you have a persistent Evento or if you have serialized an Evento
somwhere in your page, this could explain your lazy instantiation exception.

-- ERic

On Monday 04 September 2006 21:31, Vinicius Carvalho wrote:
> Hello there! I have a page using a contrib:Table. So far it was
> working great. Until I decided to add a property that is a lazy proxy
> for an association:
>
>  condition="ognl:(components.tabelaEventos.tableRow.moderador.confirmado)">
>
> The page is a master-detail page. The first time it is loaded it works
> great. Now comes the odd part, if I add a new master object, next time
> its load its ok, but suppose I click in a link anywhere in the page,
> and come back to this page of if I reload the page I get a lazy
> instantiation exception: the owning session was closed.
>
> To get the source I have this method:
>
> public List getEventos(){
>   return getEventoService().obterEventos();
> }
>
> So every time it does search the database (I'm not using a tablemodel yet).
>
> The add listener:
>
> public IPage cadastrarEvento(IRequestCycle cycle){
>   ValidationDelegate delegate = (ValidationDelegate)
> getBeans().getBean("customDelegate");
>
>   Evento evento = null;
>
>   if(delegate.getHasErrors()){
>   return null;
>   }
>
>   try{
>   evento = 
getEventoService().cadastrarEvento(getEvento(),getPath(cycle));
>   }catch (ChatException e) {
>   
delegate.record(null,getMessages().getMessage(e.getMessage()));
>   return null;
>   }
>
>   setEvento(new Evento());
>   return this;
>   }
>
> If I take off that column (evento.moderador.confirmado) the problem goes
> away Any ideas?
>
> Regards
>
> -
> 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]



Tapestry: unable to reset response buffer

2006-09-04 Thread Vinicius Carvalho

 Hello there! Few weeks ago I've post a concern about having
opensession in view filter (both spring and hivemind approach) on a
very requested web page.
When we ran our stress test today, we got thousands of the following
exceptions below (we had a few hundred of users accessing the
application, average of 50 requests/second).

Well, since Spring filter is at the bottom of the stack, I believe he
is the one to blame. So we need to remove the opensession for the chat
pages, that are readonly and got thousands
of ajax requests...

The first Ideia I got in mind is simply dumping tapestry for it and
using pure servlets.
I'm pretty worried with the whole sequence of events:

browser -> Spring Filter -> Tapestry Servlet -> Engine Service -> Page
-> EngineService -> Spring Filter -> browser

And using a servlet I'd have:

browser -> Servlet -> browser

Please I'm not by any means criticizing Tapestry. I just would like to
hear from you gurus, if my concern is valid. And if that exception
thrown by tapestry will compromise my application, for example not
returning an exception.

Regards

ERROR ApplicationServerThread-16
org.apache.tapestry.web.ServletWebResponse - Unable to reset response
buffer: Response has already been committed
java.lang.IllegalStateException: Response has already been committed
 at 
com.evermind.server.http.EvermindHttpServletResponse.resetBuffer(EvermindHttpServletResponse.java:1848)
 at 
com.evermind.server.http.EvermindHttpServletResponse.reset(EvermindHttpServletResponse.java:1874)
 at com.evermind.server.http.EvermindHttpServletResponse.reset
(EvermindHttpServletResponse.java:1842)
at org.apache.tapestry.web.ServletWebResponse.reset(ServletWebResponse.java:128)
at 
org.apache.tapestry.web.ServletWebResponse.getPrintWriter(ServletWebResponse.java:90)
at $WebResponse_10d7962d0da.getPrintWriter($WebResponse_10d7962d0da.java)
at $WebResponse_10d7962cfb6.getPrintWriter($WebResponse_10d7962cfb6.java)
 at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse
(ResponseRendererImpl.java:67)
at 
$ResponseRenderer_10d7962cfce.renderResponse($ResponseRenderer_10d7962cfce.java)
at 
org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionPresenterImpl.java:46)
at 
$ExceptionPresenter_10d7962cfbe.presentException($ExceptionPresenter_10d7962cfbe.java)
 at 
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngine.java:121)
 at org.apache.tapestry.engine.AbstractEngine.service (AbstractEngine.java:280)
at 
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
at $WebRequestServicer_10d7962d016.service($WebRequestServicer_10d7962d016.java)
at $WebRequestServicer_10d7962d012.service($WebRequestServicer_10d7962d012.java)
at 
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
at 
$ServletRequestServicer_10d7962cff8.service($ServletRequestServicer_10d7962cff8.java)
at 
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
at 
$ServletRequestServicerFilter_10d7962cff4.service($ServletRequestServicerFilter_10d7962cff4.java)
at 
$ServletRequestServicer_10d7962cffa.service($ServletRequestServicer_10d7962cffa.java)
at 
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
at 
$ServletRequestServicerFilter_10d7962cff2.service($ServletRequestServicerFilter_10d7962cff2.java)
at 
$ServletRequestServicer_10d7962cffa.service($ServletRequestServicer_10d7962cffa.java)
at 
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
at 
$ServletRequestServicerFilter_10d7962cff6.service($ServletRequestServicerFilter_10d7962cff6.java)
at 
$ServletRequestServicer_10d7962cffa.service($ServletRequestServicer_10d7962cffa.java)
at 
$ServletRequestServicer_10d7962cfec.service($ServletRequestServicer_10d7962cfec.java)
 at 
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
 at org.apache.tapestry.ApplicationServlet.doGet (ApplicationServlet.java:79)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at com.evermind.server.http.ResourceFilterChain.doFilter
(ResourceFilterChain.java:64)
at 
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter
(OncePerRequestFilter.java:77)
at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java
:376)
 at 
com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
 at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
 at com.evermind.server.http.HttpRequestHandler.serveOneRequest
(HttpRequestH

Table component + OpenSessionInView problems

2006-09-04 Thread Vinicius Carvalho

Hello there! I have a page using a contrib:Table. So far it was
working great. Until I decided to add a property that is a lazy proxy
for an association:



The page is a master-detail page. The first time it is loaded it works
great. Now comes the odd part, if I add a new master object, next time
its load its ok, but suppose I click in a link anywhere in the page,
and come back to this page of if I reload the page I get a lazy
instantiation exception: the owning session was closed.

To get the source I have this method:

public List getEventos(){
return getEventoService().obterEventos();
}

So every time it does search the database (I'm not using a tablemodel yet).

The add listener:

public IPage cadastrarEvento(IRequestCycle cycle){
ValidationDelegate delegate = (ValidationDelegate)
getBeans().getBean("customDelegate");

Evento evento = null;

if(delegate.getHasErrors()){
return null;
}

try{
evento = 
getEventoService().cadastrarEvento(getEvento(),getPath(cycle)); 
   
}catch (ChatException e) {

delegate.record(null,getMessages().getMessage(e.getMessage()));
return null;
}

setEvento(new Evento());
return this;
}

If I take off that column (evento.moderador.confirmado) the problem goes away
Any ideas?

Regards

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



Re: [OT] - Window Events question

2006-09-04 Thread Vinicius Carvalho

Thanks :) That did the trick :)

On 9/4/06, andyhot <[EMAIL PROTECTED]> wrote:

try onunload

Vinicius Carvalho wrote:
> Hello there. This is slightly OT, but since we have many gurus from JS
> here like Jesse. I was wondering if you guys don't mind if I post this
> here :)
>
> My app will have some thousand of simultaneous users, using ajax that
> polls messages from the chatserver with a 2sec interval.
>
> Well, one of the problems I'm facing is how to know when the user is
> still on the room. I'm already using window.onclose events, that sends
> a message to the server, and remove him from the userList. But I have
> 2 other problems:
>
> 1st: the user hits the back/forward button
> 2nd: the user change the location on the browser.
>
> Is it possible to detect this kind of behaviour ?
> Best Regards
>
> Vinicius
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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



[OT] - Window Events question

2006-09-04 Thread Vinicius Carvalho

Hello there. This is slightly OT, but since we have many gurus from JS
here like Jesse. I was wondering if you guys don't mind if I post this
here :)

My app will have some thousand of simultaneous users, using ajax that
polls messages from the chatserver with a 2sec interval.

Well, one of the problems I'm facing is how to know when the user is
still on the room. I'm already using window.onclose events, that sends
a message to the server, and remove him from the userList. But I have
2 other problems:

1st: the user hits the back/forward button
2nd: the user change the location on the browser.

Is it possible to detect this kind of behaviour ?
Best Regards

Vinicius

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



Re: Validtion message for maxLength/minLength is messed

2006-09-02 Thread Vinicius Carvalho

Happened on the 4.0.2, before posting the jira, let me download 4.1
and check if it is ok :)

Regards

On 9/2/06, andyhot <[EMAIL PROTECTED]> wrote:

Vinicius Carvalho wrote:
> Hello there! ? I've noticied that Tapestry validation message's for
> min/max length is inverted: The error displayed is:
>
> The "8" field must have at least Password characters (only the
> portuguese version :) )
>
> Checking the ValidationStrings for pt_BT confirmed that fields are
> inverted
>
> I guess this is a bug...
please, file a JIRA with the correct ValidationStrings_pt_BR.properties
attached.
Does this happen in Tapestry 4.0, in 4.1 or in both ?

As a workaround, you can try adding the correct
WEB-INF/classes/org/apache/tapestry/valid/ValidationStrings_pt_BR.properties

In most containers, this will 'shadow' the same file from tapestry's jar

Also see http://tapestry.apache.org/tapestry4/UsersGuide/validation.html
the 'validators: binding prefix'

>
>
>
> Is it possible to override it?
>
> Regards
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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



Validtion message for maxLength/minLength is messed

2006-09-02 Thread Vinicius Carvalho

Hello there! ? I've noticied that Tapestry validation message's for
min/max length is inverted: The error displayed is:

The "8" field must have at least Password characters (only the
portuguese version :) )

Checking the ValidationStrings for pt_BT confirmed that fields are inverted

I guess this is a bug...



Is it possible to override it?

Regards

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



Re: Few questions (contrib:table and link )

2006-08-31 Thread Vinicius Carvalho

Yep, I'm catching them :) now everything works!
One thing that I'd like to know also (could not find on the tapestry
site or kent's book) is how to customize the exception page. for a
production environment I'd rather have a: "bad server no donut for
you" message, and a link to email the administrator, than the
exception page offered by tapestry (which btw really amused the user
acceptance testers :) )

Regards

On 8/31/06, andyhot <[EMAIL PROTECTED]> wrote:

Vinicius Carvalho wrote:
> Thanks that did the trick :)
>
> Regarding the exception, yeah, seems that tapestry captures all
> runtime exceptions and wrap them inside ApplicationRuntimeException,
> so my catch(ChatServerException) would never be executed :)
So, are you catching ApplicationRuntimeExceptions now?

You could probably have your own implementation of ListenerMethodInvoker
that would let those exceptions pass through.
>
> Regards
>
> On 8/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> Depending on the complexity of your confirmation dialog, you can do
>> something simple, too, like taking advantage of informal parameters. :)
>> Something like:
>> Purge
>>
>>
>> Robert
>>
>> > Vinicius Carvalho wrote:
>> >> 1st: Is there an way to have an confirmation message for my
>> >> DirectLink? Like showing an confirmation box "Are you sure you
>> want to
>> >> purge all elements?" and if ok, calling the link? I believe I need to
>> >> use the ILinkRenderer for that, but I'm kinda confused yet, just need
>> >> some suggestions :)
>> > you can use an ILinkRenderer or check out the source of these
>> components
>> >
>> 
http://tapfx.cvs.sourceforge.net/tapfx/tapfx-tapestry4/src/java/net/sf/tapfx/components/confirm/
>>
>> >>
>> >> 2nd: Its related to my last post, does runtime exception get an
>> >> special treatment by the framework? Is this why I can't capture them
>> >> inside my EngineService?
>> > To better understand, is the problem that
>> >
>> > chatListener.trigger does not throw any exceptions?
>> >>
>> >> My best regards
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> > --
>> > Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
>> > Tapestry / Tacos developer
>> > Open Source / J2EE Consulting
>> >
>> >
>> > -
>> > 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]
>
>


--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


-
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: Few questions (contrib:table and link )

2006-08-31 Thread Vinicius Carvalho

Thanks that did the trick :)

Regarding the exception, yeah, seems that tapestry captures all
runtime exceptions and wrap them inside ApplicationRuntimeException,
so my catch(ChatServerException) would never be executed :)

Regards

On 8/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Depending on the complexity of your confirmation dialog, you can do
something simple, too, like taking advantage of informal parameters. :)
Something like:
Purge


Robert

> Vinicius Carvalho wrote:
>> 1st: Is there an way to have an confirmation message for my
>> DirectLink? Like showing an confirmation box "Are you sure you want to
>> purge all elements?" and if ok, calling the link? I believe I need to
>> use the ILinkRenderer for that, but I'm kinda confused yet, just need
>> some suggestions :)
> you can use an ILinkRenderer or check out the source of these components
> 
http://tapfx.cvs.sourceforge.net/tapfx/tapfx-tapestry4/src/java/net/sf/tapfx/components/confirm/
>>
>> 2nd: Its related to my last post, does runtime exception get an
>> special treatment by the framework? Is this why I can't capture them
>> inside my EngineService?
> To better understand, is the problem that
>
> chatListener.trigger does not throw any exceptions?
>>
>> My best regards
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> -
> 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]



Re: Few questions (contrib:table and link )

2006-08-31 Thread Vinicius Carvalho

Yep, not exceptions thrown. The underline listener method implemented
by the page is:

public void onMessageReceive(IRequestCycle cycle){
try{
cycle.setListenerParameters(new
Object[]{getChatServer().deQueueMessage(getUser())});
}catch (ChatServerException e) {
logger.error(e);
throw e;
}   
getUser().setLastRequest(Calendar.getInstance());
}

and the odd part is that the catch block is executed... if so, why not
capturing it on the service?

Regards

On 8/31/06, andyhot <[EMAIL PROTECTED]> wrote:

Vinicius Carvalho wrote:
> 1st: Is there an way to have an confirmation message for my
> DirectLink? Like showing an confirmation box "Are you sure you want to
> purge all elements?" and if ok, calling the link? I believe I need to
> use the ILinkRenderer for that, but I'm kinda confused yet, just need
> some suggestions :)
you can use an ILinkRenderer or check out the source of these components
http://tapfx.cvs.sourceforge.net/tapfx/tapfx-tapestry4/src/java/net/sf/tapfx/components/confirm/
>
> 2nd: Its related to my last post, does runtime exception get an
> special treatment by the framework? Is this why I can't capture them
> inside my EngineService?
To better understand, is the problem that

chatListener.trigger does not throw any exceptions?
>
> My best regards
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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



Few questions (contrib:table and link )

2006-08-31 Thread Vinicius Carvalho

Hello there folks. I have a few questions, and just thought could be
easier to sumarize them in one email :)

1st: Is there an way to have an confirmation message for my
DirectLink? Like showing an confirmation box "Are you sure you want to
purge all elements?" and if ok, calling the link? I believe I need to
use the ILinkRenderer for that, but I'm kinda confused yet, just need
some suggestions :)

2nd: Its related to my last post, does runtime exception get an
special treatment by the framework? Is this why I can't capture them
inside my EngineService?

My best regards

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



Exception not being caught by engine

2006-08-30 Thread Vinicius Carvalho

Hello there (my other email [EMAIL PROTECTED] is under maintenance for
over 3 days now...).
I've built a chat system using Tapestry and Spring (thanks to all the help
I've got here), and now I'm just giving it the final touch. I'm not being
able to capture an exception on my service, I'll try to explain my
architecture in the best way my bad english can :P

I have a ChatServer class which handle all the rooms on the system. This
class is managed by spring, so it's a Stateless class. I have created an
Tapestry Engine Service, to handle ajax submissions, it's called
ChatListenerService (and it is used by the ChatListenerComponent), its main
responsibility is just to trigger the listener associated to the component
get the response (a list of messages) and render it in xml: here's a
snippet:

 try{
   chatListener.trigger(cycle);
   Object[] args = cycle.getListenerParameters();
   messages = (Collection)args[0];
   }catch(ChatServerException e){
   WebSession session = cycle.getInfrastructure
().getRequest().getSession(true);
   session.invalidate();
   ErrorMessage message = new ErrorMessage();
   message.setCause(e.getMessage());
   message.setRedirect(Boolean.TRUE);
   messages = new ArrayList();
   messages.add(message);
   }
   PrintWriter writer = response.getPrintWriter(new
ContentType("text/xml"));
   response.setHeader("Cache-Control", "no-cache");
   String xml = generateMessageOutput(messages);
   writer.write(xml);
   writer.flush();

I think this is pretty straight forward. I try to call the listener, if it
throws an exception, I invalidate the user session, and put an error message
for it (the client side handles message types: User, Error and System).

My Page listener is as simple as this:

public void onMessageReceive(IRequestCycle cycle){
   try{
   cycle.setListenerParameters(new
Object[]{getChatServer().deQueueMessage(getUser())});
   }catch (ChatServerException e) {
   logger.error(e);
   throw e;
   }
   getUser().setLastRequest(Calendar.getInstance());
   }

once again pretty straight, I have ChatServer injected on my page, it
dequeues all messages from it from the given user, and set it on the request
cycle.

Now, what's strange is that, the exception never reaches the
ChatListenerService. I have some logging that I've omitted there, that shows
the step by step when on debug mode, and I get service -> onMessageReceive
-> catch block from page, but not the catch from the engine.

The exception is a subclass of RunTimeException. I was wondering that could
be some kind of Tapestry's proxy feature of how dealing with exceptions or
something like that.

Does anyone has any idea of what could be avoiding the exception to be
caught?

Best Regards


Re: Friendly URLs messing style of ExceptionPage

2006-08-25 Thread Vinicius Carvalho

Well, for one of the systems I really can't tell right away, as it is
hosted in an ISP, but I believe they use jk there.
The other, nope, is just plain tomcat :)

Regards

On 8/25/06, Henri Dupre <[EMAIL PROTECTED]> wrote:

Do you use by any chance apache + jk in front end of tomcat?
I had a problem encoding assets because of some strange bug in jk...


On 8/24/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> I have another site, running on version 4.0 (this one is 4.0.2) and
> shares the same problem. Now that I removed the asset on this one, I
> got back to the other and removed it as well :)
>
> Regards
>
> On 8/24/06, hv @ Fashion Content <[EMAIL PROTECTED]> wrote:
> > That sounds like a bug. AssetEncoder should be able to differ between
> > private and context assets.
> >
> > "Vinicius Carvalho" <[EMAIL PROTECTED]> skrev i en meddelelse
> > news:[EMAIL PROTECTED]
> > >I found out that the problem was the asset service. I was mapping my
> > > assets to /assets/* as shown in the examples. even though my pages
> > > displayed the assets in a correct way, the Exception page get all
> > > messed up. Removing the asset encoder, got the exception page back on
> > > it's track :)
> > >
> > > Regards
> > >
> > > On 8/23/06, Henri Dupre <[EMAIL PROTECTED]> wrote:
> > >> Hmm looks like somehting is screwed up with the tapestry css
> include...
> > >> Did you disable the base tag in the @Shell?
> > >>
> > >>
> > >> On 8/23/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > >> >
> > >> > Hello there! I've noticed that after defining a friendly url for
> > >> > direct service, I lost all the formatting of the Exception page
> (the
> > >> > blue headers, and highlight and stuff)
> > >> >
> > >> > Why is that? Am I missing something in my configuration?
> > >> >
> > >> > Regards
> > >> >
> > >> >
> -
> > >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> > For additional commands, e-mail: [EMAIL PROTECTED]
> > >> >
> > >> >
> > >>
> > >>
> > >> --
> > >> Henri Dupre
> > >> Actualis Center
> > >>
> > >>
> > >
> > > -
> > > 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]
>
>


--
Henri Dupre
Actualis Center




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



Re: Tapestry (4.0.2) / Hivemind (1.1.1) in OC4J 10.1.3 - Dig a little bit more, anyone please give me a ladder to climb up

2006-08-25 Thread Vinicius Carvalho

I believe that's why we have masters and mortals! Jesse, words can't
describe how grateful I am! Bullseye Dude, that just did the trick, so
the problem is the LoggingInterceptorFactory, I just did an override
on it, as you said and the app is running perfectly on Oracle AS
10.1.3.

Once again, thanks, thanks thanks

My best regards to YOU!


On 8/24/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

Hi,

Looking at the source for the hivemind LoggingInterceptorFactory leads me to
believe it could very well be a "bug" on hivemind's part. Not because I saw
anything particular, just because it looked complicated and scary ;)

To get around this problem temporarily you could do something like this:

Override the default service implementation for this logging interceptor,
the syntax for doing this is
http://jakarta.apache.org/hivemind/descriptor.html#implementation.

You will need to do this in your hivemodule.xml file (placed in the WEB-INF
directory).

You want to "implement" the hivemind.LoggingInterceptor service point,
http://jakarta.apache.org/hivemind/hivedocs/service/hivemind.LoggingInterceptor.html
.

Just create a dummy object that implements the
org.apache.hivemind.ServiceInterceptorFactory interface but does nothing.

On 8/23/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> Well, I'll check it deeper tonight (from 10pm-midnight) it's the free
> time I have to fix OC4J to work with tapestry.
>
> I do have commons-logging 1.0.4 and Log4J 1.2.9 bundled on my
> application. I'm also forcing the oracle container to load
> applications libs first.
>
> Best Regards
>
> On 8/23/06, hv @ Fashion Content <[EMAIL PROTECTED]> wrote:
> > Are you testing your app against a local test db like hypersonic/mysql ?
> >
> > I should think that you would weed out all the trivial blunders if you
> get a
> > local db working, or even an in memory db first.
> >
> > "Vinicius Carvalho" <[EMAIL PROTECTED]> skrev i en meddelelse
> > news:[EMAIL PROTECTED]
> > > Hello there! I still did not gave up OC4J 10.1.3 (well, I'd love to,
> > > but my boss wont let me).
> > > So, just to fresh-up memories, I get a nasty exception when I deploy
> > > my app on oracle AS:
> > >
> > > 06/08/22 23:23:51 java.lang.IllegalArgumentException: argument type
> > > mismatch
> > > 06/08/22 23:23:51
> > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> > > 06/08/22 23:23:51
> > > sun.reflect.NativeConstructorAccessorImpl.newInstance(
> NativeConstructorAccessorImpl.java:39)
> > > 06/08/22 23:23:51
> > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> DelegatingConstructorAccessorImpl.java:27)
> > > 06/08/22 23:23:51
> > > java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> > > 06/08/22 23:23:51
> > >
> 
org.apache.hivemind.service.impl.LoggingInterceptorFactory.instantiateInterceptor
> (LoggingInterceptorFactory.java:290)
> > > 06/08/22 23:23:51
> > >
> org.apache.hivemind.service.impl.LoggingInterceptorFactory.createInterceptor
> (LoggingInterceptorFactory.java:255)
> > >
> > > Ok, so I start debuging the app on both tomcat and Oracle:
> > >
> > > Here's the snippet I was debugging inside the
> LogginInterceptorFactory:
> > >
> > >private Object instantiateInterceptor(InterceptorStack stack,
> > > Class interceptorClass)
> > >throws Exception
> > >{
> > >Object stackTop = stack.peek();
> > >
> > >Constructor c = interceptorClass.getConstructors()[0];
> > >
> > >return c.newInstance(new Object[] { stack.getServiceLog(),
> > > stackTop }); <- point of problem
> > >}
> > >
> > > Well below it's a "toString" of each of the variables involved:
> > >
> > > Tomcat:
> > > stack
> > >
> 
=InterceptorStackImpl[contribution=ServiceInterceptorContributionImpl[factoryServiceId=
> hivemind.LoggingInterceptor
> > > parameters=null precedingInterceptorIds=null
> > > followingInterceptorIds=null name=null] interfaceClass=interface
> > > org.apache.tapestry.parse.ISpecificationParser top= > > tapestry.parse.SpecificationParser(
> org.apache.tapestry.parse.ISpecificationParser)>]
> > >
> > > interceptorClass = lass $ISpecificationParser_10d3ecd54a4
> > >
> > > stackTop =  > > tapestry.parse.SpecificationParser(
> org.apache.tapestry.parse.ISpecificationParser)>
> > >
> > > c = publi

Re: Friendly URLs messing style of ExceptionPage

2006-08-24 Thread Vinicius Carvalho

I have another site, running on version 4.0 (this one is 4.0.2) and
shares the same problem. Now that I removed the asset on this one, I
got back to the other and removed it as well :)

Regards

On 8/24/06, hv @ Fashion Content <[EMAIL PROTECTED]> wrote:

That sounds like a bug. AssetEncoder should be able to differ between
private and context assets.

"Vinicius Carvalho" <[EMAIL PROTECTED]> skrev i en meddelelse
news:[EMAIL PROTECTED]
>I found out that the problem was the asset service. I was mapping my
> assets to /assets/* as shown in the examples. even though my pages
> displayed the assets in a correct way, the Exception page get all
> messed up. Removing the asset encoder, got the exception page back on
> it's track :)
>
> Regards
>
> On 8/23/06, Henri Dupre <[EMAIL PROTECTED]> wrote:
>> Hmm looks like somehting is screwed up with the tapestry css include...
>> Did you disable the base tag in the @Shell?
>>
>>
>> On 8/23/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>> >
>> > Hello there! I've noticed that after defining a friendly url for
>> > direct service, I lost all the formatting of the Exception page (the
>> > blue headers, and highlight and stuff)
>> >
>> > Why is that? Am I missing something in my configuration?
>> >
>> > Regards
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>>
>> --
>> Henri Dupre
>> Actualis Center
>>
>>
>
> -
> 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]



Re: Creating listener urls

2006-08-24 Thread Vinicius Carvalho

Hello Jesse, not really, as I understood the bind, needs a url right?
What I need is that url :) I think I might be going against tapestry
internal architecture (I don't fully understand it, but for what I've
seen it seems that it always bind in the url the component it's
invoking right? like: contextpath/pageName,componentId.direct?params

I guess what I'd like to have is a way to call a listener based on a
url parameter, no component attached, just like the way Struts (oops,
just killed a baby seal) does with LookupDispatchAction. I'm aware
people might want to purge me from the list now :P

On 8/24/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

What, do you mean like "bind" ?

http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js?view=markup

On 8/24/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> Hello there! In my page I have lots of Asynchronous calls using
> XMLHttpRequest. I'm having a hard time dealing with so many calls,
> I'll show way:
>
> I did not use the XTile component, because I need a better suport from
> the Service, and also It's a fire and forget way, I don't need
> response.
>
> So My idea was to create an AjaxSend service + component. The
> component writes a sendFunction.
>
> Problem is, I'm dealing with a lot of those components on my screen.
> Cuz for each listener in the page I add a component (Bad design I
> know). So my question is:
>
> Would be possible to have just one script: let's say:
>
> function asynchSend(url,params[]){
> ... ajax stuff here
> }
>
> and then on my Page, I have methods that would return the Listeners urls?
> like :
>
> public String getLogoutLink(){
> return the url to the logout method ...
> }
>
> Is this possible?
>
> Best Regards
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.




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



Creating listener urls

2006-08-24 Thread Vinicius Carvalho

Hello there! In my page I have lots of Asynchronous calls using
XMLHttpRequest. I'm having a hard time dealing with so many calls,
I'll show way:

I did not use the XTile component, because I need a better suport from
the Service, and also It's a fire and forget way, I don't need
response.

So My idea was to create an AjaxSend service + component. The
component writes a sendFunction.

Problem is, I'm dealing with a lot of those components on my screen.
Cuz for each listener in the page I add a component (Bad design I
know). So my question is:

Would be possible to have just one script: let's say:

function asynchSend(url,params[]){
... ajax stuff here
}

and then on my Page, I have methods that would return the Listeners urls? like :

public String getLogoutLink(){
return the url to the logout method ...
}

Is this possible?

Best Regards

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



Re: Friendly URLs messing style of ExceptionPage

2006-08-24 Thread Vinicius Carvalho

I found out that the problem was the asset service. I was mapping my
assets to /assets/* as shown in the examples. even though my pages
displayed the assets in a correct way, the Exception page get all
messed up. Removing the asset encoder, got the exception page back on
it's track :)

Regards

On 8/23/06, Henri Dupre <[EMAIL PROTECTED]> wrote:

Hmm looks like somehting is screwed up with the tapestry css include...
Did you disable the base tag in the @Shell?


On 8/23/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> Hello there! I've noticed that after defining a friendly url for
> direct service, I lost all the formatting of the Exception page (the
> blue headers, and highlight and stuff)
>
> Why is that? Am I missing something in my configuration?
>
> Regards
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Henri Dupre
Actualis Center




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



Re: OpenSessionInViewFilter configuration

2006-08-23 Thread Vinicius Carvalho

BTW Henri, I'm using (I guess yours) implementation of OSIVF
(HibernateRequestFilter), so far its working great (I've dump the
Spring version, cuz when I add friendly urls for direct service. It
quit working, I guess I needed another filter mapping on web.xml)

Just wanna now, if spring transaction management will work smoothly
with this approach (I mean, just like it is with
opensessioninviewfilter)

Regards

On 8/23/06, Henri Dupre <[EMAIL PROTECTED]> wrote:

I wouldn't have any concerns about performances. An empty hibernate session
is lightweight. We did originally consider not opening hibernate sessions
for some pages but the impact on performances was so low that we did not
bother doing anything like that. What does matter on the performance side
however is to close the sessions or at least flush them. If you follow the
spring opensessioninview filter code, it will handle that for you.

Ideally it would be nice to have an annotation in the page class to say that
you need a hibernate session or not... but the framework can't handle it
completly transparently because some apps implement long sessions that span
over several requests... it is up the the app to define the session
strategy.

Also creating sessions on demand wouldn't too difficult either to implement,
but hibernate is smart enough with the sessions so that it doesn't require
much resources to create one. All db connections and everything else would
be handled on the first db access. What does have more an impact on
performance is the hibernate cache. Definitly worth to spend time fine
tuning it, on our website, most requests don't even require any db access.





On 8/22/06, hv @ Fashion Content <[EMAIL PROTECTED]> wrote:
>
> I have the same concerns, but for some reason few people care to make the
> creation and closing of a session depend on actual use.
> Relating it to the page name is a weak solution imo. It should be a
> concern
> handled strictly and transparently by the persistence framework
> (provided that you define the servlet filter of course).
>
> Henrik
>
> "Vinicius Carvalho" <[EMAIL PROTECTED]> skrev i en meddelelse
> news:[EMAIL PROTECTED]
> > Well I guess, I'm just worried about performance, those page will
> > handle a few thousands of concurrent users, and they use ajax, we
> > expect something like 500-700 simultaneous requests for the pages.
> >
> > Best regards
> >
> > On 8/22/06, Henri Dupre <[EMAIL PROTECTED]> wrote:
> >> Do you really need to turn it off?
> >> It shouldn't hurt to have it on even if you don't need an hibernate
> >> session.
> >>
> >>
> >>
> >> On 8/22/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> >> >
> >> > Hello there! I'm using OSIVF with spring in my app. I had it
> >> > configured just like examples on the wiki:
> >> >
> >> > 
> >> >hibernateFilter
> >> > /app
> >> >
> >> > But I have a few pages that I want to turn it off, is it possible? I
> >> > tried before using pattern=*.html and put those pages in a different
> >> > path, but I get some errors using *.html.
> >> >
> >> > Best Regards
> >> >
> >> > -
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> >
> >>
> >>
> >> --
> >> Henri Dupre
> >> Actualis Center
> >>
> >>
> >
> > -
> > 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]
>
>


--
Henri Dupre
Actualis Center




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



Friendly URLs messing style of ExceptionPage

2006-08-23 Thread Vinicius Carvalho

Hello there! I've noticed that after defining a friendly url for
direct service, I lost all the formatting of the Exception page (the
blue headers, and highlight and stuff)

Why is that? Am I missing something in my configuration?

Regards

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



include-script question

2006-08-23 Thread Vinicius Carvalho

Hello there! I'm trying to include a script with my .script file, but
it is not being loaded by the browser:

My script is located at context/WEB-INF/components/ajaxSend.script



When creating the page its rendering:



Well, it seems ok, but the browser is not loading it. Isn't WEB-INF a
protected folder? I mean, I can't access anything on it.

Regards

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



Re: Tapestry (4.0.2) / Hivemind (1.1.1) in OC4J 10.1.3 - Dig a little bit more, anyone please give me a ladder to climb up

2006-08-23 Thread Vinicius Carvalho

Well, I'll check it deeper tonight (from 10pm-midnight) it's the free
time I have to fix OC4J to work with tapestry.

I do have commons-logging 1.0.4 and Log4J 1.2.9 bundled on my
application. I'm also forcing the oracle container to load
applications libs first.

Best Regards

On 8/23/06, hv @ Fashion Content <[EMAIL PROTECTED]> wrote:

Are you testing your app against a local test db like hypersonic/mysql ?

I should think that you would weed out all the trivial blunders if you get a
local db working, or even an in memory db first.

"Vinicius Carvalho" <[EMAIL PROTECTED]> skrev i en meddelelse
news:[EMAIL PROTECTED]
> Hello there! I still did not gave up OC4J 10.1.3 (well, I'd love to,
> but my boss wont let me).
> So, just to fresh-up memories, I get a nasty exception when I deploy
> my app on oracle AS:
>
> 06/08/22 23:23:51 java.lang.IllegalArgumentException: argument type
> mismatch
> 06/08/22 23:23:51
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 06/08/22 23:23:51
> 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> 06/08/22 23:23:51
> 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> 06/08/22 23:23:51
> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> 06/08/22 23:23:51
> 
org.apache.hivemind.service.impl.LoggingInterceptorFactory.instantiateInterceptor(LoggingInterceptorFactory.java:290)
> 06/08/22 23:23:51
> 
org.apache.hivemind.service.impl.LoggingInterceptorFactory.createInterceptor(LoggingInterceptorFactory.java:255)
>
> Ok, so I start debuging the app on both tomcat and Oracle:
>
> Here's the snippet I was debugging inside the LogginInterceptorFactory:
>
>private Object instantiateInterceptor(InterceptorStack stack,
> Class interceptorClass)
>throws Exception
>{
>Object stackTop = stack.peek();
>
>Constructor c = interceptorClass.getConstructors()[0];
>
>return c.newInstance(new Object[] { stack.getServiceLog(),
> stackTop }); <- point of problem
>}
>
> Well below it's a "toString" of each of the variables involved:
>
> Tomcat:
> stack
> 
=InterceptorStackImpl[contribution=ServiceInterceptorContributionImpl[factoryServiceId=hivemind.LoggingInterceptor
> parameters=null precedingInterceptorIds=null
> followingInterceptorIds=null name=null] interfaceClass=interface
> org.apache.tapestry.parse.ISpecificationParser top= 
tapestry.parse.SpecificationParser(org.apache.tapestry.parse.ISpecificationParser)>]
>
> interceptorClass = lass $ISpecificationParser_10d3ecd54a4
>
> stackTop =  
tapestry.parse.SpecificationParser(org.apache.tapestry.parse.ISpecificationParser)>
>
> c = public
> 
$ISpecificationParser_10d38c5277a(org.apache.commons.logging.Log,$ISpecificationParser_10d38c52779)
>
> stack.getServiceLog = [EMAIL PROTECTED]
>
>
> OC4J
> stack =
> 
InterceptorStackImpl[contribution=ServiceInterceptorContributionImpl[factoryServiceId=hivemind.LoggingInterceptor
> parameters=null precedingInterceptorIds=null
> followingInterceptorIds=null name=null] interfaceClass=interface
> org.apache.tapestry.parse.ISpecificationParser top= 
tapestry.parse.SpecificationParser(org.apache.tapestry.parse.ISpecificationParser)>]
>
> interceptorClass = class $ISpecificationParser_10d38ce04a4
>
> stackTop =  
tapestry.parse.SpecificationParser(org.apache.tapestry.parse.ISpecificationParser)>
>
> c = public
> 
$ISpecificationParser_10d38c89a9b(org.apache.commons.logging.Log,$ISpecificationParser_10d38c89a9a)
>
> stack.getServiceLog = [EMAIL PROTECTED]
>
> Well, I got stuck because, all the variables seems to be the same
> type, hence, how could a  type mismatch could be happening.
>
> I couldn't find a way to figure out the interfaces of the stackTop.
>
> Well I hope this piece of information would give an idea for the gurus
> or hivemind/tapestry to give me a hand on how to solve this.
>
> I really need to get it working on 10.1.3 :(
>
> My best regards
>
> -
> 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]



Tapestry (4.0.2) / Hivemind (1.1.1) in OC4J 10.1.3 - Dig a little bit more, anyone please give me a ladder to climb up

2006-08-22 Thread Vinicius Carvalho

Hello there! I still did not gave up OC4J 10.1.3 (well, I'd love to,
but my boss wont let me).
So, just to fresh-up memories, I get a nasty exception when I deploy
my app on oracle AS:

06/08/22 23:23:51 java.lang.IllegalArgumentException: argument type mismatch
06/08/22 23:23:51
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
06/08/22 23:23:51
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
06/08/22 23:23:51
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
06/08/22 23:23:51
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
06/08/22 23:23:51
org.apache.hivemind.service.impl.LoggingInterceptorFactory.instantiateInterceptor(LoggingInterceptorFactory.java:290)
06/08/22 23:23:51
org.apache.hivemind.service.impl.LoggingInterceptorFactory.createInterceptor(LoggingInterceptorFactory.java:255)

Ok, so I start debuging the app on both tomcat and Oracle:

Here's the snippet I was debugging inside the LogginInterceptorFactory:

   private Object instantiateInterceptor(InterceptorStack stack,
Class interceptorClass)
   throws Exception
   {
   Object stackTop = stack.peek();

   Constructor c = interceptorClass.getConstructors()[0];

   return c.newInstance(new Object[] { stack.getServiceLog(),
stackTop }); <- point of problem
   }

Well below it's a "toString" of each of the variables involved:

Tomcat:
stack 
=InterceptorStackImpl[contribution=ServiceInterceptorContributionImpl[factoryServiceId=hivemind.LoggingInterceptor
parameters=null precedingInterceptorIds=null
followingInterceptorIds=null name=null] interfaceClass=interface
org.apache.tapestry.parse.ISpecificationParser top=]

interceptorClass = lass $ISpecificationParser_10d3ecd54a4

stackTop = 

c = public 
$ISpecificationParser_10d38c5277a(org.apache.commons.logging.Log,$ISpecificationParser_10d38c52779)

stack.getServiceLog = [EMAIL PROTECTED]


OC4J
stack = 
InterceptorStackImpl[contribution=ServiceInterceptorContributionImpl[factoryServiceId=hivemind.LoggingInterceptor
parameters=null precedingInterceptorIds=null
followingInterceptorIds=null name=null] interfaceClass=interface
org.apache.tapestry.parse.ISpecificationParser top=]

interceptorClass = class $ISpecificationParser_10d38ce04a4

stackTop = 

c = public 
$ISpecificationParser_10d38c89a9b(org.apache.commons.logging.Log,$ISpecificationParser_10d38c89a9a)

stack.getServiceLog = [EMAIL PROTECTED]

Well, I got stuck because, all the variables seems to be the same
type, hence, how could a  type mismatch could be happening.

I couldn't find a way to figure out the interfaces of the stackTop.

Well I hope this piece of information would give an idea for the gurus
or hivemind/tapestry to give me a hand on how to solve this.

I really need to get it working on 10.1.3 :(

My best regards

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



Re: Tapestry + Ajax help

2006-08-22 Thread Vinicius Carvalho

Thanks, I fixed some of the problems of the persistent :)
Those new pages, really need to be persistent, it is the user login
that is being held on the session ;)

Thanks for the help, I really need a break, today I've worked 11
hours, and i got stuck three hours trying to deal with a problem with
xmlhttprequest, the problem was right before my eyes, after taking a
short break for a snack I found that I was using setTimeout() function
in the wrong place and that was crashing the browser :P

I really would like to use 4.1 but I'm kinda short on time and I have
not fixed the whole oc4j problem yet :(

Regards

On 8/22/06, hv @ Fashion Content <[EMAIL PROTECTED]> wrote:

I would bet on Tap4.1(currently alpha) if I was in your shoes when it comes
to Ajax.
1) The Tap4 part is likely to be fairly stable.
2) The Ajax part is based on Jesses prior work on Tacos
3) It seems to be progressing at a fast pace.

I don't know your application, but I would get the non session dependent
pages working first.
If I remember correctly you were having some mixup earlier with where to
access property values
and tried to fix it by making the property persistent. I would strongly
recommend making a sandbox
webapp and play around with the callbacks/listeners until you understand the
when & why.

There is quite a bit of Tapestry documentation and in this case the old Tap3
user guide isn't a bad
starting point.

Henrik

"Vinicius Carvalho" <[EMAIL PROTECTED]> skrev i en meddelelse
news:[EMAIL PROTECTED]
> Working 12 hours a day, 7 days a week, under heavy pressure makes you
> do stupid things (but as Scott Adams says, every one is stupid).
>
> Sorry folks, was so desperate to get help that did not noticed what
> was happening:
>
> For my 3 problems:
>
> The number of Httpsessions and the number of invocations, seems to be
> close related to the fact that I was debugging the app, even with no
> breakpoint set, Have no idea why, but as soon as I started tomcat with
> jpda off, things come back to normality
>
> The crash, is happening because of javascript, I have no idea why,
> since I've tested it on a blank app, I suck on JS big time, but I'll
> seek for another resource (its an ugly NS_EXCEPTION) read something
> about xmlrequest being already opened and such, this one I'd love to
> have some help from the masters of dojo/js/ajax here :P
>
> Best regards and sorry for the spam :P
>
> -
> 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]



Re: Tapestry + Ajax help

2006-08-22 Thread Vinicius Carvalho

Working 12 hours a day, 7 days a week, under heavy pressure makes you
do stupid things (but as Scott Adams says, every one is stupid).

Sorry folks, was so desperate to get help that did not noticed what
was happening:

For my 3 problems:

The number of Httpsessions and the number of invocations, seems to be
close related to the fact that I was debugging the app, even with no
breakpoint set, Have no idea why, but as soon as I started tomcat with
jpda off, things come back to normality

The crash, is happening because of javascript, I have no idea why,
since I've tested it on a blank app, I suck on JS big time, but I'll
seek for another resource (its an ugly NS_EXCEPTION) read something
about xmlrequest being already opened and such, this one I'd love to
have some help from the masters of dojo/js/ajax here :P

Best regards and sorry for the spam :P

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



Re: OpenSessionInViewFilter configuration

2006-08-22 Thread Vinicius Carvalho

Well I guess, I'm just worried about performance, those page will
handle a few thousands of concurrent users, and they use ajax, we
expect something like 500-700 simultaneous requests for the pages.

Best regards

On 8/22/06, Henri Dupre <[EMAIL PROTECTED]> wrote:

Do you really need to turn it off?
It shouldn't hurt to have it on even if you don't need an hibernate session.



On 8/22/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> Hello there! I'm using OSIVF with spring in my app. I had it
> configured just like examples on the wiki:
>
> 
>hibernateFilter
> /app
>
> But I have a few pages that I want to turn it off, is it possible? I
> tried before using pattern=*.html and put those pages in a different
> path, but I get some errors using *.html.
>
> Best Regards
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Henri Dupre
Actualis Center




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



Tapestry + Ajax help

2006-08-22 Thread Vinicius Carvalho

Hello there! I'm experience some problems dealing with ajax + tapestry
4.0.2 (and I do know I'm the reason of the problems :) )

Ok, the scenario:

A page that polls at each 2 seconds using xmlhttprequest a tapestry page.

The problems:
1- number of HTTPSessions growing in a linear way to the number of
requests (I believe its because of my persistent properties)

2 - invocations to the business method seems to be multiplied by a
huge factor (not at every 2 seconds) I believe I misunderstanding the
whole lifecycle of services/components/pages here

3- Mozilla is closing after few seconds

So I've created a component, and a special service to handle all the
stuff: It's some amount of code, and I'll not post it here, if someone
gets interested I can send it in another message:

public void service(IRequestCycle cycle) throws IOException {
String pageName = cycle.getParameter(ServiceConstants.PAGE);
   String componentId = cycle.getParameter(ServiceConstants.COMPONENT);

   IPage componentPage = cycle.getPage(pageName);
   IComponent component = componentPage.getNestedComponent(componentId);

   ChatListener chatListener = (ChatListener)component;
   String[] params = cycle.getParameters(ServiceConstants.PARAMETER);
   cycle.setListenerParameters(params);

   chatListener.trigger(cycle);

   Object[] args = cycle.getListenerParameters();
   Collection messages = (Collection)args[0];
   PrintWriter writer = response.getPrintWriter(new
ContentType("text/xml"));
   response.setHeader("Cache-Control", "no-cache");
   writer.write(generateMessageOutput(messages));
   writer.flush();
}

on my page I have a listener:
public void onMessageReceive(IRequestCycle cycle){
cycle.setListenerParameters(new
Object[]{getChatServer().deQueueMessage(getParticipante())});
Participante participante = getParticipante();
participante.setUltimaSolicitacao(Calendar.getInstance());
setParticipante(participante);
}

Ok, so the component has a javascrip that renders the correct url for
it. My idea was:

Service->PageListener->Service

As you can see, the listener is the one that does the trick (removing
messages from a queue), the problem is that its been called many times
more that once at each 2 seconds, is there another cycle here that I'm
missing?

The httpsession problem was detected on the tomcat manager. My Chat
page I have persistent properties (the user logged) which are injected
as state objects. It seems that when I call the setter, instead of
replacing the user it's adding a new one (equals and hash code are
implemented)

The third problem happens even if I take off tapestry as the url for
the component to query. I decided to create a simple servlet that
would handle the requests, there I noticed that calling the plain
servlet lead to only 1 invocation at each 2 seconds. But, the browser
is still closing abruptly. As said on other emails this was a JSF app
that is being migrated. The JSF version (that calls the servlet) does
not hangs the browser, also I've tried to create a simple web app with
the exact same javascript, a jsp and a servlet (a dumb one always
giving back the same message), I tried this just to see if the error
was on the javascript. I know this is very odd, and probably hard to
find out, but is there anything on tapestry lifecycle that could
interfere on a tapestry page invoking a servlet?

I'm sorry for so many stuff in such bad English :)

Hope to hear something from you guys :)

Best Regards

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



OpenSessionInViewFilter configuration

2006-08-22 Thread Vinicius Carvalho

Hello there! I'm using OSIVF with spring in my app. I had it
configured just like examples on the wiki:


hibernateFilter
/app

But I have a few pages that I want to turn it off, is it possible? I
tried before using pattern=*.html and put those pages in a different
path, but I get some errors using *.html.

Best Regards

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



Re: Why Howard choose testNG in tapestry test module

2006-08-22 Thread Vinicius Carvalho

Not better, WAY better! I like Junit and what they've done for the
comunity, but testNG ROCKS!!!

On 8/22/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

Because TestNG is better ;)

On 8/21/06, xVik <[EMAIL PROTECTED]> wrote:
>
>
> Yesterday i reed a last post on Howars's blog about tapestry testing and i
> wonder why he choose tastNG not JUnit?
> --
> View this message in context:
> 
http://www.nabble.com/Why-Howard-choose-testNG-in-tapestry-test-module-tf2144189.html#a5919185
> Sent from the Tapestry - User forum at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.




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



Re: not rendering around window.onload

2006-08-21 Thread Vinicius Carvalho

Thanks for the replies. Actually its not causing problems, I've solved
it by putting it around a window.onload{} and for now its ok,
following the YAGNI principle, it is working :)
I'm using Tap 4.0.2
and I need an onload, because it sets a timer for me, for eg:

function receiveMessages(){
//ajax stuff
setTimeout("receiveMessages()",2000);
}

window.onload= receiveMessages();

But once again, thank you guys for the help :P

Regards

On 8/21/06, andyhot <[EMAIL PROTECTED]> wrote:

Jesse Kuhnert wrote:
> Saying .on= ~will~ blow away other peoples changes.
Of course, that's why i said it's ugly...

But for non dojo, non Tap4.1 cases,
one can easily google for the 4 lines js function that appends stuff to
window.onload
instead of overwriting them...

But anyway, what i would like to know is what Tapestry version
Vinicius uses and why is the  tag causing him problems?
Why must he use window.onload?

--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


-
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: not rendering around window.onload

2006-08-21 Thread Vinicius Carvalho

Well, yeah I though I can use this, but if Tapestry is not adding the
window.onload now, what happens if I have 2 scripts that need to be
loaded on the same time?

does something like this work:

window.onload = function(){
firstScript contribution
}

window.onload = function(){
secondScript contribution
}

Because, I believe that's what you get by using :


window.onload ...


on both of your scripts right?

Regards
On 8/21/06, andyhot <[EMAIL PROTECTED]> wrote:

Vinicius Carvalho wrote:
> Hello there! My script is not rendering it's initialization inside a
> window.onload{}, any ideas what I might be doing wrong?
http://tapestry.apache.org/tapestry4/UsersGuide/script.html#script.initialization
describes this behavior.
window.onload waits for all images to be loaded before getting triggered.
I think Tapestry no longer uses it. It appends that code just before
.
Why is this problematic in your case?

You're also free to set window.onload yourself however...
Either with the ugly

window.onload = function() {
requestMsgs.send("GET",$url,true);
requestMsgs.onReadyStateChange = onMessage;
requestMsgs.send(null);
}


or with dojo.connect or similar utility functions


>
> 
> 
> 
> 
> requestMsgs.send("GET",$url,true);
> requestMsgs.onReadyStateChange = onMessage;
> requestMsgs.send(null);
> 
>
> The JavaScript rendered on the page:
>
> <!--
>
>
>
> var requestMsgs = getRequest();
> function onMessage(){
> if(requestMsgs.readyState == 4){
> var response = requestMsgs.responseText;
> var content = document.getElementById('content');
> content.innerHTML += response;
> }
> setTimeout('onMessage();',2000); //Refresh a cada 2 segundos
> }
>
>
>
> // -->
> <!--
>
> requestMsgs.send("GET",$url,true);
> requestMsgs.onReadyStateChange = onMessage;
> requestMsgs.send(null);
>
>
> // -->
>
> My components inherits from BaseComponent. and has a single line of code:
> 
> just to render the JS
>
> Best regards
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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



not rendering around window.onload

2006-08-21 Thread Vinicius Carvalho

Hello there! My script is not rendering it's initialization inside a
window.onload{}, any ideas what I might be doing wrong?





requestMsgs.send("GET",$url,true);
requestMsgs.onReadyStateChange = onMessage;
requestMsgs.send(null);


The JavaScript rendered on the page:



My components inherits from BaseComponent. and has a single line of code:

just to render the JS

Best regards

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



EngineServices + Links question

2006-08-21 Thread Vinicius Carvalho

Hello there! I need to use asynchronous invocations on my page, XTile
wouldn't do it, because of the complexity of the XML that I need to
return. So I was thinking in create my own service.
I have two situations, a javascript timer that will poll the server in
a regular basis, and a onclick event that will post modifications
(Yes, it is a chat based app). I already have the whole thing
implemented with jsp-servlets, just porting it :P

I'm just confused on how do I create the urls for my pages? let's say:

public void onMessageSend(IRequestCycle cycle){
//Get parameters, assemble an message and store it on messageQueue
}

public void onMessageRequest(IRequestCycle cycle){
//getMessages from queue and store them on the cycle
}

public class ChatService implements IEngineService{
public void service(IRequestCycle cycle){
//convert the object on the cycle into XML, change the response
header and flush it :P
}
}

So, my questions are:

1st: How to build the urls (they are gonna be on a javascript)
2nd: Where to store the values on the cycle? cycle.setParameters?

Best Regards

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



Re: Tapestry with Hibernate vs JSF with Hibernate (Object binding question)

2006-08-21 Thread Vinicius Carvalho

Sorry for the delay. Well, object equals and hashcodes are fully
implemented. What solved the problem was setting the property
persistent, which I really did no liked :(

When using a volatile property, tapestry is overwriting the objects,
by fresh new ones, filled only with forms values (as I said, there are
some properties that are not displayed for the user but important).

When switch to a persistent object (session bound) it preserves the
values, changing only the ones that changed

This is kinda awkward, I solved using a persistent strategy due the
lack of time of the project, but I really would like to check it
deeper, as I'd not like to have a lot of objects floating around my
session.

Best regards

On 8/19/06, Ryan Holmes <[EMAIL PROTECTED]> wrote:

Just to clarify, Tapestry does not overwrite bound objects with new
instances. iow, if a bound value is a Hibernate proxy, that's what
you'll get -- for better or worse ;)

-Ryan

On Aug 19, 2006, at 7:20 AM, Vinicius Carvalho wrote:

> Hello there! As I said on previous emails, I'm migrating a JSF app to
> tapestry, I'm about to finish. One thing that is really tricking me is
> the way that the Hibernate entities are bound on both frameworks (I
> might being doing something wrong here).
>
> My edit page has an object (Event) that has a many-to-one relationship
> to User, so on the same screen I add/edit an user and an event.
>
> Well on the JSF, when I hit the service  layer (both apps share the
> same model desing, with same entities and spring transaction managed
> classes) the Event has an user (that is a EnhancedByCGLIB user) with
> all it's original values (even those that are not displayed to the
> user on the screen), so calling: eventDAO.update(event), updates my
> user as well.
>
> On Tapestry side, hitting the service layer, the Event has a User
> (POJO) and all other values have just gone, it seems that tapestry,
> when binding it's values it does something like this:
>
> User user = new User();
> ... //set properties present on the screen, dump all other from
> database
> event.setUser(user);
>
> This not only mess my database, but also makes hibernate to create a
> new user for my event, instead of updating an existing one.
>
> Well, I'm pretty sure I'm doing stupid things here, could anyone
> help me out?
>
> Best Regards
>
> Vinicius
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Ryan Holmes, CISSP

[EMAIL PROTECTED]
ph. (213) 626-0026



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



Tapestry with Hibernate vs JSF with Hibernate (Object binding question)

2006-08-19 Thread Vinicius Carvalho

Hello there! As I said on previous emails, I'm migrating a JSF app to
tapestry, I'm about to finish. One thing that is really tricking me is
the way that the Hibernate entities are bound on both frameworks (I
might being doing something wrong here).

My edit page has an object (Event) that has a many-to-one relationship
to User, so on the same screen I add/edit an user and an event.

Well on the JSF, when I hit the service  layer (both apps share the
same model desing, with same entities and spring transaction managed
classes) the Event has an user (that is a EnhancedByCGLIB user) with
all it's original values (even those that are not displayed to the
user on the screen), so calling: eventDAO.update(event), updates my
user as well.

On Tapestry side, hitting the service layer, the Event has a User
(POJO) and all other values have just gone, it seems that tapestry,
when binding it's values it does something like this:

User user = new User();
... //set properties present on the screen, dump all other from database
event.setUser(user);

This not only mess my database, but also makes hibernate to create a
new user for my event, instead of updating an existing one.

Well, I'm pretty sure I'm doing stupid things here, could anyone help me out?

Best Regards

Vinicius

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



Re: new dojo table widget

2006-08-17 Thread Vinicius Carvalho

Really cool! I was waiting for this kind of component :) Thanks!



On 8/17/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

http://blog.dojotoolkit.org/2006/08/17/new-widget-filteringtable

This is probably the version I'll be adding into Tapestry eventually. I
thought Drew would get a kick out of knowing that the bindings for
columns/fields are now sporting a cool new "ognl" like syntax in for
javascript json objects. (Don't worry, it's not what it sounds like...It's
all done in a very performant way because it's much more natural to the
language than it is in java).

This one is particularly exciting for me as the widget was developed on a
project we were both on so I'm fairly familiar with it. (I think I also made
the request for ognl-like syntax..but I didn't call it that at the time ;) )


--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.




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



Re: Xerces version

2006-08-16 Thread Vinicius Carvalho

Yes Jesse sorry, the DB is quite something :D, but almost every
java/jee app writen by them is a crap (bc4j, adf, as, process manager,
sso, jdeveloper)

On 8/16/06, James Carman <[EMAIL PROTECTED]> wrote:

We've (the HiveMind team) had a lot of trouble with OC4J.  So, I feel your
pain!

-Original Message-
From: Vinicius Carvalho [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 16, 2006 1:46 PM
To: Tapestry users
Subject: Re: Xerces version

Hello folks, thanks for all the help. Well I'm using the 10.1.3
version of AS, I believe that is the latest version, and even that is
buggy :(

I believe (not sure, because I haven't checked) that Oracle is not
replacing the parser, even though I'm setting it on the properties of
my app. I'll do a stupid-lazy approach, and debug the hivemind code to
see which parser is being injected.

Thanks for all the help, I'll keep you guys informed.

Jesse, thanks, as soon as I find a way out, It would be my pleasure to
post every step for a FAQ (although I think the better solution is: do
not use oracle products, they are buggy, and unstable ;) )

On 8/16/06, Javier Sanchez <[EMAIL PROTECTED]> wrote:
> .. and I really don't recommend to just replace the XML jars.  I tried
> to do that and other components of OC4J got problems.  It's better to
> migrate to a new release.
>
> JAVIER SANCHEZ
> CIO EDESA S.A.
> Bogota, Colombia
>
> On 8/16/06, Javier Sanchez <[EMAIL PROTECTED]> wrote:
> > This issue is already on http://wiki.apache.org/tapestry/Gotchas
> >
> > The first version of OC4J I tried was 9.0.4.   Every version of OAS
> > 10g since 10.1.2 have the XML parser fixed.
> >
> > My application is still using T3, so I really don't know if T4 could
> > still have problems with OC4J. I recommend to migrate to the last
> > release, 10.1.3
> >
> > JAVIER SANCHEZ
> > CIO EDESA S.A.
> > Bogota, Colombia
> >
> > On 8/16/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > > Can you post back to the list with the correct version of xerces (and
the
> > > exact version of oracle j2ee used) so that I can add a FAQ entry for
this?
> > >
> > > On 8/16/06, yesidredondo <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Yes Vinicius, you've got to change the xerces jar too, i'm going to
send
> > > > you
> > > > the xercesImpl that worked for me when deploying the app in OAS 10G.
> > > >
> > > > Ing. Hermann Yesid Redondo Eslava
> > > > IT-GROUP LTDA
> > > >
> > > > -- Original Message ---
> > > > From: "Vinicius Carvalho" <[EMAIL PROTECTED]>
> > > > To: "Tapestry users" 
> > > > Sent: Wed, 16 Aug 2006 12:12:35 -0300
> > > > Subject: Xerces version
> > > >
> > > > > Hello there! I'm still having big problems with the crap oc4j
server.
> > > > > I've tried to change the xml parser, but Hivemind is still
throwing
> > > > > errors...
> > > > >
> > > > > Here's my lib versions:
> > > > >
> > > > > Tapestry 4.0.2
> > > > > Hivemind 1.1.1
> > > > > Xerces 2.8.0
> > > > > xml-apis 1.3.03b
> > > > >
> > > > > I'm wondering if now the problem is the xerces version...
> > > > >
> > > > > Any help would be most appreciated
> > > > >
> > > > > Best regards
> > > > >
> > > > >
-
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > --- End of Original Message ---
> > > >
> > > >
> > > >
-
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind.
> > >
> > >
> >
>
> -
> 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]




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



Re: Xerces version

2006-08-16 Thread Vinicius Carvalho

Hello folks, thanks for all the help. Well I'm using the 10.1.3
version of AS, I believe that is the latest version, and even that is
buggy :(

I believe (not sure, because I haven't checked) that Oracle is not
replacing the parser, even though I'm setting it on the properties of
my app. I'll do a stupid-lazy approach, and debug the hivemind code to
see which parser is being injected.

Thanks for all the help, I'll keep you guys informed.

Jesse, thanks, as soon as I find a way out, It would be my pleasure to
post every step for a FAQ (although I think the better solution is: do
not use oracle products, they are buggy, and unstable ;) )

On 8/16/06, Javier Sanchez <[EMAIL PROTECTED]> wrote:

.. and I really don't recommend to just replace the XML jars.  I tried
to do that and other components of OC4J got problems.  It's better to
migrate to a new release.

JAVIER SANCHEZ
CIO EDESA S.A.
Bogota, Colombia

On 8/16/06, Javier Sanchez <[EMAIL PROTECTED]> wrote:
> This issue is already on http://wiki.apache.org/tapestry/Gotchas
>
> The first version of OC4J I tried was 9.0.4.   Every version of OAS
> 10g since 10.1.2 have the XML parser fixed.
>
> My application is still using T3, so I really don't know if T4 could
> still have problems with OC4J. I recommend to migrate to the last
> release, 10.1.3
>
> JAVIER SANCHEZ
> CIO EDESA S.A.
> Bogota, Colombia
>
> On 8/16/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > Can you post back to the list with the correct version of xerces (and the
> > exact version of oracle j2ee used) so that I can add a FAQ entry for this?
> >
> > On 8/16/06, yesidredondo <[EMAIL PROTECTED]> wrote:
> > >
> > > Yes Vinicius, you've got to change the xerces jar too, i'm going to send
> > > you
> > > the xercesImpl that worked for me when deploying the app in OAS 10G.
> > >
> > > Ing. Hermann Yesid Redondo Eslava
> > > IT-GROUP LTDA
> > >
> > > -- Original Message ---
> > > From: "Vinicius Carvalho" <[EMAIL PROTECTED]>
> > > To: "Tapestry users" 
> > > Sent: Wed, 16 Aug 2006 12:12:35 -0300
> > > Subject: Xerces version
> > >
> > > > Hello there! I'm still having big problems with the crap oc4j server.
> > > > I've tried to change the xml parser, but Hivemind is still throwing
> > > > errors...
> > > >
> > > > Here's my lib versions:
> > > >
> > > > Tapestry 4.0.2
> > > > Hivemind 1.1.1
> > > > Xerces 2.8.0
> > > > xml-apis 1.3.03b
> > > >
> > > > I'm wondering if now the problem is the xerces version...
> > > >
> > > > Any help would be most appreciated
> > > >
> > > > Best regards
> > > >
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > --- End of Original Message ---
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind.
> >
> >
>

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



Xerces version

2006-08-16 Thread Vinicius Carvalho

Hello there! I'm still having big problems with the crap oc4j server.
I've tried to change the xml parser, but Hivemind is still throwing
errors...

Here's my lib versions:

Tapestry 4.0.2
Hivemind 1.1.1
Xerces 2.8.0
xml-apis 1.3.03b

I'm wondering if now the problem is the xerces version...

Any help would be most appreciated

Best regards

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



contrib:Table changing the header

2006-08-16 Thread Vinicius Carvalho

Hello there! I know we can define that to render in our columns unsing
a block component named [id]ColumnValue (thanks to the list). What I
need now is to override the header for those columns. I have a column
that has checkboxes, in its header I'd like to have (instead of a
title) a checkbox, for a select-all action.

Is this possible?

Best regards

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



Re: Help with Tapestry application [Kinda urgent, please read]

2006-08-16 Thread Vinicius Carvalho

Well, it was not the XML parser :( I've changed the xml parser on
oracle, for the chat application (using xerces instead of oracle XML)
but the error persists, any ideas please?

Best regards

On 8/14/06, Jan Vissers <[EMAIL PROTECTED]> wrote:

If it is the Oracle XML Parser that is giving you trouble,
you could check out the Oracle documentation to override
their prepackaged XML stuff and plugin your own:

This is for 10.1.3 (which your are using)

**Removing and/or Replacing an Oracle Shared Library Imported by Default**
http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14433/classload.htm#sthref74

**Example: Replacing the Oracle XML Parser with the Xerces Parser**
http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14433/classload.htm#CIHFJEEF



Vinicius Carvalho wrote:
> Hello there! I got stuck in a dead corner. Allow me to put some
> background info here:
> I work in a mid-size company (70-80 developers) and we are moving
> towards a new framework as standard for our applications.
> We used to be Oracle partners (thanks God, we just moved to IBM
> solutions) but we still have a lot of costumers running OC4J
> (10.1.2/10.1.3 mostly).
> We had a small app, that took 4 months for 2 junior developers to
> build (using JSF), but the app had so many problems, that last week, I
> challenged my manager: "I'll rewrite this entire app in Tapestry in
> less than 2 weeks", in exchange I asked the change to present tapestry
> as our default framework for our applications, and I'd even provide
> some training for our developers.
> Ok have said that, I was developing the app on a tomcat 5.5.17 server
> and everything was ok. When I first tried to deploy it on AS 10.1.2 I
> got a hivemind error (Issue 166), I have post it on the hivemind list
> and folks there gave me some hints. But reading through I had seen
> that the problem was gone with AS 10.1.3. So we contacted our customer
> and he said that they had a 10.1.3 installation running. I thought all
> my problems were solved. But when I deployed it, I got the exception
> shown below.
> I'm tapestry 4.0 downloaded using maven at ibiblio's repository. I
> believe that Hivemind version bundled is 1.1.
>
> I really would like some help here, I might even pay for it (It's
> gonna come from my own pocket but we may find a way to pay the
> interested through western-union, paypal, a book as gift, dunno)
>
> What I really don't want to see is people do not believing in Tapestry
> (which gave me a HUGE productivity) and now, just because Oracle (damn
> you all) can't produce quality products, risk the chance of having
> Tapestry as our default framework for web apps.
>
> Thanks all
>
> Regards
>
> [The Stack]
> org.apache.hivemind.ApplicationRuntimeException: Unable to construct
> service tapestry.init.ApplicationSpecificationInitializer: Error
> building service tapestry.init.ApplicationSpecificationInitializer:
> Error at
> 
code-source:/java/servers/oc4j-10.1.3/j2ee/home/applications/chat/chat/WEB-INF/lib/tapestry-4.0.jar!META-INF/tapestry.init.xml,
>
> line 46, column 89: Service interceptor factory
> hivemind.LoggingInterceptor failed to create
> org.apache.tapestry.parse.ISpecificationParser interceptor for service
> tapestry.parse.SpecificationParser as class
> $ISpecificationParser_10cfdcf2043: argument type mismatch
> 
[code-source:/java/servers/oc4j-10.1.3/j2ee/home/applications/chat/chat/WEB-INF/lib/tapestry-4.0.jar!META-INF/tapestry.init.xml,
>
> line 42, column 21]
>   at
> 
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation(AbstractServiceModelImpl.java:165)
>
>   at
> 
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServiceImplementation(AbstractServiceModelImpl.java:139)
>
>   at
> 
org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualServiceImplementation(SingletonServiceModel.java:68)
>
>   at
> 
$ApplicationInitializer_10cfdcf2036._service($ApplicationInitializer_10cfdcf2036.java)
>
>   at
> 
$ApplicationInitializer_10cfdcf2036.initialize($ApplicationInitializer_10cfdcf2036.java)
>
>   at
> 
$ApplicationInitializer_10cfdcf2035.initialize($ApplicationInitializer_10cfdcf2035.java)
>
>   at
> 
$ApplicationInitializer_10cfdcf2039.initialize($ApplicationInitializer_10cfdcf2039.java)
>
>   at
> 
$ApplicationInitializer_10cfdcf202c.initialize($ApplicationInitializer_10cfdcf202c.java)
>
>   at
> 
$ApplicationInitializer_10cfdcf202b.initialize($ApplicationInitializer_10cfdcf202b.java)
>
>   at
> 
org.apache.tapestry.ApplicationServlet.initializeApplication(ApplicationServlet.java

Help with Tapestry application [Kinda urgent, please read]

2006-08-14 Thread Vinicius Carvalho

Hello there! I got stuck in a dead corner. Allow me to put some
background info here:
I work in a mid-size company (70-80 developers) and we are moving
towards a new framework as standard for our applications.
We used to be Oracle partners (thanks God, we just moved to IBM
solutions) but we still have a lot of costumers running OC4J
(10.1.2/10.1.3 mostly).
We had a small app, that took 4 months for 2 junior developers to
build (using JSF), but the app had so many problems, that last week, I
challenged my manager: "I'll rewrite this entire app in Tapestry in
less than 2 weeks", in exchange I asked the change to present tapestry
as our default framework for our applications, and I'd even provide
some training for our developers.
Ok have said that, I was developing the app on a tomcat 5.5.17 server
and everything was ok. When I first tried to deploy it on AS 10.1.2 I
got a hivemind error (Issue 166), I have post it on the hivemind list
and folks there gave me some hints. But reading through I had seen
that the problem was gone with AS 10.1.3. So we contacted our customer
and he said that they had a 10.1.3 installation running. I thought all
my problems were solved. But when I deployed it, I got the exception
shown below.
I'm tapestry 4.0 downloaded using maven at ibiblio's repository. I
believe that Hivemind version bundled is 1.1.

I really would like some help here, I might even pay for it (It's
gonna come from my own pocket but we may find a way to pay the
interested through western-union, paypal, a book as gift, dunno)

What I really don't want to see is people do not believing in Tapestry
(which gave me a HUGE productivity) and now, just because Oracle (damn
you all) can't produce quality products, risk the chance of having
Tapestry as our default framework for web apps.

Thanks all

Regards

[The Stack]
org.apache.hivemind.ApplicationRuntimeException: Unable to construct
service tapestry.init.ApplicationSpecificationInitializer: Error
building service tapestry.init.ApplicationSpecificationInitializer:
Error at 
code-source:/java/servers/oc4j-10.1.3/j2ee/home/applications/chat/chat/WEB-INF/lib/tapestry-4.0.jar!META-INF/tapestry.init.xml,
line 46, column 89: Service interceptor factory
hivemind.LoggingInterceptor failed to create
org.apache.tapestry.parse.ISpecificationParser interceptor for service
tapestry.parse.SpecificationParser as class
$ISpecificationParser_10cfdcf2043: argument type mismatch
[code-source:/java/servers/oc4j-10.1.3/j2ee/home/applications/chat/chat/WEB-INF/lib/tapestry-4.0.jar!META-INF/tapestry.init.xml,
line 42, column 21]
  at 
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation(AbstractServiceModelImpl.java:165)
  at 
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServiceImplementation(AbstractServiceModelImpl.java:139)
  at 
org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualServiceImplementation(SingletonServiceModel.java:68)
  at 
$ApplicationInitializer_10cfdcf2036._service($ApplicationInitializer_10cfdcf2036.java)
  at 
$ApplicationInitializer_10cfdcf2036.initialize($ApplicationInitializer_10cfdcf2036.java)
  at 
$ApplicationInitializer_10cfdcf2035.initialize($ApplicationInitializer_10cfdcf2035.java)
  at 
$ApplicationInitializer_10cfdcf2039.initialize($ApplicationInitializer_10cfdcf2039.java)
  at 
$ApplicationInitializer_10cfdcf202c.initialize($ApplicationInitializer_10cfdcf202c.java)
  at 
$ApplicationInitializer_10cfdcf202b.initialize($ApplicationInitializer_10cfdcf202b.java)
  at 
org.apache.tapestry.ApplicationServlet.initializeApplication(ApplicationServlet.java:299)
  at 
org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:198)
  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.loadServlet(HttpApplication.java:2231)
  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.findServlet(HttpApplication.java:4617)
  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.findServlet(HttpApplication.java:4541)
  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:3232)
  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:740)
  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.run(H

Tapestry [Hivemind] and OC4J another issue.

2006-08-11 Thread Vinicius Carvalho

Hello there! I was reading the Hivemind list (I have event post there)
and it's a known bug in OC4J 10.1.2 (Issue 166 I believe), that
hivemind needs a hack to work with 10.1.2, but folks said that it
works with 10.1.3. Well I've upgraded to 10.1.3 and I'm getting an
error:

org.apache.hivemind.ApplicationRuntimeException: Unable to construct
service tapestry.init.ApplicationSpecificationInitializer: Error
building service tapestry.init.ApplicationSpecificationInitializer:
Error at 
code-source:/java/servers/oc4j-10.1.3/j2ee/home/applications/chat/chat/WEB-INF/lib/tapestry-4.0.jar!META-INF/tapestry.init.xml,
line 46, column 89: Service interceptor factory
hivemind.LoggingInterceptor failed to create
org.apache.tapestry.parse.ISpecificationParser interceptor for service
tapestry.parse.SpecificationParser as class
$ISpecificationParser_10cfdcf2043: argument type mismatch
[code-source:/java/servers/oc4j-10.1.3/j2ee/home/applications/chat/chat/WEB-INF/lib/tapestry-4.0.jar!META-INF/tapestry.init.xml,
line 42, column 21]
at 
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation(AbstractServiceModelImpl.java:165)
at 
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServiceImplementation(AbstractServiceModelImpl.java:139)
at 
org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualServiceImplementation(SingletonServiceModel.java:68)
at 
$ApplicationInitializer_10cfdcf2036._service($ApplicationInitializer_10cfdcf2036.java)
at 
$ApplicationInitializer_10cfdcf2036.initialize($ApplicationInitializer_10cfdcf2036.java)
at 
$ApplicationInitializer_10cfdcf2035.initialize($ApplicationInitializer_10cfdcf2035.java)
at 
$ApplicationInitializer_10cfdcf2039.initialize($ApplicationInitializer_10cfdcf2039.java)
at 
$ApplicationInitializer_10cfdcf202c.initialize($ApplicationInitializer_10cfdcf202c.java)
at 
$ApplicationInitializer_10cfdcf202b.initialize($ApplicationInitializer_10cfdcf202b.java)
at 
org.apache.tapestry.ApplicationServlet.initializeApplication(ApplicationServlet.java:299)
at 
org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:198)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.loadServlet(HttpApplication.java:2231)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.findServlet(HttpApplication.java:4617)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.findServlet(HttpApplication.java:4541)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:3232)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:740)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at 
oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at 
oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
at 
oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
at 
oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.hivemind.ApplicationRuntimeException: Error
building service tapestry.init.ApplicationSpecificationInitializer:
Error at 
code-source:/java/servers/oc4j-10.1.3/j2ee/home/applications/chat/chat/WEB-INF/lib/tapestry-4.0.jar!META-INF/tapestry.init.xml,
line 46, column 89: Service interceptor factory
hivemind.LoggingInterceptor failed to create
org.apache.tapestry.parse.ISpecificationParser interceptor for service
tapestry.parse.SpecificationParser as class
$ISpecificationParser_10cfdcf2043: argument type mismatch
[code-source:/java/servers/oc4j-10.1.3/j2ee/home/applications/chat/chat/WEB-INF/lib/tapestry-4.0.jar!META-INF/tapestry.init.xml,
line 42, column 21]
at 
org.apache.hivemind.impl.InvokeFactoryServiceConstructor.constructCoreServiceImplementation(InvokeFactoryServiceConstructor.java:88)
at

Re: Checkbox inside contrib:table (again)

2006-08-11 Thread Vinicius Carvalho

Thanks a lot Robert

On 8/10/06, Murray Collingwood <[EMAIL PROTECTED]> wrote:

I didn't realise you could code the @Block outside the table...

My mistake.

Cheers
mc


On 10 Aug 2006 at 16:14, [EMAIL PROTECTED] wrote:

> On Fri, Aug 11, 2006 at 08:26:51AM +1000, Murray Collingwood wrote:
> > When you are using the contrib:Table you specify the columns parameter for 
each column to
> > appear in your table.  I think you understand this but you haven't 
mentioned much detail.
> >
> > So, in Robert's example there are 3 columns defined.  By default each 
column will be
> > populated with data from that property as each row is processed.  Is this 
working for you.
> > You haven't mentioned but I will again assume this is working.
> >
> > Next, you want to add or replace a column with a checkbox.  You then code 
the
> >  Something else
> > to specify the replacement column value for this property (that is the 
property is no longer
> > displayed and in it's place something else is inserted).
> >
> > Robert's example closed the table too early, however that it easily 
corrected and we can
> > expand it to include some other parameters.  Something like:
>
> 2 notes here:
>   1) I forgot to put the source attribute in my example, as you noticed.
>   :)
>   2) The block's don't have to be enclosed within the table component.
>   They can come before the table, or after it, or wherever. :)
>
> Robert
>
> >
> >  >   source="ognl:myCollectionOfValues" row="ognl:currRow">
> >
> >  
> > >  selected="ognl:currRow.baz" /> Baz
> >  
> >
> > 
> >
> > Maybe this will work for you.
> >
> > Cheers
> > mc
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



FOCUS Computing - web design
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au




--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.9/416 - Release Date: 10/08/2006


-
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: Checkbox inside contrib:table (again)

2006-08-10 Thread Vinicius Carvalho

Sorry taking so long, I was busy with my datetime component, almost
ready, hope post it here soon :)

That did not work, could you post a more clear explanation? maybe a
full example if its not asking much

On 8/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:




   Baz


Robert


> Hello there! I've searched the list I got very surprised on how many
> questions about this subject, and how many psychedelic answers.
> Is there an easy (hack free) way to add a checkbox to a table
> component? Is there a good example? Would there be a good soul to give
> it, maybe contribute to wiki?
>
> Best regards
>
> -
> 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]



Contrib:Table problems with layout

2006-08-10 Thread Vinicius Carvalho

Hello there! *I've seen some discussions regarding this topic but
didn't find one that could help* I was having problems with the layout
of my table, but I was ignoring, thinking that might have been a tag
opened that I left open. Today I look it closer and found out that
seems to be a bug. My page uses a template with
renderbody/renderblock, it's something like this., really simple:





//header goes here






That's it for the template. The page I insert the table has a table and a form:



 ...





What's happening is that the contrib table is being displayed totally
out of place, on the right side of the page.
I've replaced the dynamic generated table by a static one, and It is
laid on the correct place.

Any ideas?

PS:Hope get some answers on this post (after so many empty :( ) :P

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



Question about validation

2006-08-10 Thread Vinicius Carvalho

Hello there! I'm having problems with validators...

First, my page is not validating required fields anymore (at least not
when I set a new ValidationDelegate):

public class CustomDelegate extends ValidationDelegate {

public void writeAttributes(IMarkupWriter writer, IRequestCycle
cycle, IFormComponent component, IValidator validator) {
if(isInError()){
writer.attribute("style", 
"border:thin;border-color:#FF;");
}
}
}






Also, I'm recording an error on my custom component using:

getForm().getDelegate().record(this,
getPage().getMessages().getMessage("error.invalid.time"));

And on my Page listener method I use:

alidationDelegate delegate = (ValidationDelegate)
getBeans().getBean("customDelegate");
if(delegate.isInError()){
return null;
}

But delegate.isInError() is returning false. All my fields are
required, and even if I don't write anything on them, I still can't
get an error.

Any ideas?

Regards

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



Component Design questions

2006-08-10 Thread Vinicius Carvalho

Hello there! First, I'm sorry about the previous e-mail, I really
thought that the name was being duplicated :(. Sorry for the spam

 I got stuck into a problem here. I'm building my datetime component.
First I thought using a template for it, but later I figured that I
needed to extend AbstractFormComponent, and this can not have a
template right?
This is how my component looks like:


Simple Date and Time Component

 
   
 The name of the field, which may be used by a FieldLabel.
   
 
 
 
 
 



 
 


 
 


 
 

 
 

 
 
 


Ok, as you can see my component is composed of 4 other components, I
thought that would be easier than write them all using IRequestWriter
(mostly the PropertySelection ones :P )

But that was working fine for a component with a template, I've faced
some problems with this new approach, the first is the way I render
the component:

protected void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle) {
if(getValue() != null){
assignValues();
}
Iterator it = getComponents().keySet().iterator();
while(it.hasNext()){
IComponent component = 
(IComponent)getComponents().get(it.next());
component.render(writer, cycle);
}
}
Well it does render the components, but I'd like to add some informal
parameters for each (like style, size, min/max lengths)
So here goes the first question, how do I do this?

Second is regarding the rewindFormComponent phase:

protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle) {
GregorianCalendar cal = new
GregorianCalendar(Integer.parseInt(getSelectedYear()),Integer.parseInt(getSelectedMonth()),Integer.parseInt(getSelectedDay()),Integer.parseInt(getInputHour()),Integer.parseInt(getInputMinute()));
setValue(cal);
}

Well, this does not work, I was expecting the abstract getters to be
filled by my component, of course I was wrong, misunderstood the whole
component life-cycle (again :P ).

Now I'm facing another huge problem (at least on my point of view)
I've changed the method to this:

protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle) {
String day = cycle.getParameter(getComponent("days").getId());
String month = 
cycle.getParameter(getComponent("months").getId());
String year = 
cycle.getParameter(getComponent("months").getId());
String hour = cycle.getParameter(getComponent("hours").getId());
String minute = 
cycle.getParameter(getComponent("minutes").getId());
}

Having two of this components on my pages gives me twice nested
components like (days, days_0, months, months_0 and so on). So I tried
the method above hopping that for each component, I could set the
correct value. Once again I was wrong, What I get now is:
Rewind of form cadastrarEvento/cadastroForm expected allocated id #7
to be 'days', but was 'dataTermino' (requested by component
cadastrarEvento/dataTermino).
Well, to explain, my dateTime component (I have two on the page, the
first is called dataInicio and the second DataTermino) I guess I had a
problem when trying to rewind the second component, it seems that my
nested components got the ID that the parent had.

So this is the second question, how do I solve this?

Please any directions would be mostly appreciated

Best regards

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



Re: Dynamic name for components

2006-08-09 Thread Vinicius Carvalho

Sorry for this,  my mistake, tapestry is already adding a _# as suffix
of each component. I Was in such a rush that did not see it :P

Sorry for the inconvenience

On 8/9/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:

Hello there! I have a component (datetime) which has nested components on it:

http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>


Simple Date and Time Component

  
  



  
  


  
  


  
  

  
  

  
  
  


Well, it is *almost* working :) The problem is when I add more then
one component on the screen, as you can see, the nested components
(textfields and PropertySelecions) will have the same name. I tried to
use ognl on the first nested component so I could generate a unique
name for it, but the method is never called.

I'd like to know if it is possible to change those nested component
names in a dynamic way.

Best Regards

PS: I really need this stuff, if someone cares to give me a hand, we
are in a deadline here :(



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



Dynamic name for components

2006-08-09 Thread Vinicius Carvalho

Hello there! I have a component (datetime) which has nested components on it:

http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>


Simple Date and Time Component

 
 



 
 


 
 


 
 

 
 

 
 
 


Well, it is *almost* working :) The problem is when I add more then
one component on the screen, as you can see, the nested components
(textfields and PropertySelecions) will have the same name. I tried to
use ognl on the first nested component so I could generate a unique
name for it, but the method is never called.

I'd like to know if it is possible to change those nested component
names in a dynamic way.

Best Regards

PS: I really need this stuff, if someone cares to give me a hand, we
are in a deadline here :(

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



Creating a dateTime component

2006-08-09 Thread Vinicius Carvalho

Hello there folks. I need to create a datetime component composed of
textfields and selects (text for hours, and selects for
days/months/years).
What's really tricking me is how can I be able to convert 5 fields
into a date object? My first Idea was to create a
AbstractFormComponent and user the writer to write everything, but it
occurred to me that use a html template like this:



And on my component I'd provide the models for everything. But how to
bind 5 fields into one object?

Could someone point me the directions, I promise as soon I finish it
I'll post it here, I believe its an good addition to the framework (if
it don't stinks too much).

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



Checkbox inside contrib:table (again)

2006-08-08 Thread Vinicius Carvalho

Hello there! I've searched the list I got very surprised on how many
questions about this subject, and how many psychedelic answers.
Is there an easy (hack free) way to add a checkbox to a table
component? Is there a good example? Would there be a good soul to give
it, maybe contribute to wiki?

Best regards

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



Re: Bypassing validation

2006-08-08 Thread Vinicius Carvalho

Well, I had a real simple scenario, it's a master-detail page. I have
a form where user inputs new data, and I have three submit buttons:
New -> Sets the object to a new instance and goes back to the page
Save -> Saves the object on a db
Delete selection -> Removes objects selected in a table component that
lies below the input form

The only one that needs validation is the Save. The delete for
example, its used to get all the check boxes that were marked in order
to remove them, the user then, does not need to input any data, so
validation should be skipped.

Is it possible to avoid the validation? I didn't quite understand you
last post, hence I'm describing the scenario. Is there a jsf like
immediate trick?

Regards

On 8/8/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

Validation doesn't really have any direct correlation to methods currently.
(I don't think) Your listener method invocations are viewed as side effects
of the components that contain them. (Like Submit or Form )

If you really had to do it you might be able to figure something out via a
combination of @Submit using parameters and a custom ValidationDelegate.

I've also added a new "extension" point in tapestry 4.1 that allows you to
add additional behaviour to components with contributed
http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/services/ComponentRenderWorker.html

classes.

I didn't really create them for this purpose, but it might be able to do
what you want.

On 8/7/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>
> Hello there! I was wondering if it is possible to bypass validation
> for some listeners? I have a form with multiple listeners. I'd like to
> have validation for some of them and others not. Is this possible?
>
> Regards
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.




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



Bypassing validation

2006-08-07 Thread Vinicius Carvalho

Hello there! I was wondering if it is possible to bypass validation
for some listeners? I have a form with multiple listeners. I'd like to
have validation for some of them and others not. Is this possible?

Regards

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



Re: Securing Tapestry Applications

2006-07-10 Thread Vinicius Carvalho

James, great work, I just cheked the tapestry-acegi, really a good
adition to us, thanks again :)

On 7/10/06, James Carman <[EMAIL PROTECTED]> wrote:

You can use tapestry-acegi for #1 and #2 right now.  All you have to do is
annotate your page class with the @Secured annotation (from Acegi).

@Secured("ROLE_ADMIN")
public abstract class AdminPage extends BasePage
{
}

The tapestry-acegi library is available via SVN from:

http://svn.javaforge.com/svn/tapestry/tapestry-acegi/trunk

You can use anonymous/anon for the username/password.  As far as #3 is
concerned, you can use Acegi's domain security to do what you want (as was
mentioned by others).


-Original Message-
From: Jim Steinberger [mailto:[EMAIL PROTECTED]
Sent: Monday, July 10, 2006 6:01 AM
To: Tapestry users
Subject: Securing Tapestry Applications

Hey all,



I'm listing just a few security issues and possible solutions below.
For the benefit of all, by all means challenge my assumptions, and add
your own problems.  But please at least consider my Problem 3 listed
below, as I'm very curious as to whether someone's found a better
elegant solution.





Problem 1:  Protecting pages from being accessed anonymously



In other words, unless the user is logged in, they should not have
access to any page other than, most likely, your login-page.



A common solution is to create an abstract superclass for your pages
that, in its pageBeginRender listener, redirects to the login page if
there isn't, for example, a User ASO present.





Problem 2:  Protecting different pages from different logged-in users



This is really just a more-specific version of Problem 1, and you could
use a more-specific version of the solution: create an abstract
superclass that subclasses the superclass from Problem 1 that checks to
ensure that the user is a specific user.



This can be hard to maintain, though, especially if your various pages
can be accessed by various combinations of user-types.  E.g. you don't
want to have to create superclass protection-page for every combination
of user-types in your system.  Better to, instead, assign a set of
accesses/permissions to your users, and protecting your pages based on
the presence/absence of a specific access, which could be assigned to
multiple user-types.



You also might consider working something like Acegi security into your
system, which can protect a method based on whether a given
role/permission exists.  Google revealed at least one project with this
approach: http://www.carmanconsulting.com/tapestry-acegi





Problem 3:  Protecting the application from logged-in users who are
spoofing form parameters



So, you've ensured that the only users accessing your system have valid
accounts, and are only accessing the pages and interfaces you've given
them.



Well, what if they're malicious, after all, and know how a Tapestry URL
works?  They see that when selecting an Entity to edit from a list, that
the URLs differ like so: "...sp=1...", "...sp=2...", "...sp=5...", etc.
Correctly guessing that's the ID of the corresponding Entity, the user
spoofs the URL to be "...sp=10...".  Obviously, they should have
permission to edit Entities, since they need to be able to edit their
own Entities, so this page renders correctly.  i.e. even with Problems 1
and 2 solved, there is still the issue of the user being able to modify
data for other users.



We could have our listener method first call an appropriate service
method that determines, in the example above, whether the logged-in user
has permission to edit the given entity.



However, we don't want to violate the DRY principle: if there are
multiple places where a given Entity can be selected for editing, we
would have to add this check in each place.



Is AOP a solution?  Through AOP/Acegi/Spring, you could wrap advice
around your service methods that has access to the
currently-logged-in-user.  This would be perfect if you were only
verifying the type of the user, but in this case we're determining
validity based on the values of the given method-parameters.  Most
service methods will require a different query/method for determining if
the user and the given parameters are a "match", so this would probably
end up requiring a different Aspect for each method, which doesn't
really gain us much.



So ... the best I can come up with at the moment is to pass the User
object into the service methods that need to be protected, and doing the
check inside the method.  Persistence layers should perform individual
units of work, relatively agnostic to what environment it exists in.
The service layer, however, is for business logic, and it's certainly
business logic to declare that a user can only edit the Entities that it
owns.  And since the User object should be a POJO that is not Tapestry
specific, this doesn't tie the service layer to a particular
UI-implementation.  Further, you're defining this logic in only one
place, and your compiler will remind you in each