How to custom the script event.

2006-10-26 Thread Jun Tsai

I find tapestry produce the script

dojo.event.connect(window, 'onload', function(e) {
 dojo.require(tapestry.form);tapestry.form.registerForm(AForm);

});


I want to do something after onload.but I find
dojo.event.connect(after,window,'onload',this,testFun));

I find my testFun function called before tapestry onload function.

If I change tapestry onload as
dojo.event.connect(before,window, 'onload', function(e) {

  dojo.require(tapestry.form);tapestry.form.registerForm(AForm);
   
});

works fine.

How to custome this?




--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net


Upload file size limit in 4.0.2

2006-10-26 Thread Christian Haselbach
Hello,

we wanted the set the file size limit for upload files to
a different value, but this is not possible as noted in
the following bug report:
http://issues.apache.org/jira/browse/TAPESTRY-995
Unfortunately, updating is not an option right now. Is there
a work-around?

Thanks.

Regards,
Christian

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



snapshots?

2006-10-26 Thread Martin Strand
What has happened to the snapshots? There used to be snapshots from October in 
there but now they're from August:

http://people.apache.org/repo/m2-snapshot-repository/org/apache/tapestry/tapestry-framework/4.1.1-SNAPSHOT/

Martin

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



Tacos and Javascript Function: which comoponent?

2006-10-26 Thread Edoardo Campagnano
Hi to all,

here's my poblem: I've got a javascript function that returns a String, I
need to call a listener sending the result string from the function as
argument for the listener. Which is the best method to do this? I think a
Tacos component but don't know what and how..

 

Thanks in advice

 

Edoardo

 



RE: Dynamic Radiogroup

2006-10-26 Thread Ben Sommerville
I ran into this problem too.  FieldLabel does not work with Radio because
it is not an IFormComponent.

The order of FieldLabel  the component it refers to doesn't matter.  Except
that if you put the FieldLabel after the component you have to set
prerender=false.

I worked around this by creating a radio component that is a form component.
The
attached file has the class.  Now the disclaimer- this is code from 6 or 7
months 
ago on a project that didn't finish  was developerd early in my tapestry
learning 
cycle - treat with appropriate caution :)

cheers,
Ben
 

-Original Message-
From: Todd Orr [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 26 October 2006 1:44 AM
To: Tapestry users
Subject: Re: Dynamic Radiogroup

Reversing the radio and the label still causes this exception.

On 10/25/06, James Carman [EMAIL PROTECTED] wrote:
 I don't think it matters where you define it within the HTML.  Quite 
 often, the field label will come before the field it labels.  I've 
 never had to resort to a .page/.jwc file in this case.

 On 10/24/06, Patrick Moore [EMAIL PROTECTED] wrote:
 
  your FieldLabel's field parameter is wrong, it should look like this:
 
  label jwcid=@FieldLabel field=component:sug
 
  but if I remember correctly this will not work anyhow because sug is 
  defined in the html after the FieldLabel. You will need to specify 
  sug in your java or .jwc.
 
  -Pat
 
  
  - 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: Dynamic Radiogroup

2006-10-26 Thread Ben Sommerville
Ok, attachments don't work.  Code follows inline. 

++
package tapestry.components;

import org.apache.tapestry.form.RadioGroup;
import org.apache.tapestry.form.AbstractFormComponent;
import org.apache.tapestry.IMarkupWriter;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.Tapestry;
import org.apache.tapestry.annotations.Parameter;
import org.apache.tapestry.annotations.ComponentClass;
import org.apache.hivemind.ApplicationRuntimeException;

/**
 * TODO: Doc this.
 *
 * @author Ben Sommerville
 */
@ComponentClass(allowBody = false, reservedParameters = checked,type,name)
public abstract class FormRadio extends AbstractFormComponent  {


@Parameter(name=id, defaultValue=id)
public abstract String getIdParameter();

@Parameter
public abstract String getDisplayName();

@Parameter
public abstract boolean isDisabled();

@Parameter
public abstract Object getValue();

/**
 *  Renders the form element, or responds when the form containing the
element
 *  is submitted (by checking [EMAIL PROTECTED]
org.apache.tapestry.form.Form#isRewinding()}.
 *
 *
 **/

protected void renderFormComponent(IMarkupWriter writer, IRequestCycle
cycle)
{

RadioGroup group = RadioGroup.get(cycle);
if (group == null)
throw new ApplicationRuntimeException(
Tapestry.getMessage(Radio.must-be-contained-by-group),
this,
null,
null);

// The group determines rewinding from the form.
//
//boolean rewinding = group.isRewinding();

int option = group.getNextOptionId();
//
//if (rewinding)
//{
//// If not disabled and this is the selected button within the
radio group,
//// then update set the selection from the group to the value
for this
//// radio button.  This will update the selected parameter of
the RadioGroup.
//
//if (!isDisabled()  !group.isDisabled() 
group.isSelected(option))
//group.updateSelection(getValue());
//return;
//}
//
writer.beginEmpty(input);

writer.attribute(type, radio);

writer.attribute(name, group.getName());

renderIdAttribute(writer, cycle);

// As the group if the value for this Radio matches the selection
// for the group as a whole; if so this is the default radio and is
checked.

if (group.isSelection(getValue()))
writer.attribute(checked, checked);

if (isDisabled() || group.isDisabled())
writer.attribute(disabled, disabled);

// The value for the Radio matches the option number (provided by
the RadioGroup).
// When the form is submitted, the RadioGroup will know which option
was,
// in fact, selected by the user.

writer.attribute(value, option);

renderInformalParameters(writer, cycle);

}


protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle
cycle) {
RadioGroup group = RadioGroup.get(cycle);
if (group == null)
throw new ApplicationRuntimeException(
Tapestry.getMessage(Radio.must-be-contained-by-group),
this,
null,
null);

// The group determines rewinding from the form.


int option = group.getNextOptionId();

// If not disabled and this is the selected button within the radio
group,
// then update set the selection from the group to the value for
this
// radio button.  This will update the selected parameter of the
RadioGroup.

if (!isDisabled()  !group.isDisabled() 
group.isSelected(option))
group.updateSelection(getValue());
}

}

-Original Message-
From: Ben Sommerville [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 26 October 2006 9:33 PM
To: 'Tapestry users'
Subject: RE: Dynamic Radiogroup

I ran into this problem too.  FieldLabel does not work with Radio because it
is not an IFormComponent.

The order of FieldLabel  the component it refers to doesn't matter.  Except
that if you put the FieldLabel after the component you have to set
prerender=false.

I worked around this by creating a radio component that is a form component.
The
attached file has the class.  Now the disclaimer- this is code from 6 or 7
months ago on a project that didn't finish  was developerd early in my
tapestry learning cycle - treat with appropriate caution :)

cheers,
Ben
 


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



Re: Tacos and Javascript Function: which comoponent?

2006-10-26 Thread Karthik N

use a hidden field to set the output of your javascript function.  this
hidden field is bound to a tapestry property.  that way it will get set in
the rewind cycle.

in order to cause a submit you can have a hidden AjaxSubmit button that you
can cause a click() on after you've set the hidden property

On 10/26/06, Edoardo Campagnano [EMAIL PROTECTED] wrote:


Hi to all,

here's my poblem: I've got a javascript function that returns a String, I
need to call a listener sending the result string from the function as
argument for the listener. Which is the best method to do this? I think a
Tacos component but don't know what and how..



Thanks in advice



Edoardo








--
Thanks, Karthik


Re: Tomcat failover.

2006-10-26 Thread Dennis Sinelnikov
Take a look at mod_jk, there are some great examples on apache's httpd 
website.


Dennis

Leo Sakhvoruk wrote:
Excellent points Patrick! I will most certainly consider them as I look 
at clustering further.


Thanks,

Leo

Patrick Moore wrote:

Hi Leo --


From my experience, these are the questions that you should make sure

were asked first:

1. What is the effect on the user experience if the new server does
not have the session information?

2. How large a memory footprint does each session occupy?

3. How often do session variables change?

It has been my experience that session replication is almost never
worth the trouble it causes in terms of extra load on network and
webapps.  Failure at the web app level usually has so little
consequences that usually it is enough to simply:

1. just redirect the user to a new web server
2. the new server asks them to reauthenticate
3. looks for any work in progress that was significant enough to store
in the database ( which the app is probably already doing as it is)
4. If it finds such work offers to take them back to that flow.

Think about just storing every significant checkpoint in your app as a
cookie that deserializes to a bookmark that takes them to an
IExternalPage that will continue their work.  You are using
IExternalPage and bookmarks, right? right? (hint, hint) :-)

-Pat

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



Tacos-4.0 compatible with Tapestry-4.1.1 (build/deploy whoas)

2006-10-26 Thread Ken nashua

Guys,

Is anyone going to upgrade tacos-4.0 to build/run with tap-4.1.1 ?

I cannot get any webapps (that use tacos components) to deploy after 
building (tacos-4.0 and my webapps) against tapestry-4.1.1


I had to bump my webapps and tacos-4.0 build back to build against 
tapestry-4.0.2 just to build/deploy


Is there a time frame when tacos-4.0 will be compatible?

Better yet, can anyone suggest a buildable usable avenue for me? I prefer to 
do things myself rather than wait.


Thanks in advance

Ken in nashua

_
Try Search Survival Kits: Fix up your home and better handle your cash with 
Live Search! 
http://imagine-windowslive.com/search/kits/default.aspx?kit=improvelocale=en-USsource=hmtagline



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



RE: Library 'tacos' not found in application namespace

2006-10-26 Thread Ken nashua

Hi Folks,

While operating tacos-4.0 built with tapestry-4.0.2

I added the following to my webapp pom.xml

   dependency
 groupIdnet.sf.tacos/groupId
 artifactIdtacos-core/artifactId
 version4.0.1-SNAPSHOT/version
 scopecompile/scope
   /dependency

And all builds fine...

But when I attempt to run the web app I receive

Library 'tacos' not found in application namespace.

Still blue in the face. You intertvention is much appreciated.

Thanks



--- Here is my application file (which is identical to 
TacosDemo.application :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE application PUBLIC
 -//Apache Software Foundation//Tapestry Specification 4.0//EN
 http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;
application name=tap.proto 
engine-class=org.apache.tapestry.engine.BaseEngine

 descriptionTacos Demo Application/description
 library id=tacos specification-path=/net/sf/tacos/Tacos.library/
 library id=contrib 
specification-path=/org/apache/tapestry/contrib/Contrib.library/

 page name=Home specification-path=Home.page/
/application

--- Here is the stack trace...

org.apache.hivemind.ApplicationRuntimeException
Library 'tacos' not found in application namespace.
Stack Trace:
org.apache.tapestry.engine.Namespace.createNamespace(Namespace.java:290)
org.apache.tapestry.engine.Namespace.getChildNamespace(Namespace.java:148)
org.apache.tapestry.resolver.AbstractSpecificationResolver.findNamespaceForId(AbstractSpecificationResolver.java:204)
org.apache.tapestry.resolver.ComponentSpecificationResolverImpl.resolve(ComponentSpecificationResolverImpl.java:141)
$ComponentSpecificationResolver_10e84eb9d4f.resolve($ComponentSpecificationResolver_10e84eb9d4f.java)
$ComponentSpecificationResolver_10e84eb9d50.resolve($ComponentSpecificationResolver_10e84eb9d50.java)
org.apache.tapestry.services.impl.DefaultParserDelegate.getAllowBody(DefaultParserDelegate.java:70)
org.apache.tapestry.parse.TemplateParser.processComponentStart(TemplateParser.java:986)
org.apache.tapestry.parse.TemplateParser.startTag(TemplateParser.java:858)
org.apache.tapestry.parse.TemplateParser.parse(TemplateParser.java:494)
org.apache.tapestry.parse.TemplateParser.parse(TemplateParser.java:326)
$ITemplateParser_10e84eb9d8c.parse($ITemplateParser_10e84eb9d8c.java)
$ITemplateParser_10e84eb9d8d.parse($ITemplateParser_10e84eb9d8d.java)
org.apache.tapestry.services.impl.TemplateSourceImpl.constructTemplateInstance(TemplateSourceImpl.java:406)
org.apache.tapestry.services.impl.TemplateSourceImpl.parseTemplate(TemplateSourceImpl.java:383)
org.apache.tapestry.services.impl.TemplateSourceImpl.getOrParseTemplate(TemplateSourceImpl.java:360)
org.apache.tapestry.services.impl.TemplateSourceImpl.findPageTemplateInApplicationRoot(TemplateSourceImpl.java:285)
org.apache.tapestry.services.impl.TemplateSourceImpl.findTemplate(TemplateSourceImpl.java:254)
org.apache.tapestry.services.impl.TemplateSourceImpl.getTemplate(TemplateSourceImpl.java:188)
$TemplateSource_10e84eb9cdc.getTemplate($TemplateSource_10e84eb9cdc.java)
org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(ComponentTemplateLoaderImpl.java:55)
$ComponentTemplateLoader_10e84eb9d51.loadTemplate($ComponentTemplateLoader_10e84eb9d51.java)
org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.java:648)
org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77)
org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107)
$TableDemo_25.finishLoad($TableDemo_25.java)
org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:439)
org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613)
$IPageLoader_10e84eb9d45.loadPage($IPageLoader_10e84eb9d45.java)
$IPageLoader_10e84eb9d46.loadPage($IPageLoader_10e84eb9d46.java)
org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120)
$IPageSource_10e84eb9ca2.getPage($IPageSource_10e84eb9ca2.java)
org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268)
org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
org.apache.tapestry.engine.RequestCycle.activate(RequestCycle.java:609)
org.apache.tapestry.engine.PageService.service(PageService.java:66)
$IEngineService_10e84eb9d35.service($IEngineService_10e84eb9d35.java)
org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:66)
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248)
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
$WebRequestServicer_10e84eb9d0c.service($WebRequestServicer_10e84eb9d0c.java)
org.apache.tapestry.services.impl.DisableCachingFilter.service(DisableCachingFilter.java:48)
$WebRequestServicerFilter_10e84eb9d0e.service($WebRequestServicerFilter_10e84eb9d0e.java)
$WebRequestServicer_10e84eb9d10.service($WebRequestServicer_10e84eb9d10.java)
$WebRequestServicer_10e84eb9d08.service($WebRequestServicer_10e84eb9d08.java)

Call listener after page appears on screen

2006-10-26 Thread Peter Beshai
Is there an easy way of calling a listener after the page appears (rendered) 
on screen? I couldn't think of one, and so I tried having adding an event to 
the onload of the page:


script type=text/javascript
dojo.event.connect(window, onload,dojo.byId(mockHidden).onclick());
/script

or

script type=text/javascript
dojo.addOnLoad(function(e){ dojo.byId(mockHidden).onclick() });
/script

where mockHidden is a component that has an eventlistener (the listener I 
want to have called after the page is loaded) attached to it in my .java 
file. If I call dojo.byId(mockHidden).onclick() from firebug's console, it 
works, but when the page loads it says :: dojo.byId(mockHidden).onclick is 
not a function.


I figured that was because tapestry connects the event at the end of the 
page (and that script block is somewhere before that). Is there any way of 
having the javascript called AFTER tapestry has connected the event?? Or is 
there another way of accomplishing this goal?


Thanks,
Peter Beshai

_
Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca



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



RE: snapshots?

2006-10-26 Thread Peter Beshai
I think it may be something to do with people.apache.org. The site was down 
(afaik) for a couple of days earlier this week. (I was interested in getting 
a nightly build of commons-fileupload)


http://people.apache.org/builds/jakarta-commons/nightly/ only has files up 
until August 31.


I could be wrong though!

Peter Beshai




From: Martin Strand [EMAIL PROTECTED]
Reply-To: Tapestry users users@tapestry.apache.org
To: users@tapestry.apache.org
Subject: snapshots?
Date: Thu, 26 Oct 2006 12:53:47 +0200

What has happened to the snapshots? There used to be snapshots from October 
in there but now they're from August:


http://people.apache.org/repo/m2-snapshot-repository/org/apache/tapestry/tapestry-framework/4.1.1-SNAPSHOT/

Martin

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



_
Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca



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



Re: Call listener after page appears on screen

2006-10-26 Thread Karthik N

please try click() instead of onclick()

On 10/26/06, Peter Beshai [EMAIL PROTECTED] wrote:


Is there an easy way of calling a listener after the page appears
(rendered)
on screen? I couldn't think of one, and so I tried having adding an event
to
the onload of the page:

script type=text/javascript
dojo.event.connect(window, onload,dojo.byId(mockHidden).onclick());
/script

or

script type=text/javascript
dojo.addOnLoad(function(e){ dojo.byId(mockHidden).onclick() });
/script

where mockHidden is a component that has an eventlistener (the listener I
want to have called after the page is loaded) attached to it in my .java
file. If I call dojo.byId(mockHidden).onclick() from firebug's console,
it
works, but when the page loads it says :: dojo.byId(mockHidden).onclick
is
not a function.

I figured that was because tapestry connects the event at the end of the
page (and that script block is somewhere before that). Is there any way
of
having the javascript called AFTER tapestry has connected the event?? Or
is
there another way of accomplishing this goal?

Thanks,
Peter Beshai

_
Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca


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





--
Thanks, Karthik


Re: Call listener after page appears on screen

2006-10-26 Thread Peter Beshai
Oh, I should've mentioned I tried that already. It doesn't give an error on 
page load, but it also doesn't call the listener. It gives this error when I 
try calling it manually:



dojo.byId(mockHidden).click()

Error: buildTargetProperties() Unknown target type:[object HTMLDocument]

I have tried making the mockHidden a Button (forgot this causes 
EventListener to break  
[https://issues.apache.org/jira/browse/TAPESTRY-1095]), TextField (same 
error), Submit button (works, but sends the page into an infinite loop... it 
doesn't pick up that it should be asynchronous), a span (same error), and 
currently a Checkbox.


Also, onclick() -worked- after the page had loaded and I tried calling it 
manually.


Peter Beshai


From: Karthik N [EMAIL PROTECTED]
Reply-To: Tapestry users users@tapestry.apache.org
To: Tapestry users users@tapestry.apache.org
Subject: Re: Call listener after page appears on screen
Date: Thu, 26 Oct 2006 20:25:55 +0530

please try click() instead of onclick()

On 10/26/06, Peter Beshai [EMAIL PROTECTED] wrote:


Is there an easy way of calling a listener after the page appears
(rendered)
on screen? I couldn't think of one, and so I tried having adding an event
to
the onload of the page:

script type=text/javascript
dojo.event.connect(window, onload,dojo.byId(mockHidden).onclick());
/script

or

script type=text/javascript
dojo.addOnLoad(function(e){ dojo.byId(mockHidden).onclick() });
/script

where mockHidden is a component that has an eventlistener (the listener I
want to have called after the page is loaded) attached to it in my .java
file. If I call dojo.byId(mockHidden).onclick() from firebug's console,
it
works, but when the page loads it says :: dojo.byId(mockHidden).onclick
is
not a function.

I figured that was because tapestry connects the event at the end of the
page (and that script block is somewhere before that). Is there any way
of
having the javascript called AFTER tapestry has connected the event?? Or
is
there another way of accomplishing this goal?

Thanks,
Peter Beshai

_
Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca


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





--
Thanks, Karthik


_
Découvrez Live Search de votre PC ou de votre appareil mobile dès 
aujourd’hui. http://www.live.com/?mkt=fr-ca



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



RE: Upload file size limit in 4.0.2

2006-10-26 Thread Thomas.Vaughan
Trying using this class in your service-id instead:

implementation service-id=tapestry.multipart.ServletMultipartDecoder
  create-instance
class=org.apache.tapestry.multipart.MultipartDecoderImpl,maxSize=209715
20 model=threaded /
/implementation

-Original Message-
From: Christian Haselbach [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 26, 2006 6:45 AM
To: Tapestry users
Subject: Upload file size limit in 4.0.2

Hello,

we wanted the set the file size limit for upload files to
a different value, but this is not possible as noted in
the following bug report:
http://issues.apache.org/jira/browse/TAPESTRY-995
Unfortunately, updating is not an option right now. Is there
a work-around?

Thanks.

Regards,
Christian

-
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: Tomcat failover.

2006-10-26 Thread Leo Sakhvoruk
Yeah, I've read the docs on mod_jk. It seems a self-defeating purpose to 
set up Apache httpd for load balancing and fail over because it 
introduces a single point of failure on the part of the Apache httpd. 
That's why I originally asked if the only way to set up fail over was 
via integration with httpd. It would've been nice to just be able to do 
a fail over cluster with DNS round-robin where after one Tomcat server 
went down the next one in the DNS chain would be able to resume the 
session. But from what I've been able to gather Apache httpd is required 
for that kind of setup. Pity.


Dennis Sinelnikov wrote:
Take a look at mod_jk, there are some great examples on apache's httpd 
website.


Dennis

Leo Sakhvoruk wrote:
Excellent points Patrick! I will most certainly consider them as I 
look at clustering further.


Thanks,

Leo

Patrick Moore wrote:

Hi Leo --


From my experience, these are the questions that you should make sure

were asked first:

1. What is the effect on the user experience if the new server does
not have the session information?

2. How large a memory footprint does each session occupy?

3. How often do session variables change?

It has been my experience that session replication is almost never
worth the trouble it causes in terms of extra load on network and
webapps.  Failure at the web app level usually has so little
consequences that usually it is enough to simply:

1. just redirect the user to a new web server
2. the new server asks them to reauthenticate
3. looks for any work in progress that was significant enough to store
in the database ( which the app is probably already doing as it is)
4. If it finds such work offers to take them back to that flow.

Think about just storing every significant checkpoint in your app as a
cookie that deserializes to a bookmark that takes them to an
IExternalPage that will continue their work.  You are using
IExternalPage and bookmarks, right? right? (hint, hint) :-)

-Pat

-
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: Call listener after page appears on screen

2006-10-26 Thread Christian Dutaret

I tried to achieve the same thing some time ago, and I couldn't find
anything that would work with dojo and EventListeners.
As you mentioned, this is probably due to tapestry connect events being
called _after_ any point where we could insert any custom js.

The workaround I found to work perfectly is use contrib:XTile component
instead, with a small js script that calls the XTile generated js function
at the bottom of the page

hth
Ch.

2006/10/26, Peter Beshai [EMAIL PROTECTED]:


Oh, I should've mentioned I tried that already. It doesn't give an error
on
page load, but it also doesn't call the listener. It gives this error when
I
try calling it manually:

dojo.byId(mockHidden).click()
Error: buildTargetProperties() Unknown target type:[object HTMLDocument]

I have tried making the mockHidden a Button (forgot this causes
EventListener to break
[https://issues.apache.org/jira/browse/TAPESTRY-1095]), TextField (same
error), Submit button (works, but sends the page into an infinite loop...
it
doesn't pick up that it should be asynchronous), a span (same error),
and
currently a Checkbox.

Also, onclick() -worked- after the page had loaded and I tried calling it
manually.

Peter Beshai

From: Karthik N [EMAIL PROTECTED]
Reply-To: Tapestry users users@tapestry.apache.org
To: Tapestry users users@tapestry.apache.org
Subject: Re: Call listener after page appears on screen
Date: Thu, 26 Oct 2006 20:25:55 +0530

please try click() instead of onclick()

On 10/26/06, Peter Beshai [EMAIL PROTECTED] wrote:

Is there an easy way of calling a listener after the page appears
(rendered)
on screen? I couldn't think of one, and so I tried having adding an
event
to
the onload of the page:

script type=text/javascript
dojo.event.connect(window, onload,dojo.byId(mockHidden).onclick());
/script

or

script type=text/javascript
dojo.addOnLoad(function(e){ dojo.byId(mockHidden).onclick() });
/script

where mockHidden is a component that has an eventlistener (the listener
I
want to have called after the page is loaded) attached to it in my .java
file. If I call dojo.byId(mockHidden).onclick() from firebug's
console,
it
works, but when the page loads it says :: dojo.byId
(mockHidden).onclick
is
not a function.

I figured that was because tapestry connects the event at the end of the
page (and that script block is somewhere before that). Is there any
way
of
having the javascript called AFTER tapestry has connected the event?? Or
is
there another way of accomplishing this goal?

Thanks,
Peter Beshai

_
Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca


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




--
Thanks, Karthik

_
Découvrez Live Search de votre PC ou de votre appareil mobile dès
aujourd'hui. http://www.live.com/?mkt=fr-ca


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




DirectSevice ... how does it works.

2006-10-26 Thread Skorpien126

Hi... I want to know which steps a request takes when submitting a form??? Is
there lets say an overview, which methods are called in the
servlet-processing!

Why I want to know!! I have defined a form using validation ... the URL ist
www.test.com/Webapp/mypage (friendly url builded-in)... when I submit the
form I´m redirected to to lets say www.test.com/Webapp/mysecondpage. But
when there is a validation error the url becomes
www.test.com/Webapp/mypage,mycomponent.$myForm. Is there a way to avoid such
URL´s??? I tried to define a new Encoder... (with encode and decode
methods).. cutting the URL after the propertys are set and all is done, but
this doesn´t works. All the way.. is it Possible... If yes what´s the best
way???
THX..ú.. ^^
-- 
View this message in context: 
http://www.nabble.com/DirectSevice-...-how-does-it-works.-tf2515106.html#a7014875
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



ITemplateSourceDelegate

2006-10-26 Thread Pablo Ruggia

Has someone a working example of an ITemplateSourceDelegate or or a
PageSpecificationResolverImpl ? I can't find any.
I only want to have a .class for each page and in the same package the html
template. All .page configuration will be set using annotations.
Thanks !!


Re: Tomcat failover.

2006-10-26 Thread Dennis Sinelnikov
2 mirror installations of apache httpd and dns round robin them.  I 
could be wrong, but at some point you will have single point of failure 
-- either at apache httpd level or dns level.


Dennis
Leo Sakhvoruk wrote:
Yeah, I've read the docs on mod_jk. It seems a self-defeating purpose to 
set up Apache httpd for load balancing and fail over because it 
introduces a single point of failure on the part of the Apache httpd. 
That's why I originally asked if the only way to set up fail over was 
via integration with httpd. It would've been nice to just be able to do 
a fail over cluster with DNS round-robin where after one Tomcat server 
went down the next one in the DNS chain would be able to resume the 
session. But from what I've been able to gather Apache httpd is required 
for that kind of setup. Pity.


Dennis Sinelnikov wrote:
Take a look at mod_jk, there are some great examples on apache's httpd 
website.


Dennis

Leo Sakhvoruk wrote:
Excellent points Patrick! I will most certainly consider them as I 
look at clustering further.


Thanks,

Leo

Patrick Moore wrote:

Hi Leo --


From my experience, these are the questions that you should make sure

were asked first:

1. What is the effect on the user experience if the new server does
not have the session information?

2. How large a memory footprint does each session occupy?

3. How often do session variables change?

It has been my experience that session replication is almost never
worth the trouble it causes in terms of extra load on network and
webapps.  Failure at the web app level usually has so little
consequences that usually it is enough to simply:

1. just redirect the user to a new web server
2. the new server asks them to reauthenticate
3. looks for any work in progress that was significant enough to store
in the database ( which the app is probably already doing as it is)
4. If it finds such work offers to take them back to that flow.

Think about just storing every significant checkpoint in your app as a
cookie that deserializes to a bookmark that takes them to an
IExternalPage that will continue their work.  You are using
IExternalPage and bookmarks, right? right? (hint, hint) :-)

-Pat

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





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



Re: Call listener after page appears on screen

2006-10-26 Thread Daniel Tabuenca

Why not just use an @InvokeListener component as the last component in
your page?


On 10/26/06, Christian Dutaret [EMAIL PROTECTED] wrote:

I tried to achieve the same thing some time ago, and I couldn't find
anything that would work with dojo and EventListeners.
As you mentioned, this is probably due to tapestry connect events being
called _after_ any point where we could insert any custom js.

The workaround I found to work perfectly is use contrib:XTile component
instead, with a small js script that calls the XTile generated js function
at the bottom of the page

hth
Ch.

2006/10/26, Peter Beshai [EMAIL PROTECTED]:

 Oh, I should've mentioned I tried that already. It doesn't give an error
 on
 page load, but it also doesn't call the listener. It gives this error when
 I
 try calling it manually:

 dojo.byId(mockHidden).click()
 Error: buildTargetProperties() Unknown target type:[object HTMLDocument]

 I have tried making the mockHidden a Button (forgot this causes
 EventListener to break
 [https://issues.apache.org/jira/browse/TAPESTRY-1095]), TextField (same
 error), Submit button (works, but sends the page into an infinite loop...
 it
 doesn't pick up that it should be asynchronous), a span (same error),
 and
 currently a Checkbox.

 Also, onclick() -worked- after the page had loaded and I tried calling it
 manually.

 Peter Beshai

 From: Karthik N [EMAIL PROTECTED]
 Reply-To: Tapestry users users@tapestry.apache.org
 To: Tapestry users users@tapestry.apache.org
 Subject: Re: Call listener after page appears on screen
 Date: Thu, 26 Oct 2006 20:25:55 +0530
 
 please try click() instead of onclick()
 
 On 10/26/06, Peter Beshai [EMAIL PROTECTED] wrote:
 
 Is there an easy way of calling a listener after the page appears
 (rendered)
 on screen? I couldn't think of one, and so I tried having adding an
 event
 to
 the onload of the page:
 
 script type=text/javascript
 dojo.event.connect(window, onload,dojo.byId(mockHidden).onclick());
 /script
 
 or
 
 script type=text/javascript
 dojo.addOnLoad(function(e){ dojo.byId(mockHidden).onclick() });
 /script
 
 where mockHidden is a component that has an eventlistener (the listener
 I
 want to have called after the page is loaded) attached to it in my .java
 file. If I call dojo.byId(mockHidden).onclick() from firebug's
 console,
 it
 works, but when the page loads it says :: dojo.byId
 (mockHidden).onclick
 is
 not a function.
 
 I figured that was because tapestry connects the event at the end of the
 page (and that script block is somewhere before that). Is there any
 way
 of
 having the javascript called AFTER tapestry has connected the event?? Or
 is
 there another way of accomplishing this goal?
 
 Thanks,
 Peter Beshai
 
 _
 Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger
 http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 Thanks, Karthik

 _
 Découvrez Live Search de votre PC ou de votre appareil mobile dès
 aujourd'hui. http://www.live.com/?mkt=fr-ca


 -
 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: Tomcat failover.

2006-10-26 Thread Leo Sakhvoruk
No you're right there'll always be a single point of failure unless 
there is a truly redundant environment. But, minimizing the number of 
links in a non-redundant chain minimizes the chance of one of those 
links failing ;) So I'm trying to cut down on the number of things it 
takes to have the system running and only keeping those pieces that are 
absolutely necessary for the operation.


Dennis Sinelnikov wrote:
2 mirror installations of apache httpd and dns round robin them.  I 
could be wrong, but at some point you will have single point of 
failure -- either at apache httpd level or dns level.


Dennis
Leo Sakhvoruk wrote:
Yeah, I've read the docs on mod_jk. It seems a self-defeating purpose 
to set up Apache httpd for load balancing and fail over because it 
introduces a single point of failure on the part of the Apache httpd. 
That's why I originally asked if the only way to set up fail over was 
via integration with httpd. It would've been nice to just be able to 
do a fail over cluster with DNS round-robin where after one Tomcat 
server went down the next one in the DNS chain would be able to 
resume the session. But from what I've been able to gather Apache 
httpd is required for that kind of setup. Pity.


Dennis Sinelnikov wrote:
Take a look at mod_jk, there are some great examples on apache's 
httpd website.


Dennis

Leo Sakhvoruk wrote:
Excellent points Patrick! I will most certainly consider them as I 
look at clustering further.


Thanks,

Leo

Patrick Moore wrote:

Hi Leo --

From my experience, these are the questions that you should make 
sure

were asked first:

1. What is the effect on the user experience if the new server does
not have the session information?

2. How large a memory footprint does each session occupy?

3. How often do session variables change?

It has been my experience that session replication is almost never
worth the trouble it causes in terms of extra load on network and
webapps.  Failure at the web app level usually has so little
consequences that usually it is enough to simply:

1. just redirect the user to a new web server
2. the new server asks them to reauthenticate
3. looks for any work in progress that was significant enough to 
store

in the database ( which the app is probably already doing as it is)
4. If it finds such work offers to take them back to that flow.

Think about just storing every significant checkpoint in your app 
as a

cookie that deserializes to a bookmark that takes them to an
IExternalPage that will continue their work.  You are using
IExternalPage and bookmarks, right? right? (hint, hint) :-)

-Pat

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





-
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: Call listener after page appears on screen

2006-10-26 Thread Christian Dutaret

I don't think this would work in this case. The @InvokeListener component is
called on the server side, before the rendered response is flushed to the
client. What is discussed here is having a listener invoked after the page
is rendered on the client side, typically for a wait screen that will keep
displaying an animated gif until a long database transaction completes on
the server side (at least that is why I needed this).

2006/10/26, Daniel Tabuenca [EMAIL PROTECTED]:


Why not just use an @InvokeListener component as the last component in
your page?


On 10/26/06, Christian Dutaret [EMAIL PROTECTED] wrote:
 I tried to achieve the same thing some time ago, and I couldn't find
 anything that would work with dojo and EventListeners.
 As you mentioned, this is probably due to tapestry connect events being
 called _after_ any point where we could insert any custom js.

 The workaround I found to work perfectly is use contrib:XTile component
 instead, with a small js script that calls the XTile generated js
function
 at the bottom of the page

 hth
 Ch.

 2006/10/26, Peter Beshai [EMAIL PROTECTED]:
 
  Oh, I should've mentioned I tried that already. It doesn't give an
error
  on
  page load, but it also doesn't call the listener. It gives this error
when
  I
  try calling it manually:
 
  dojo.byId(mockHidden).click()
  Error: buildTargetProperties() Unknown target type:[object
HTMLDocument]
 
  I have tried making the mockHidden a Button (forgot this causes
  EventListener to break
  [https://issues.apache.org/jira/browse/TAPESTRY-1095]), TextField
(same
  error), Submit button (works, but sends the page into an infinite
loop...
  it
  doesn't pick up that it should be asynchronous), a span (same
error),
  and
  currently a Checkbox.
 
  Also, onclick() -worked- after the page had loaded and I tried calling
it
  manually.
 
  Peter Beshai
 
  From: Karthik N [EMAIL PROTECTED]
  Reply-To: Tapestry users users@tapestry.apache.org
  To: Tapestry users users@tapestry.apache.org
  Subject: Re: Call listener after page appears on screen
  Date: Thu, 26 Oct 2006 20:25:55 +0530
  
  please try click() instead of onclick()
  
  On 10/26/06, Peter Beshai [EMAIL PROTECTED] wrote:
  
  Is there an easy way of calling a listener after the page appears
  (rendered)
  on screen? I couldn't think of one, and so I tried having adding an
  event
  to
  the onload of the page:
  
  script type=text/javascript
  dojo.event.connect(window, onload,dojo.byId
(mockHidden).onclick());
  /script
  
  or
  
  script type=text/javascript
  dojo.addOnLoad(function(e){ dojo.byId(mockHidden).onclick() });
  /script
  
  where mockHidden is a component that has an eventlistener (the
listener
  I
  want to have called after the page is loaded) attached to it in my
.java
  file. If I call dojo.byId(mockHidden).onclick() from firebug's
  console,
  it
  works, but when the page loads it says :: dojo.byId
  (mockHidden).onclick
  is
  not a function.
  
  I figured that was because tapestry connects the event at the end of
the
  page (and that script block is somewhere before that). Is there
any
  way
  of
  having the javascript called AFTER tapestry has connected the
event?? Or
  is
  there another way of accomplishing this goal?
  
  Thanks,
  Peter Beshai
  
  _
  Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger
  http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca
  
  
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  --
  Thanks, Karthik
 
  _
  Découvrez Live Search de votre PC ou de votre appareil mobile dès
  aujourd'hui. http://www.live.com/?mkt=fr-ca
 
 
  -
  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: snapshots?

2006-10-26 Thread Patrick Moore

I don't think you are ... it is screwing up my build a lot as as I use
the latest snapshot on several libraries and plugins not just
tapestry.

Does anyone know if they have a fix time on this?

On 10/26/06, Peter Beshai [EMAIL PROTECTED] wrote:

I think it may be something to do with people.apache.org. The site was down
(afaik) for a couple of days earlier this week. (I was interested in getting
a nightly build of commons-fileupload)

http://people.apache.org/builds/jakarta-commons/nightly/ only has files up
until August 31.

I could be wrong though!

Peter Beshai



From: Martin Strand [EMAIL PROTECTED]
Reply-To: Tapestry users users@tapestry.apache.org
To: users@tapestry.apache.org
Subject: snapshots?
Date: Thu, 26 Oct 2006 12:53:47 +0200

What has happened to the snapshots? There used to be snapshots from October
in there but now they're from August:

http://people.apache.org/repo/m2-snapshot-repository/org/apache/tapestry/tapestry-framework/4.1.1-SNAPSHOT/

Martin

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


_
Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca


-
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: Call listener after page appears on screen

2006-10-26 Thread Peter Beshai

The XTile seems to work exactly how I want it to, but there is a problem.

This is my setup:

Stage 1:
- User selects file in upload component and submits form.

I needed a way to keep track of the progress of the file while it was 
uploading (to implement a progress bar). I couldn't do this in the same 
listener as the one that is called when the form is submitted because async 
submits don't work with upload components (apparently). So it was suggested 
to me that I create a thread that will be initialized when the form is 
submitted and it will handle the file uploading.


- Thread is initialized with filename and inputstream and starts running.
- Thread is stored in a static Map of threads with its hashCode as the key

The listener finishes and the page reloads.

Stage 2:
- XTile calls a listener to start watching the progress of the file in the 
thread.


The send function for XTile passes in the hashCode of the thread that was 
used to upload the file (stored in a hidden field on the page).


The method is called until I put in the call to get my thread from the 
static Map. I get this error in the firebug console:


  response.responseXML has no properties.



Any ideas how to fix this? Or a better way of handling tracking the progress 
of a file?


Peter Beshai



From: Christian Dutaret [EMAIL PROTECTED]
Reply-To: Tapestry users users@tapestry.apache.org
To: Tapestry users users@tapestry.apache.org
Subject: Re: Call listener after page appears on screen
Date: Thu, 26 Oct 2006 20:16:41 +0200

I don't think this would work in this case. The @InvokeListener component 
is

called on the server side, before the rendered response is flushed to the
client. What is discussed here is having a listener invoked after the page
is rendered on the client side, typically for a wait screen that will keep
displaying an animated gif until a long database transaction completes on
the server side (at least that is why I needed this).

2006/10/26, Daniel Tabuenca [EMAIL PROTECTED]:


Why not just use an @InvokeListener component as the last component in
your page?


On 10/26/06, Christian Dutaret [EMAIL PROTECTED] wrote:
 I tried to achieve the same thing some time ago, and I couldn't find
 anything that would work with dojo and EventListeners.
 As you mentioned, this is probably due to tapestry connect events being
 called _after_ any point where we could insert any custom js.

 The workaround I found to work perfectly is use contrib:XTile component
 instead, with a small js script that calls the XTile generated js
function
 at the bottom of the page

 hth
 Ch.

 2006/10/26, Peter Beshai [EMAIL PROTECTED]:
 
  Oh, I should've mentioned I tried that already. It doesn't give an
error
  on
  page load, but it also doesn't call the listener. It gives this error
when
  I
  try calling it manually:
 
  dojo.byId(mockHidden).click()
  Error: buildTargetProperties() Unknown target type:[object
HTMLDocument]
 
  I have tried making the mockHidden a Button (forgot this causes
  EventListener to break
  [https://issues.apache.org/jira/browse/TAPESTRY-1095]), TextField
(same
  error), Submit button (works, but sends the page into an infinite
loop...
  it
  doesn't pick up that it should be asynchronous), a span (same
error),
  and
  currently a Checkbox.
 
  Also, onclick() -worked- after the page had loaded and I tried 
calling

it
  manually.
 
  Peter Beshai
 
  From: Karthik N [EMAIL PROTECTED]
  Reply-To: Tapestry users users@tapestry.apache.org
  To: Tapestry users users@tapestry.apache.org
  Subject: Re: Call listener after page appears on screen
  Date: Thu, 26 Oct 2006 20:25:55 +0530
  
  please try click() instead of onclick()
  
  On 10/26/06, Peter Beshai [EMAIL PROTECTED] wrote:
  
  Is there an easy way of calling a listener after the page appears
  (rendered)
  on screen? I couldn't think of one, and so I tried having adding an
  event
  to
  the onload of the page:
  
  script type=text/javascript
  dojo.event.connect(window, onload,dojo.byId
(mockHidden).onclick());
  /script
  
  or
  
  script type=text/javascript
  dojo.addOnLoad(function(e){ dojo.byId(mockHidden).onclick() });
  /script
  
  where mockHidden is a component that has an eventlistener (the
listener
  I
  want to have called after the page is loaded) attached to it in my
.java
  file. If I call dojo.byId(mockHidden).onclick() from firebug's
  console,
  it
  works, but when the page loads it says :: dojo.byId
  (mockHidden).onclick
  is
  not a function.
  
  I figured that was because tapestry connects the event at the end 
of

the
  page (and that script block is somewhere before that). Is there
any
  way
  of
  having the javascript called AFTER tapestry has connected the
event?? Or
  is
  there another way of accomplishing this goal?
  
  Thanks,
  Peter Beshai
  
  _
  Voyez vos amis en faisant un appel vidèo dans Windows Live 
Messenger

  

Re: Call listener after page appears on screen

2006-10-26 Thread andyhot
Try this:
script type=text/javascript
dojo.event.connect(window, onload,
  setTimeout(function() {
dojo.byId(mockHidden).onclick();
}, 50)
);
/script



Peter Beshai wrote:
 Is there an easy way of calling a listener after the page appears
 (rendered) on screen? I couldn't think of one, and so I tried having
 adding an event to the onload of the page:

 script type=text/javascript
 dojo.event.connect(window, onload,dojo.byId(mockHidden).onclick());
 /script

 or

 script type=text/javascript
 dojo.addOnLoad(function(e){ dojo.byId(mockHidden).onclick() });
 /script

 where mockHidden is a component that has an eventlistener (the
 listener I want to have called after the page is loaded) attached to
 it in my .java file. If I call dojo.byId(mockHidden).onclick() from
 firebug's console, it works, but when the page loads it says ::
 dojo.byId(mockHidden).onclick is not a function.

 I figured that was because tapestry connects the event at the end of
 the page (and that script block is somewhere before that). Is there
 any way of having the javascript called AFTER tapestry has connected
 the event?? Or is there another way of accomplishing this goal?

 Thanks,
 Peter Beshai

 _
 Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger
 http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca


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



Re: Call listener after page appears on screen

2006-10-26 Thread Peter Beshai
Ok, resolved the response.responseXML has no properties problem. I was 
tipped off by this post:


http://mail-archives.apache.org/mod_mbox/jakarta-tapestry-user/200512.mbox/[EMAIL
 PROTECTED]

public void xTileListener(IRequestCycle cycle, String stringKey) {
   Integer threadKey = Integer.valueOf(stringKey);
...
}
instead of Integer threadKey as the parameter.

Thanks for the help!
Peter


From: Peter Beshai [EMAIL PROTECTED]
Reply-To: Tapestry users users@tapestry.apache.org
To: users@tapestry.apache.org
Subject: Re: Call listener after page appears on screen
Date: Thu, 26 Oct 2006 14:47:04 -0400

The XTile seems to work exactly how I want it to, but there is a problem.

This is my setup:

Stage 1:
- User selects file in upload component and submits form.

I needed a way to keep track of the progress of the file while it was 
uploading (to implement a progress bar). I couldn't do this in the same 
listener as the one that is called when the form is submitted because async 
submits don't work with upload components (apparently). So it was suggested 
to me that I create a thread that will be initialized when the form is 
submitted and it will handle the file uploading.


- Thread is initialized with filename and inputstream and starts running.
- Thread is stored in a static Map of threads with its hashCode as the key

The listener finishes and the page reloads.

Stage 2:
- XTile calls a listener to start watching the progress of the file in the 
thread.


The send function for XTile passes in the hashCode of the thread that was 
used to upload the file (stored in a hidden field on the page).


The method is called until I put in the call to get my thread from the 
static Map. I get this error in the firebug console:


  response.responseXML has no properties.



Any ideas how to fix this? Or a better way of handling tracking the 
progress of a file?


Peter Beshai



From: Christian Dutaret [EMAIL PROTECTED]
Reply-To: Tapestry users users@tapestry.apache.org
To: Tapestry users users@tapestry.apache.org
Subject: Re: Call listener after page appears on screen
Date: Thu, 26 Oct 2006 20:16:41 +0200

I don't think this would work in this case. The @InvokeListener component 
is

called on the server side, before the rendered response is flushed to the
client. What is discussed here is having a listener invoked after the page
is rendered on the client side, typically for a wait screen that will keep
displaying an animated gif until a long database transaction completes on
the server side (at least that is why I needed this).

2006/10/26, Daniel Tabuenca [EMAIL PROTECTED]:


Why not just use an @InvokeListener component as the last component in
your page?


On 10/26/06, Christian Dutaret [EMAIL PROTECTED] wrote:
 I tried to achieve the same thing some time ago, and I couldn't find
 anything that would work with dojo and EventListeners.
 As you mentioned, this is probably due to tapestry connect events 
being

 called _after_ any point where we could insert any custom js.

 The workaround I found to work perfectly is use contrib:XTile 
component

 instead, with a small js script that calls the XTile generated js
function
 at the bottom of the page

 hth
 Ch.

 2006/10/26, Peter Beshai [EMAIL PROTECTED]:
 
  Oh, I should've mentioned I tried that already. It doesn't give an
error
  on
  page load, but it also doesn't call the listener. It gives this 
error

when
  I
  try calling it manually:
 
  dojo.byId(mockHidden).click()
  Error: buildTargetProperties() Unknown target type:[object
HTMLDocument]
 
  I have tried making the mockHidden a Button (forgot this causes
  EventListener to break
  [https://issues.apache.org/jira/browse/TAPESTRY-1095]), TextField
(same
  error), Submit button (works, but sends the page into an infinite
loop...
  it
  doesn't pick up that it should be asynchronous), a span (same
error),
  and
  currently a Checkbox.
 
  Also, onclick() -worked- after the page had loaded and I tried 
calling

it
  manually.
 
  Peter Beshai
 
  From: Karthik N [EMAIL PROTECTED]
  Reply-To: Tapestry users users@tapestry.apache.org
  To: Tapestry users users@tapestry.apache.org
  Subject: Re: Call listener after page appears on screen
  Date: Thu, 26 Oct 2006 20:25:55 +0530
  
  please try click() instead of onclick()
  
  On 10/26/06, Peter Beshai [EMAIL PROTECTED] wrote:
  
  Is there an easy way of calling a listener after the page appears
  (rendered)
  on screen? I couldn't think of one, and so I tried having adding 
an

  event
  to
  the onload of the page:
  
  script type=text/javascript
  dojo.event.connect(window, onload,dojo.byId
(mockHidden).onclick());
  /script
  
  or
  
  script type=text/javascript
  dojo.addOnLoad(function(e){ dojo.byId(mockHidden).onclick() });
  /script
  
  where mockHidden is a component that has an eventlistener (the
listener
  I
  want to have called after the page is loaded) attached to it in my
.java
  file. If I call dojo.byId(mockHidden).onclick() from 

Re: Call listener after page appears on screen

2006-10-26 Thread Peter Beshai
I did eventually try that and it worked but it seemed slightly volatile. I'm 
not sure if this has to do with how my snapshots have been rolled back to 
August versions (see snapshots thread), but I randomly see in my dojo 
console tapestry.cleanConnect is not a function and when that happens that 
solution doesn't work.


Peter Beshai



From: andyhot [EMAIL PROTECTED]
Reply-To: Tapestry users users@tapestry.apache.org
To: Tapestry users users@tapestry.apache.org
Subject: Re: Call listener after page appears on screen
Date: Thu, 26 Oct 2006 19:25:31 +0300

Try this:
script type=text/javascript
dojo.event.connect(window, onload,
  setTimeout(function() {
dojo.byId(mockHidden).onclick();
}, 50)
);
/script



Peter Beshai wrote:
 Is there an easy way of calling a listener after the page appears
 (rendered) on screen? I couldn't think of one, and so I tried having
 adding an event to the onload of the page:

 script type=text/javascript
 dojo.event.connect(window, onload,dojo.byId(mockHidden).onclick());
 /script

 or

 script type=text/javascript
 dojo.addOnLoad(function(e){ dojo.byId(mockHidden).onclick() });
 /script

 where mockHidden is a component that has an eventlistener (the
 listener I want to have called after the page is loaded) attached to
 it in my .java file. If I call dojo.byId(mockHidden).onclick() from
 firebug's console, it works, but when the page loads it says ::
 dojo.byId(mockHidden).onclick is not a function.

 I figured that was because tapestry connects the event at the end of
 the page (and that script block is somewhere before that). Is there
 any way of having the javascript called AFTER tapestry has connected
 the event?? Or is there another way of accomplishing this goal?

 Thanks,
 Peter Beshai

 _
 Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger
 http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca


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



_
Découvrez Live Search de votre PC ou de votre appareil mobile dès 
aujourd’hui. http://www.live.com/?mkt=fr-ca



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



Do I need a .jwc?

2006-10-26 Thread Bill Holloway

Earlier today I had the Eclipse WTP set up with Tapestry 4.0.2 and was
enjoying putting my Border.html in WEB-INF and watching Tapestry find
it without needing Border.jwc.

Tonight I have switched to regular Eclipse with an ant buildfile to
deploy my .war to tomcat and now I need .jwc's apparently.  If it's
not there, I get Component 'Border' not found in Namespace.  This is
happening in 4.0.2 and 4.1.  any ideas?

Bill

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



Re: Problem Understanding Tapestry..

2006-10-26 Thread Bill Holloway

It looks like you're creating a custom component called Person.  Is
that what you want to do?  Or is Person one of your domain classes
with first name, last name, etc.  I also don't understand doing
instanceof.  You should make absolutely sure that your page's property
called Persons always contains a Collection of instances of type
Person.

If you rename your Persons property to people, which is more in line
with Tapestry convention and avoids confusion with what I assume is a
domain class Person, how about this code:

span jwcid=@Foreach source=ognl:people value=ognl:current
 span jwcid=@Insert value=ognl:current.name /
 ul
   li jwcid=@Foreach source=ognl:current.addressList
value=ognl:currAddr element=li
 span jwcid=@Insert value=ognl:currAddr.address/span
 /li
 /ul
/span

Bill

On 10/7/06, Skorpien126 [EMAIL PROTECTED] wrote:


Hi @ All

I?ve try to build  a page but i?m not right in understanding how tapestry
works

OK: I Have a Page Class Context (extending BasePage implementing
PageBeginRenderListener)which consists some propertys of Type Persons
which extends from BaseComponent and which ist not abstract. This Class
builds an arraylist of Person extending BaseComponent.

Now I want to initialiaze the Propertys in the Context Class at the begin of
pageBeginRender is called. There i create a new Instance of Persons. then i
call persons.setPersonList(ArrayList Person) so that all value are
initialized.

In the Context.html i try to visualize the Context builded when
pageBeginRender is called.

 span jwcid=@Foreach source=ognl:Persons value=ognl:ListItem
 span jwcid=@If condition=ognl:ListItem instanceof
Persons
 span jwcid=@Person
AdresslList=ognl:ListItem.getAdressList()

Name=ognl:ListItem.getName()/
 /span
 /span

The Class person has the propertys:  String name and ArrayList AdressList.

So the Problem is that the parameter are not referenced. the component
parameters are always null... or in detail they have the values defined in
the standart constructor. Can anyone help me... ?!???!?!?!?


--
View this message in context: 
http://www.nabble.com/Problem-Understanding-Tapestry..-tf2400174.html#a6692697
Sent from the Tapestry - User mailing list archive at Nabble.com.


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





--
Budgets are moral documents.

-- Ann Richards

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