Re: T5: Validation title message

2009-06-03 Thread kasper
Thanks, but do you also know how?

Yours,
Kasper

On Wed, 03 Jun 2009 09:29:58 +0200, Ulrich Stärk  wrote:
> Yes it is.
> 
> Uli
> 
> kas...@nekoconeko.nl schrieb:
>> Hi,
>>
>> On top of the validation messages there is an english sentence: "You
> must
>> correct the following errors before you may continue."
>>
>> Is it possible to override this message?
>>
>> Thanks in common,
>> Yours,
>> Kasper
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org

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



T5: Validation title message

2009-06-03 Thread kasper
Hi,  

On top of the validation messages there is an english sentence: "You must
correct the following errors before you may continue."

Is it possible to override this message?

Thanks in common,
Yours,
Kasper

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



T5: validation without instant popups

2009-06-02 Thread kasper


 Hi,  

 Is it possible to perform the validation in forms without getting
the black pop-ups?   

 http://tapestry.apache.org/tapestry5/tutorial1/address-v6.png 

T5: Multiple Select preselected values

2009-04-10 Thread Kasper

Hi all,

I have a form with a multiple select field:
t:id="preferredRegions" t:multiple="true" size="13" />


Where the t:model="regions" = HashMap. Now when the page  
loads I want some preferredRegions to be set. For normal form fields I  
use a setFieldValue(), so I tried to do this also for this Select field.


public HashMap getPreferredRegions() {
HashMap l = new HashMap();
l.put(Long.valueOf(1), "first field");
l.put(Long.valueOf(2), "second field");
l.put(Long.valueOf(3), "third field");
return l;
}

This doesn't work, it also doesn't work when I try to use List  
or just long[]. It does work when I use plain long. But then only one  
option can be preselected.


Does anyone have a clue how to let more than one value be preseleced?

Thanks,
Yours,
Kasper


--
http://kasper.nekoconeko.nl






This message was sent using IMP, the Internet Messaging Program.


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



T5: AccessController Dispatcher asm.exists() not working?

2009-03-31 Thread Kasper

Hi,

I am trying to create a dispatcher to define the access levels for the  
current user. I have followed the steps from the Wiki pages:

http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher
http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher2

This seems to work. But as I try to do  
asm.exists(UserPermissions.class) it returns false. I checked the  
classpath for the class my.project.services.UserPermissions. And there  
it does exist. I also tried to make it an interface but this didn't  
work out either.


My classes:
--
AccessController.java:

public class AccessController implements Dispatcher {

private ApplicationStateManager asm;

public AccessController(ApplicationStateManager asm) {
this.asm = asm;
}

	public boolean dispatch(Request request, Response response) throws  
IOException {

boolean canAccess = true; // to avoid the access violation for 
now

if (asm.exists(UserPermissions.class)) {
UserPermissions perms = asm.get(UserPermissions.class);

canAccess = perms.canAccess(request);
}

if (!canAccess) {
throw new RuntimeException("Access violation!");
}

return false;
}
}

--
UserPermissions.java:

public class UserPermissions {

public boolean canAccess(Request request) {
return true;
}

}
--
AppModule.java:

public class AppModule {

public static void bind(ServiceBinder binder) {
binder.bind(AccessController.class).withId("AccessController");
}

	public void  
contributeMasterDispatcher(OrderedConfiguration  
configuration,

@InjectService("AccessController") Dispatcher 
accessController) {
		configuration.add("AccessController", accessController,  
"before:PageRender");

}
}
--

Does anyone have a clue what I am doing wrong?

Yours,
Kasper


This message was sent using IMP, the Internet Messaging Program.


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



Re: T5: Loop through HashMap.

2009-03-16 Thread kasper
Problem solved since I always know the Key values I read them now directly.

I loop through the list and then read the hashmap.
List>
${ognl:post.get('title')}

Yours,
Kasper

> Hi all,
>
> I have a List> which can be looped through by the Loop
> component. This works fine, but I also need Key values. As far as I know,
> a list only has integer key values where I do need Strings. For this I
> want to use a List>. But it seems to be impossible
> to loop through a HashMap. (it may also be HashMap String>>)
>
> Currently I am doing this:
> 
>   
>   
>   ${var:postDetail}
>   
>   
> 
>
> When I try to do the same with a HashMap, it doesn't work.
>
> The final layout must be:
> key: value
> As in: Author: Someone
>
> Does someone know how to do this inside the *.tml file?
>
> Thanks,
> Yours,
> Kasper
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



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



T5: Loop through HashMap.

2009-03-16 Thread kasper
Hi all,

I have a List> which can be looped through by the Loop
component. This works fine, but I also need Key values. As far as I know,
a list only has integer key values where I do need Strings. For this I
want to use a List>. But it seems to be impossible
to loop through a HashMap. (it may also be HashMap>)

Currently I am doing this:



${var:postDetail}




When I try to do the same with a HashMap, it doesn't work.

The final layout must be:
key: value
As in: Author: Someone

Does someone know how to do this inside the *.tml file?

Thanks,
Yours,
Kasper


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



Re: T5.0.10 to T5.0.18 Component not found

2009-02-17 Thread kasper
Thanks, I see now that I somehow managed to remove all tapestry libs
without really having troubles during the programming. 

Anyhow, this works.

- Kasper

On Tue, 17 Feb 2009 12:20:34 -0300, "Thiago H. de Paula Figueiredo"
 wrote:
> On Tue, Feb 17, 2009 at 12:16 PM,   wrote:
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.tapestry.annotations.IncludeStylesheet
> 
> Here's the problem: the IncludeStylesheet annotation was not found.
> Make sure you have tapestry-annotations-5.0.18 in your webapp
> classpath.
> 
> --
> Thiago
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org

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



Re: T5.0.10 to T5.0.18 Component not found

2009-02-17 Thread kasper
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException:
caught an exception while obtaining a class file for
nl.collection.components.Layout
at
org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:296)
at
org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findInstantiator(ComponentInstantiatorSourceImpl.java:272)
at
$ComponentInstantiatorSource_11f84ccb123.findInstantiator($ComponentInstantiatorSource_11f84ccb123.java)
at
org.apache.tapestry5.internal.services.PageElementFactoryImpl.newComponentElement(PageElementFactoryImpl.java:216)
... 56 more
Caused by: java.lang.ClassNotFoundException: caught an exception while
obtaining a class file for nl.collection.components.Layout
at javassist.Loader.findClass(Loader.java:359)
at
org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:92)
at javassist.Loader.loadClass(Loader.java:311)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at
org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:292)
... 59 more
Caused by: org.apache.tapestry5.internal.services.TransformationException:
java.lang.ClassNotFoundException:
org.apache.tapestry.annotations.IncludeStylesheet
at
org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:176)
at
$ComponentClassTransformer_11f84ccb12f.transformComponentClass($ComponentClassTransformer_11f84ccb12f.java)
at
org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:201)
at javassist.Loader.findClass(Loader.java:340)
... 63 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException:
org.apache.tapestry.annotations.IncludeStylesheet
at
org.apache.tapestry5.internal.services.InternalClassTransformationImpl.assembleClassAnnotations(InternalClassTransformationImpl.java:1569)
at
org.apache.tapestry5.internal.services.InternalClassTransformationImpl.getClassAnnotations(InternalClassTransformationImpl.java:1541)
at
org.apache.tapestry5.internal.services.InternalClassTransformationImpl.getAnnotation(InternalClassTransformationImpl.java:347)
at
org.apache.tapestry5.internal.transform.MetaWorker.transform(MetaWorker.java:32)
at
$ComponentClassTransformWorker_11f84ccb16b.transform($ComponentClassTransformWorker_11f84ccb16b.java)
at
$ComponentClassTransformWorker_11f84ccb161.transform($ComponentClassTransformWorker_11f84ccb161.java)
at
org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:170)
... 66 more
Caused by: java.lang.ClassNotFoundException:
org.apache.tapestry.annotations.IncludeStylesheet
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
javassist.bytecode.annotation.MemberValue.loadClass(MemberValue.java:51)
at
javassist.bytecode.annotation.Annotation.toAnnotationType(Annotation.java:293)
at javassist.CtClassType.toAnnoType(CtClassType.java:591)
at javassist.CtClassType.toAnnotationType(CtClassType.java:492)
at javassist.CtClassType.getAnnotations(CtClassType.java:458)
at javassist.CtClassType.getAnnotations(CtClassType.java:438)
at
org.apache.tapestry5.internal.services.InternalClassTransformationImpl.assembleClassAnnotations(InternalClassTransformationImpl.java:1556)
... 72 more

- Kasper

On Tue, 17 Feb 2009 12

Re: T5.0.10 to T5.0.18 Component not found

2009-02-17 Thread kasper
I see that the two examples were removed because it was html. 
Start(1).tml.txt is the first 
Start(2).tml.txt the second

- Kasper

On Tue, 17 Feb 2009 16:03:24 +0100,  wrote:
> 
> 
>  Hi,
> 
>  I've created a small project but I just figured out that I was still
> using tapestry 5.0.10 instead of the latest version. So I removed the
> old jars and replaced them with new ones. So far so good, I fixed the
> imports some other things that needed to be changed. Then I ran the
> application again and it gave me an unexpected error.
> 
>  An unexpected application exception has occurred.
> java.lang.ClassNotFoundException: caught an exception while obtaining
> a class file for nl.collection.components.Layout
> 
>  In t5.0.10 the template files and the class files for Layout were
> inside the nl.collections.components package. I've read somewhere on
> the mailinglist that they might need to be separated so I moved the
> Layout.tml file to my WebContent folder. In both ways it didn't work
> out.
> 
>  My webpage is: (Start.tml)
>  ... insert random text here ...
>  And there is a the Layout.tml which is basically nothing more than
> the most simple html file. I also tried to modify Start.tml to:
> 
>  ... insert random text here ...
>  Which also didn't work out. When I edited the Start.tml to be a
> small html file it worked.
> 
>  Does anybody has a clue?
> 
>  - Kasperhttp://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
... insert random text here ...
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

T5.0.10 to T5.0.18 Component not found

2009-02-17 Thread kasper


 Hi,  

 I've created a small project but I just figured out that I was still
using tapestry 5.0.10 instead of the latest version. So I removed the
old jars and replaced them with new ones. So far so good, I fixed the
imports some other things that needed to be changed. Then I ran the
application again and it gave me an unexpected error.

 An unexpected application exception has occurred.
java.lang.ClassNotFoundException: caught an exception while obtaining
a class file for nl.collection.components.Layout   

 In t5.0.10 the template files and the class files for Layout were
inside the nl.collections.components package. I've read somewhere on
the mailinglist that they might need to be separated so I moved the
Layout.tml file to my WebContent folder. In both ways it didn't work
out.  

 My webpage is: (Start.tml)  
 ... insert random text here ...
 And there is a the Layout.tml which is basically nothing more than
the most simple html file. I also tried to modify Start.tml to: 

 ... insert random text here ...
 Which also didn't work out. When I edited the Start.tml to be a
small html file it worked.   

 Does anybody has a clue?  

 - Kasper