After using Tapestry 5.0.13 Javascript(.js) files loads after loading content causing problem when use the functions written in .js files within content

2008-07-04 Thread Harish Kudriyal

Hi,

   I have updated Tapestry 5.0.13 version beacause of which I am facing
javascript issues.
   I have written some function(for example 'fun1' ) in zzz.js files and
including this using annotation @IncludeJavaScriptLibrary on the page
MyPage.java. Within the page content in 'MyPage.tml' I am using some
function written in zzz.js in script tag which are called line by line
when the content loads. For example html code written like following...

content...content...
content...content...
scriptfun1()/script
content...content...
content...content...

Now because js file zzz.js loads after content load on screen I am getting
javascript error that fun1() does not exist.
What can be resolution for this? How can I load the file zzz.js before the
content loads on screen?
Please help me out.

Harish Kudriyal
Fiserv
-- 
View this message in context: 
http://www.nabble.com/After-using-Tapestry-5.0.13-Javascript%28.js%29-files-loads-after-loading-content-causing-problem-when-use-the-functions-written-in-.js-files-within-content-tp18274564p18274564.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



RE: After using Tapestry 5.0.13 Javascript(.js) files loads after loading content causing problem when use the functions written in .js files within content

2008-07-04 Thread Kristian Marinkovic
please read:

http://tapestry-user.markmail.org/search/?q=javascript#query:javascript%20order%3Adate-backward+page:2+mid:cufkwcxepsfzqsqi+state:results
and/org
http://tapestry-user.markmail.org/search/?q=javascript#query:javascript%20order%3Adate-backward+page:3+mid:o26tiyw5xm4rmecs+state:results

g,
kris




Harish Kudriyal [EMAIL PROTECTED] 
04.07.2008 09:44
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
users@tapestry.apache.org
Kopie

Thema
After using Tapestry 5.0.13 Javascript(.js) files loads after loading 
content causing problem when use the functions written in .js files within 
content








Hi,

   I have updated Tapestry 5.0.13 version beacause of which I am facing
javascript issues.
   I have written some function(for example 'fun1' ) in zzz.js files and
including this using annotation @IncludeJavaScriptLibrary on the page
MyPage.java. Within the page content in 'MyPage.tml' I am using some
function written in zzz.js in script tag which are called line by line
when the content loads. For example html code written like following...

content...content...
content...content...
scriptfun1()/script
content...content...
content...content...

Now because js file zzz.js loads after content load on screen I am getting
javascript error that fun1() does not exist.
What can be resolution for this? How can I load the file zzz.js before the
content loads on screen?
Please help me out.

Harish Kudriyal
Fiserv
-- 
View this message in context: 
http://www.nabble.com/After-using-Tapestry-5.0.13-Javascript%28.js%29-files-loads-after-loading-content-causing-problem-when-use-the-functions-written-in-.js-files-within-content-tp18274564p18274564.html

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


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




server hangs with parallel requests

2008-07-04 Thread Udo Abel
Hi,

I have a page with 4 iframes loading 4 different pages from a tapestry 5 
application.

In 2 of 3 cases, th server hangs and does not return any page.
When I first load 1 page, subsequent loading of the 4-page frame succeeds.

Is there a possible synchronization problem?

The stacks of the for page load tasks btpool0-1 to -4 and the system tasks in 
eclipse is appended here.
Im using eclipse 3.3.2 woth java 1.6.0_6and jetty 6.1.6.

Thread [btpool0-0 - Acceptor0 [EMAIL PROTECTED]:8080] (Suspended)   
EPollArrayWrapper.epollWait(long, int, long, int) line: not available 
[native method]   
EPollArrayWrapper.poll(long) line: 215  
EPollSelectorImpl.doSelect(long) line: 65   
EPollSelectorImpl(SelectorImpl).lockAndDoSelect(long) line: 69  
EPollSelectorImpl(SelectorImpl).select(long) line: 80   
SelectorManager$SelectSet.doSelect() line: 406  
SelectChannelConnector$1(SelectorManager).doSelect(int) line: 166   
SelectChannelConnector.accept(int) line: 124
AbstractConnector$Acceptor.run() line: 515  
BoundedThreadPool$PoolThread.run() line: 450

Daemon Thread [Timer-0] (Suspended) 
Object.wait(long) line: not available [native method]   
TimerThread.mainLoop() line: 509 [local variables unavailable]  
TimerThread.run() line: 462 [local variables unavailable]   

Thread [btpool0-1] (Suspended)  

ComponentInstantiatorSourceImpl$PackageAwareLoader(ClassLoader).checkCerts(String,
 CodeSource) line: 751

ComponentInstantiatorSourceImpl$PackageAwareLoader(ClassLoader).preDefineClass(String,
 ProtectionDomain) line: 487  

ComponentInstantiatorSourceImpl$PackageAwareLoader(ClassLoader).defineClass(String,
 byte[], int, int, ProtectionDomain) line: 614   
GeneratedMethodAccessor3.invoke(Object, Object[]) line: not available   
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25  
Method.invoke(Object, Object...) line: 597  
ClassPool.toClass2(Method, ClassLoader, Object[]) line: 965 
ClassFactoryClassPool(ClassPool).toClass(CtClass, ClassLoader, 
ProtectionDomain) line: 947  
CtClassSourceImpl.createClass(CtClass) line: 92 
ClassFabImpl(AbstractFab).createClass() line: 89
InternalClassTransformationImpl.createInstantiator() line: 1448 
ComponentClassTransformerImpl.createInstantiator(String) line: 181  
$ComponentClassTransformer_11aed3dc4bb.createInstantiator(String) line: 
not available   
ComponentInstantiatorSourceImpl.findInstantiator(String) line: 240  
$ComponentInstantiatorSource_11aed3dc4ae.findInstantiator(String) line: 
not available   
PageElementFactoryImpl.newComponentElement(Page, ComponentPageElement, 
String, String, String, String, Location) line: 211  
$PageElementFactory_11aed3dc4e5.newComponentElement(Page, 
ComponentPageElement, String, String, String, String, Location) line: not 
available   
PageLoaderProcessor.startComponent(StartComponentToken) line: 656   
PageLoaderProcessor.loadTemplateForComponent(ComponentPageElement) 
line: 501
PageLoaderProcessor.workComponentQueue() line: 808  
PageLoaderProcessor.loadPage(String, String, Locale) line: 393  
PageLoaderImpl.loadPage(String, Locale) line: 59
$PageLoader_11aed3dc4e3.loadPage(String, Locale) line: not available
PagePoolCache.checkout() line: 210  
PagePoolImpl.checkout(String) line: 107 
$PagePool_11aed3dc4e2.checkout(String) line: not available  
RequestPageCacheImpl.get(String) line: 43   
$RequestPageCache_11aed3dc4e1.get(String) line: not available   
$RequestPageCache_11aed3dc4d9.get(String) line: not available   
RequestSecurityManagerImpl.checkForInsecureRequest(String) line: 59 
$RequestSecurityManager_11aed3dc4d8.checkForInsecureRequest(String) 
line: not available 
TapestryModule$28.handle(PageRenderRequestParameters, 
PageRenderRequestHandler) line: 1670  

$PageRenderRequestHandler_11aed3dc4dc.handle(PageRenderRequestParameters) line: 
not available   

$PageRenderRequestHandler_11aed3dc4d0.handle(PageRenderRequestParameters) line: 
not available   
PageRenderDispatcher.process(String, String) line: 97   
PageRenderDispatcher.dispatch(Request, Response) line: 73   
$Dispatcher_11aed3dc4d7.dispatch(Request, Response) line: not available 
$Dispatcher_11aed3dc4c9.dispatch(Request, Response) line: not available 
TapestryModule$12.service(Request, Response) line: 938  
LocalizationFilter.service(Request, Response, RequestHandler) line: 42  
$RequestHandler_11aed3dc4ca.service(Request, Response) line: not 
available  
TapestryModule$2.service(Request, 

Re: server hangs with parallel requests

2008-07-04 Thread Sven Homburg
i had a similar problem

after updating my environment to linux/java-1.6.0_6/jetty-6.1.11
it works for me

2008/7/4 Udo Abel [EMAIL PROTECTED]:

 Hi,

 I have a page with 4 iframes loading 4 different pages from a tapestry 5
 application.

 In 2 of 3 cases, th server hangs and does not return any page.
 When I first load 1 page, subsequent loading of the 4-page frame succeeds.

 Is there a possible synchronization problem?

 The stacks of the for page load tasks btpool0-1 to -4 and the system tasks
 in eclipse is appended here.
 Im using eclipse 3.3.2 woth java 1.6.0_6and jetty 6.1.6.

 Thread [btpool0-0 - Acceptor0 [EMAIL PROTECTED]:8080]
 (Suspended)
EPollArrayWrapper.epollWait(long, int, long, int) line: not
 available [native method]
EPollArrayWrapper.poll(long) line: 215
EPollSelectorImpl.doSelect(long) line: 65
EPollSelectorImpl(SelectorImpl).lockAndDoSelect(long) line: 69
EPollSelectorImpl(SelectorImpl).select(long) line: 80
SelectorManager$SelectSet.doSelect() line: 406
SelectChannelConnector$1(SelectorManager).doSelect(int) line: 166
SelectChannelConnector.accept(int) line: 124
AbstractConnector$Acceptor.run() line: 515
BoundedThreadPool$PoolThread.run() line: 450

 Daemon Thread [Timer-0] (Suspended)
Object.wait(long) line: not available [native method]
TimerThread.mainLoop() line: 509 [local variables unavailable]
TimerThread.run() line: 462 [local variables unavailable]

 Thread [btpool0-1] (Suspended)

  
 ComponentInstantiatorSourceImpl$PackageAwareLoader(ClassLoader).checkCerts(String,
 CodeSource) line: 751

  
 ComponentInstantiatorSourceImpl$PackageAwareLoader(ClassLoader).preDefineClass(String,
 ProtectionDomain) line: 487

  
 ComponentInstantiatorSourceImpl$PackageAwareLoader(ClassLoader).defineClass(String,
 byte[], int, int, ProtectionDomain) line: 614
GeneratedMethodAccessor3.invoke(Object, Object[]) line: not
 available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
ClassPool.toClass2(Method, ClassLoader, Object[]) line: 965
ClassFactoryClassPool(ClassPool).toClass(CtClass, ClassLoader,
 ProtectionDomain) line: 947
CtClassSourceImpl.createClass(CtClass) line: 92
ClassFabImpl(AbstractFab).createClass() line: 89
InternalClassTransformationImpl.createInstantiator() line: 1448
ComponentClassTransformerImpl.createInstantiator(String) line: 181
$ComponentClassTransformer_11aed3dc4bb.createInstantiator(String)
 line: not available
ComponentInstantiatorSourceImpl.findInstantiator(String) line: 240
$ComponentInstantiatorSource_11aed3dc4ae.findInstantiator(String)
 line: not available
PageElementFactoryImpl.newComponentElement(Page,
 ComponentPageElement, String, String, String, String, Location) line: 211
$PageElementFactory_11aed3dc4e5.newComponentElement(Page,
 ComponentPageElement, String, String, String, String, Location) line: not
 available
PageLoaderProcessor.startComponent(StartComponentToken) line: 656
PageLoaderProcessor.loadTemplateForComponent(ComponentPageElement)
 line: 501
PageLoaderProcessor.workComponentQueue() line: 808
PageLoaderProcessor.loadPage(String, String, Locale) line: 393
PageLoaderImpl.loadPage(String, Locale) line: 59
$PageLoader_11aed3dc4e3.loadPage(String, Locale) line: not available
PagePoolCache.checkout() line: 210
PagePoolImpl.checkout(String) line: 107
$PagePool_11aed3dc4e2.checkout(String) line: not available
RequestPageCacheImpl.get(String) line: 43
$RequestPageCache_11aed3dc4e1.get(String) line: not available
$RequestPageCache_11aed3dc4d9.get(String) line: not available
RequestSecurityManagerImpl.checkForInsecureRequest(String) line: 59
$RequestSecurityManager_11aed3dc4d8.checkForInsecureRequest(String)
 line: not available
TapestryModule$28.handle(PageRenderRequestParameters,
 PageRenderRequestHandler) line: 1670

  $PageRenderRequestHandler_11aed3dc4dc.handle(PageRenderRequestParameters)
 line: not available

  $PageRenderRequestHandler_11aed3dc4d0.handle(PageRenderRequestParameters)
 line: not available
PageRenderDispatcher.process(String, String) line: 97
PageRenderDispatcher.dispatch(Request, Response) line: 73
$Dispatcher_11aed3dc4d7.dispatch(Request, Response) line: not
 available
$Dispatcher_11aed3dc4c9.dispatch(Request, Response) line: not
 available
TapestryModule$12.service(Request, Response) line: 938
LocalizationFilter.service(Request, Response, RequestHandler) line:
 42
$RequestHandler_11aed3dc4ca.service(Request, Response) line: not
 available
TapestryModule$2.service(Request, Response, RequestHandler) line:
 586
$RequestHandler_11aed3dc4ca.service(Request, Response) line: not
 

Re: how to refresh only div in tapestry 5?

2008-07-04 Thread Filip S. Adamsen

Hi,

You're looking for the Zone component. It's described here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/ajax.html
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Zone.html

-Filip

On 2008-07-04 02:45, Tan [EMAIL PROTECTED] wrote:

Dear All,

May I know how to refresh only div instead of whole page in tapestry5 ?
Thank you.

Regards,
Cyber



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



form validation recorderror problem

2008-07-04 Thread Udo Abel
Hi,

when I call the method
form.recordError(field, message)
in onValidateForm(), the field is highlighted but the message is not displayed 
(and not in the html anywhere).

Anything else that need to be done here?

Thanks,
Udo.

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

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



Antwort: form validation recorderror problem

2008-07-04 Thread Kristian Marinkovic
use the Errors component to display the error messages

please see documentation for more details

g,
kris




Udo Abel [EMAIL PROTECTED] 
04.07.2008 11:41
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
users@tapestry.apache.org
Kopie

Thema
form validation recorderror problem







Hi,

when I call the method
form.recordError(field, message)
in onValidateForm(), the field is highlighted but the message is not 
displayed (and not in the html anywhere).

Anything else that need to be done here?

Thanks,
Udo.

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: 
http://www.shortview.de/[EMAIL PROTECTED]

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




Re: form validation recorderror problem

2008-07-04 Thread Harish Kudriyal

To display the message you need to place t:error inside t:form component. 

Harish


Udo Abel wrote:
 
 Hi,
 
 when I call the method
 form.recordError(field, message)
 in onValidateForm(), the field is highlighted but the message is not
 displayed (and not in the html anywhere).
 
 Anything else that need to be done here?
 
 Thanks,
 Udo.
 
 -- 
 GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
 Jetzt dabei sein:
 http://www.shortview.de/[EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/form-validation-recorderror-problem-tp18276295p18276363.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Form event order issues

2008-07-04 Thread Udo Abel
Hi,

I think the order of events during form submission should be described in a 
state diagram or so, otherwise you cannot know when to do what.

I found out that the onValidate event is fired before any button select event.  
That means, in onValidateForm you don't know whether the user pressed save or 
abort - which  should be known for validation.
That's probably the reason why I found so many people using onSuccess for 
validation, what I find not very beautiful.

Since form submission is very essential, I think the system (and the 
documentation) should be very clear at that point, which is not yet the case.

Regards,
Udo.
-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

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



T5.0.13 - Oracle10gDialect class not found

2008-07-04 Thread Patrick Moriarty
Hi,

After switching to 5.0.13, I can't start my Tapestry + Spring [2.5.4] +
Hibernate [3.2.6.ga] application with any oracle dialect other than
Oracle9Dialect, which is now deprecated.

Funny enough, the deprecation warning, present when using 5.0.12 with
Oracle9Dialect, is no longer showing!

Any ideas on what could be happening?

Paudi


Re: Form event order issues

2008-07-04 Thread Geoff Callender
I'm assuming Abort can ignore what you've typed into the form, in  
which case the more common technique is to use a link component  
instead of a submit.  That way you bypass the validators.  You can  
style a link to look like the submit button easily enough if that's  
what you'd like, eg.


input type=submit value=Save/
	a t:type=pagelink t:page=thePreviousPage style=text-decoration:  
none

input type=button value=Abort/
/a

Or use t5components/Submit from http://87.193.218.134:8080/t5c-demo/buttonpage 
.


By the way, onSuccess() is a dangerous place to put validation.  See https://issues.apache.org/jira/browse/TAPESTRY-1972 
 .


Cheers,
Geoff

On 04/07/2008, at 8:40 PM, Udo Abel wrote:


Hi,

I think the order of events during form submission should be  
described in a state diagram or so, otherwise you cannot know when  
to do what.


I found out that the onValidate event is fired before any button  
select event.  That means, in onValidateForm you don't know whether  
the user pressed save or abort - which  should be known for  
validation.
That's probably the reason why I found so many people using  
onSuccess for validation, what I find not very beautiful.


Since form submission is very essential, I think the system (and the  
documentation) should be very clear at that point, which is not yet  
the case.


Regards,
Udo.
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

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





Using the Autocompleter

2008-07-04 Thread Andy Pahne


I am trying to implement a form that uses the Autocompleter component
  http://tapestry.apache.org/tapestry4.1/components/dojo/autocompleter.html


I had a look at the TimeTracker demo application. It already works, but 
I have one requirement that's differnet from the way the demo is 
implemented:


The time trackler loads a complete list of objects from the DAO layer:

return new DefaultAutocompleteModel(getProjectDao().list(), id, 
name);



In my application it is not possible to load the complete list from the 
database. Instead the function in my DAO layer takes one argument:


   ListLocation getManager().getLocations(String startWith);


So, how can I retrieve the user's input in the autocompleter field? For 
example: the user enters Aber, I retireve all Locations from the 
database that start with Aber (Aberdeen), and then build a model.


I tried

@EventListener(
events = onValueChanged,
targets = locationChoose
)
public void projectSelected(BrowserEvent event){

String selection = event.getMethodArguments().getString(0);
LOG.trace(Selected value = ' + selection + ');


getBuilder().updateComponent(locationDescription);
}

but that return an identifier. The problem is: I don't need an 
identifier for my call into the DAO layer, but the raw user's input...



Another question: I want my autocompleter to start async request only 
when the user entered three or more chars. Is that possible?


Andy


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



Re: [T4.1.5] RadioGroup EventListener doesn't work

2008-07-04 Thread Christophe Mesplede
Hi.

I experienced the exact same problem trying to use the RadioGroup Ajax
behaviour.
As you did, I also tried the sample code from the documentation, it did not
work.
Finally, I gave up the Ajax way, and added a looot of stuff in javascript to
make
some kind of workaround, but with no server interaction :(

Anyway it's sad neither of us managed to make this work. I wonder if someone
on
the mailing list ever used this ability of the RadioGroup...

Regards,
Chris


 Hi,
 When trying to you the onChange method on a RadioGroup component, we
 encountered the following error client side :

 [Exception... 'Error: bad srcObj for srcFunc: onChange' when calling
 method: [nsIDOMEventListener::handleEv ent]  nsresult: 0x8057001c
 (NS_ERROR_XPC_JS_THREW_JS_OBJECT)  location: unknown  data: no]

 We thought we did something wrong so we started back from the Ajax
 example on the tapestry website
 (http://tapestry.apache.org/tapestry4.1/components/form/radiogroup.html).
 Still doesn't work.

 Do you have an idea ?
 How to made the example work, is there something missing ?

 Best regards,
 Jérome.


Re: T4.1.* - Frustration with the Tapestry Maven Example

2008-07-04 Thread Richard Clark
It would also help to mention that EventListener support is broken
when using the 4.1.6-SNAPSHOT archetype. (Apparently, EventListener
has been broken since at least May in 4.1.6-SNAPSHOT, per an earlier
post on this list.)

Better yet, how about fixing it?

...Richard (who just wasted several hours before discovering the regression)


On Wed, Jul 2, 2008 at 11:07 AM, Andreas Andreou [EMAIL PROTECTED] wrote:
 That -U flag can save a lot of time (and frustration) so we could
 mention it in the guide...
 Also, the fact that you needed to define remoteRepositories should
 also be mentioned
 (it's valid for snapshot versions of the archetype)

 On the other hand, if I omit it and delete the archetype artifacts
 from my local repo,
 it still works fine (maven 2.0.8, java 1.6.0)

 Anyway, can you add a JIRA for those enhancements?

 On Wed, Jul 2, 2008 at 7:51 PM,  [EMAIL PROTECTED] wrote:
 (this isn't a question - I found a solution)

 I have installed maven - it is functioning correctly.  I have not installed 
 or
 configured anything else specific to it.

 I am simply trying to following the Tapestry Archetype explained here:

 http://tapestry.apache.org/tapestry4.1/tapestry-archetype/index.html

 When I used the command:

 mvn archetype:create -DarchetypeGroupId=org.apache.tapestry \
 -DarchetypeArtifactId=tapestry-archetype \
 -DarchetypeVersion=4.1.6-SNAPSHOT -DgroupId=org.example -DartifactId=myapp

 I get a warning:

 [INFO] [archetype:create]
 [WARNING] No archetype repository found.
 [WARNING] Specified archetype not found.

 And then I'm asked to pick an archetype.  I'm new to maven, so I'm rather
 confused (and seriously annoyed) that after specifying all these options - 
 it's
 not found.

 So I got some help on #tapestry, it seems that I need to specify the remote
 location of the repository containing the archetype's definition (and I
 remember this was also mentioned in one of Howard's T5 posts:
 http://tapestryjava.blogspot.com/2007/01/new-screencast-tapestry-maven-archetype.html).

 I think this will likely fix it (I mean, it's got to):

 mvn archetype:create -DarchetypeGroupId=org.apache.tapestry
 -DarchetypeArtifactId=tapestry-archetype
 -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/
 -DarchetypeVersion=4.1.6-SNAPSHOT -DgroupId=com.example -DartifactId=testapp

 Nope! Still -I get the warning and I'm being asked to pick one of the 36
 archetypes available to the version I'm running (maven 2.0.8)

 I have verified that there appears to be a archetypeVersion available at the
 remote repository:

 http://people.apache.org/repo/m2-snapshot-repository/org/apache/tapestry/tapestry-archetype/

 I figure that the remote repository concatenated with the groupId and
 artifactId, you'd get that URL roughly (with a replace of . with /).

 Next suggestion (from #tapestry) is that I just use the 4.1.2 
 archetypeVersion,
 so I try that:

 mvn archetype:create -DarchetypeGroupId=org.apache.tapestry
 -DarchetypeArtifactId=tapestry-archetype -DarchetypeVersion=4.1.2
 -DgroupId=org.example -DartifactId=myapp

 Again - same results (No archetype found).

 I decided to make some modifications and see if adding the remote repository
 would fix it:

 mvn archetype:create -DarchetypeGroupId=org.apache.tapestry
 -DarchetypeArtifactId=tapestry-archetype -DarchetypeVersion=4.1.2
 -DgroupId=org.example -DartifactId=myapp
 -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/

 Nope - same results (no archetype found)

 mvn archetype:create -DarchetypeGroupId=org.apache.tapestry
 -DaArtifactId=tapestry-archetype -DarchetypeVersion=4.1.2-SNAPSHOT
 -DgroupId=org.example -DartifactId=myapp
 -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/

 I know I'm missing something simple - and it's only because I'm just 
 starting to
 use Maven that I don't see what it is.  But I feel I've been a good effort to
 figure out the issue; now, I'm out of ideas

 Then I remember - you're never really out of ideas until you've googled
 everything thing you can think of regarding the problem.  So I figure that 
 some
 poor T4 developer has run into this before. Mailing lists might be the gold 
 mine
 I'm looking for.

 BAM! Nabble to the rescue!  It appears that someone had a similar issue with
 archetype not being found:

 http://www.nabble.com/problems-with-Maven-archetype-td15754471s177.html

 It appears that -U is something to pay attention to!

 I give it a whirl:

 mvn -U archetype:create -DarchetypeGroupId=org.apache.tapestry
 -DarchetypeArtifactId=tapestry-archetype
 -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/
 -DarchetypeVersion=4.1.6-SNAPSHOT -DgroupId=com.gigism -DartifactId=testapp2

 WOW!  It works!

 I guess -U forces a check for updates on releases and snapshots on remote
 repositories.

 Apparently, now that I have these updates - I could run the command without 
 the
 option it'll work.  So I do - and IT WORKS!

 My only 

Re: T4.1.* - Frustration with the Tapestry Maven Example

2008-07-04 Thread Andreas Andreou
a JIRA would help here - esp. if it contains such details (i.e.
possible date the
problem was introduced) and/or the simplest way to reproduce it

On Fri, Jul 4, 2008 at 9:08 PM, Richard Clark [EMAIL PROTECTED] wrote:
 It would also help to mention that EventListener support is broken
 when using the 4.1.6-SNAPSHOT archetype. (Apparently, EventListener
 has been broken since at least May in 4.1.6-SNAPSHOT, per an earlier
 post on this list.)

 Better yet, how about fixing it?

 ...Richard (who just wasted several hours before discovering the regression)


 On Wed, Jul 2, 2008 at 11:07 AM, Andreas Andreou [EMAIL PROTECTED] wrote:
 That -U flag can save a lot of time (and frustration) so we could
 mention it in the guide...
 Also, the fact that you needed to define remoteRepositories should
 also be mentioned
 (it's valid for snapshot versions of the archetype)

 On the other hand, if I omit it and delete the archetype artifacts
 from my local repo,
 it still works fine (maven 2.0.8, java 1.6.0)

 Anyway, can you add a JIRA for those enhancements?

 On Wed, Jul 2, 2008 at 7:51 PM,  [EMAIL PROTECTED] wrote:
 (this isn't a question - I found a solution)

 I have installed maven - it is functioning correctly.  I have not installed 
 or
 configured anything else specific to it.

 I am simply trying to following the Tapestry Archetype explained here:

 http://tapestry.apache.org/tapestry4.1/tapestry-archetype/index.html

 When I used the command:

 mvn archetype:create -DarchetypeGroupId=org.apache.tapestry \
 -DarchetypeArtifactId=tapestry-archetype \
 -DarchetypeVersion=4.1.6-SNAPSHOT -DgroupId=org.example -DartifactId=myapp

 I get a warning:

 [INFO] [archetype:create]
 [WARNING] No archetype repository found.
 [WARNING] Specified archetype not found.

 And then I'm asked to pick an archetype.  I'm new to maven, so I'm rather
 confused (and seriously annoyed) that after specifying all these options - 
 it's
 not found.

 So I got some help on #tapestry, it seems that I need to specify the remote
 location of the repository containing the archetype's definition (and I
 remember this was also mentioned in one of Howard's T5 posts:
 http://tapestryjava.blogspot.com/2007/01/new-screencast-tapestry-maven-archetype.html).

 I think this will likely fix it (I mean, it's got to):

 mvn archetype:create -DarchetypeGroupId=org.apache.tapestry
 -DarchetypeArtifactId=tapestry-archetype
 -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/
 -DarchetypeVersion=4.1.6-SNAPSHOT -DgroupId=com.example -DartifactId=testapp

 Nope! Still -I get the warning and I'm being asked to pick one of the 36
 archetypes available to the version I'm running (maven 2.0.8)

 I have verified that there appears to be a archetypeVersion available at the
 remote repository:

 http://people.apache.org/repo/m2-snapshot-repository/org/apache/tapestry/tapestry-archetype/

 I figure that the remote repository concatenated with the groupId and
 artifactId, you'd get that URL roughly (with a replace of . with /).

 Next suggestion (from #tapestry) is that I just use the 4.1.2 
 archetypeVersion,
 so I try that:

 mvn archetype:create -DarchetypeGroupId=org.apache.tapestry
 -DarchetypeArtifactId=tapestry-archetype -DarchetypeVersion=4.1.2
 -DgroupId=org.example -DartifactId=myapp

 Again - same results (No archetype found).

 I decided to make some modifications and see if adding the remote repository
 would fix it:

 mvn archetype:create -DarchetypeGroupId=org.apache.tapestry
 -DarchetypeArtifactId=tapestry-archetype -DarchetypeVersion=4.1.2
 -DgroupId=org.example -DartifactId=myapp
 -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/

 Nope - same results (no archetype found)

 mvn archetype:create -DarchetypeGroupId=org.apache.tapestry
 -DaArtifactId=tapestry-archetype -DarchetypeVersion=4.1.2-SNAPSHOT
 -DgroupId=org.example -DartifactId=myapp
 -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/

 I know I'm missing something simple - and it's only because I'm just 
 starting to
 use Maven that I don't see what it is.  But I feel I've been a good effort 
 to
 figure out the issue; now, I'm out of ideas

 Then I remember - you're never really out of ideas until you've googled
 everything thing you can think of regarding the problem.  So I figure that 
 some
 poor T4 developer has run into this before. Mailing lists might be the gold 
 mine
 I'm looking for.

 BAM! Nabble to the rescue!  It appears that someone had a similar issue with
 archetype not being found:

 http://www.nabble.com/problems-with-Maven-archetype-td15754471s177.html

 It appears that -U is something to pay attention to!

 I give it a whirl:

 mvn -U archetype:create -DarchetypeGroupId=org.apache.tapestry
 -DarchetypeArtifactId=tapestry-archetype
 -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/
 -DarchetypeVersion=4.1.6-SNAPSHOT -DgroupId=com.gigism -DartifactId=testapp2

 WOW!  It works!

 

Re: [T5] Rendering a button for a t:eventlink

2008-07-04 Thread Geoff Callender
Ouch, the button displays correctly in IE7 but it just don't respond.   
In that case I think we're left with the Button component at  
t5components:


	button t:type=t5components/Button type=button t:event=clickDo  
something/button


with

Object onClick() {
return _page2;
}

See http://87.193.218.134:8080/t5c-demo/buttonpage .
Get t5c-commons and t5c-contrib from http://code.google.com/p/tapestry5-components/ 
 .

To work they must be deployed in WEB-INF/lib .
Geoff

On 05/07/2008, at 3:44 AM, Martijn Brinkers (List) wrote:


I have tried this as well but it doesn't seemt to be working with IE7
(it does with FF2 though).

I have tried to replace input by button but that does not work
either. Is there another way to get a button that just links to  
another

page?

Martijn


On Sat, 2008-07-05 at 00:03 +1000, Geoff Callender wrote:

Try
t:eventlink t:event=click style=text-decoration: none
input type=button value=Click/
/t:eventlink
with
Object onClick() {
return _page2;
}
Geoff

On 04/07/2008, at 11:46 PM, Rene A wrote:



Hi Serge,

i tried what you suggested, it works fine with FireFox 2.0. But when
i try
it on IE 7.06, it doesn't work !

Have you any idea why ?

Best regards

Rene


SergeEby wrote:


Hi,

Try this:

in your template:

.
t:eventlink t:id=button1
input type=button
value=Click /
/t:eventlink
...

and your Java class:

public class MyPage {

@Component(parameters = {event=clickButton1})
  private EventLink button1;


// Your event handler
// You can also use annotations
  void onClickButton1() {

  }

}


/Serge


Rene A wrote:


Hi all,

I'm converting my application from T4 to T5.  In T4, i was able to
write
:
input id=button1 jwcid=@DirectLink
listener=listener:clickButton1  
renderer
=
ognl
:@org
.apache
[EMAIL PROTECTED]Click/
input
and it would render a nice button that would call my listener when
selected.

In T5, I'm trying to wrap a t:eventlink with a button.  But with  
no

success.

Is it possible to render a button, similar to a PageLink but with
eventLink in T5?








--
View this message in context: 
http://www.nabble.com/-T5--Rendering-a-button-for-a-t%3Aeventlink-tp18263658p18279855.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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






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





Re: Form event order issues

2008-07-04 Thread Geoff Callender
Sorry but the technique I posted for an Abort button doesn't work in  
IE7.   However, the Buttons component from t5components does work.


	button t:type=t5components/Button type=button  
t:event=abortAbort/button

See http://87.193.218.134:8080/t5c-demo/buttonpage .
Get t5c-commons and t5c-contrib jars from http://code.google.com/p/tapestry5-components/ 
 .

To work, the jars must be deployed in WEB-INF/lib .
Cheers,
Geoff


On 04/07/2008, at 9:53 PM, Geoff Callender wrote:

I'm assuming Abort can ignore what you've typed into the form, in  
which case the more common technique is to use a link component  
instead of a submit.  That way you bypass the validators.  You can  
style a link to look like the submit button easily enough if that's  
what you'd like, eg.


input type=submit value=Save/
	a t:type=pagelink t:page=thePreviousPage style=text- 
decoration: none

input type=button value=Abort/
/a

Or use t5components/Submit from http://87.193.218.134:8080/t5c-demo/buttonpage 
.


By the way, onSuccess() is a dangerous place to put validation.  See https://issues.apache.org/jira/browse/TAPESTRY-1972 
 .


Cheers,
Geoff

On 04/07/2008, at 8:40 PM, Udo Abel wrote:


Hi,

I think the order of events during form submission should be  
described in a state diagram or so, otherwise you cannot know when  
to do what.


I found out that the onValidate event is fired before any button  
select event.  That means, in onValidateForm you don't know whether  
the user pressed save or abort - which  should be known for  
validation.
That's probably the reason why I found so many people using  
onSuccess for validation, what I find not very beautiful.


Since form submission is very essential, I think the system (and  
the documentation) should be very clear at that point, which is not  
yet the case.


Regards,
Udo.
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

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







can we use zone and block for grid with inplace=true?

2008-07-04 Thread Tan Min Hong
hi,

can we use zone and block for grid with inplace enabled? because data in
grid need to refresh without refreshing the whole page.  is there any way to
do it?
ajaxformloop is not really much documentation. any other way?

Thank you
MH


Re: [T5] Rendering a button for a t:eventlink

2008-07-04 Thread Geoff Callender
Agreed. For anyone who's wondering if this is a Tapestry limitation,  
I'm pretty sure the answer is no.  The limitation is IE.


If anyone knows how to write plain HTML to make a hyperlink look like  
a button, or to make a button behave like a hyperlink, then please  
chime in!


The tricky bit is that it must work in IE and not contain javascript.

Geoff

On 05/07/2008, at 1:28 PM, Martijn Brinkers (List) wrote:



On Sat, 2008-07-05 at 10:03 +1000, Geoff Callender wrote:

Ouch, the button displays correctly in IE7 but it just don't respond.
In that case I think we're left with the Button component at
t5components:

	button t:type=t5components/Button type=button  
t:event=clickDo

something/button


That's what I finally did as well and that's working. Too bad though
that I have not yet found a solution yet that does not require
javascript enabled.

Martijn


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




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



Re: [T5] Rendering a button for a t:eventlink

2008-07-04 Thread Martijn Brinkers (List)
Initially I used a submit button for the cancel button. But, that is
problematic when you use client side validation because it's not (yet)
AFAIK possible to disable client side validation. That's why I tried to
use a link to 'escape' from the page. Perhaps a combination of sumbit
button and link will be the solution.


Idea:
Use a submit button for the cancel but add an onClick event handler.
When the event handler gets called you know that javascript is enabled.
In the onClick stop the sumbit event en set href to go to the other
page. If javascript is not enabled you can use the normal way to cancel
the page (by setting a cancel boolean).

Martijn   

On Sat, 2008-07-05 at 14:29 +1000, Geoff Callender wrote:
 Agreed. For anyone who's wondering if this is a Tapestry limitation,  
 I'm pretty sure the answer is no.  The limitation is IE.
 
 If anyone knows how to write plain HTML to make a hyperlink look like  
 a button, or to make a button behave like a hyperlink, then please  
 chime in!
 
 The tricky bit is that it must work in IE and not contain javascript.
 
 Geoff
 
 On 05/07/2008, at 1:28 PM, Martijn Brinkers (List) wrote:
 
 
  On Sat, 2008-07-05 at 10:03 +1000, Geoff Callender wrote:
  Ouch, the button displays correctly in IE7 but it just don't respond.
  In that case I think we're left with the Button component at
  t5components:
 
 button t:type=t5components/Button type=button  
  t:event=clickDo
  something/button
 
  That's what I finally did as well and that's working. Too bad though
  that I have not yet found a solution yet that does not require
  javascript enabled.
 
  Martijn
 
 
  -
  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: Grid cell with customized font color

2008-07-04 Thread victor zhou
Geoff,

Thanks for your suggestion.  It worked out well for me.  I'm using severity
level as a string value in the cell.  I defined css class as the same name
as severity level so I skipped getSeverityLevelClass method.  Example:

In css file:
div.Critical{ color: red; }
div.Major{ color: orange; }

In tml page:
  t:parameter name=severityCell
  div class=${alarm.severity}${alarm.severity}/div
  /t:parameter

Again thank you very much,
-victor

On Thu, Jul 3, 2008 at 5:46 AM, Geoff Callender 
[EMAIL PROTECTED] wrote:

 That would be fine to give one style to the whole column, but I think the
 issue is he wants the style to vary based on the value in the cell.


 On 03/07/2008, at 10:27 PM, Thiago H. de Paula Figueiredo wrote:

  Em Thu, 03 Jul 2008 07:56:48 -0300, Geoff Callender 
 [EMAIL PROTECTED] escreveu:

  ...try putting a div in a t:parameter and varying the div's class, eg.


 Why don't you use pure CSS? If the objects in your Grid have a name
 property, for example, its cell is generated with td class=name. Thus,
 you just need to define a rule like this in you CSS file:

 table.t-data-grid td.name {
background-color: red;
 }

 Thiago

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