Re: T5.0.13: form problem

2008-06-12 Thread Harald Geritzer



java.lang.ClassNotFoundException: caught an exception while obtaining a
class file for org.apache.tapestry5.corelib.components.Form.


if its the slf4j logger, which isn't found and you're using jetty try to put a file called 
jetty-web.xml into your WEB-INF folder.



jetty-web.xml:
==
?xml version=1.0  encoding=ISO-8859-1?
!DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN 
http://jetty.mortbay.org/configure.dtd;


Configure class=org.mortbay.jetty.webapp.WebAppContext
Set name=parentLoaderPrioritytrue/Set
/Configure


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



Re: T5.0.13: form problem

2008-06-12 Thread Weisu

Thanks Harald! It works now.
Wei.

Harald Geritzer-2 wrote:
 
 
 java.lang.ClassNotFoundException: caught an exception while obtaining a
 class file for org.apache.tapestry5.corelib.components.Form.
 
 if its the slf4j logger, which isn't found and you're using jetty try to
 put a file called 
 jetty-web.xml into your WEB-INF folder.
 
 
 jetty-web.xml:
 ==
 ?xml version=1.0  encoding=ISO-8859-1?
 !DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN 
 http://jetty.mortbay.org/configure.dtd;
 
 Configure class=org.mortbay.jetty.webapp.WebAppContext
   Set name=parentLoaderPrioritytrue/Set
 /Configure
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5.0.13%3A-form-problem-tp17790631p17793925.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: T5 Components - Help with SidePanel

2008-06-12 Thread Filip S. Adamsen

Sven, you forgot the subtle Jedi hand movement. ;)

-Filip

Sven Homburg skrev:

the parameter closed is not implemented.
youre pleased to add an issue
http://code.google.com/p/tapestry5-components/issues/list


2008/6/11 Marcus [EMAIL PROTECTED]:


Hi,

How can I configure t5components.SidePanel to start not closed?
closed=false dosen't work :(

thanks,

Marcus







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



Re: T5 Components - Help with SidePanel

2008-06-12 Thread Sven Homburg
sorry,
for a moment the jedi power was left my spirit

2008/6/12 Filip S. Adamsen [EMAIL PROTECTED]:

 Sven, you forgot the subtle Jedi hand movement. ;)

 -Filip

 Sven Homburg skrev:

 the parameter closed is not implemented.
 youre pleased to add an issue
 http://code.google.com/p/tapestry5-components/issues/list


 2008/6/11 Marcus [EMAIL PROTECTED]:

  Hi,

 How can I configure t5components.SidePanel to start not closed?
 closed=false dosen't work :(

 thanks,

 Marcus





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




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


Re: T5 t:renderObject and pageLink won't render link just text instead

2008-06-12 Thread Konstantin

Irony ... good :-) Thanks for trying to help me with my dumb questions.
I simplified my first sample, let me make it more close to what I wanted:

@Property
private MyGridRowObject myObject; // t:grid row=myObject ...

public Object getMyDynaObject() {
Link testLink;
switch(myObject.type) {
case TYPE1:
testLink =
componentResources.createPageLink(targetPageHere, true, 11);
// here I need to get myObject.description to put it into
link, but
// don't know how to do that, you know ?
// also some link context would be nice but that could be
addParameter(context, ...) ??
return testLink;
case TYPE2:
return myObject.description; // no link just render text
into this grid cell
}
} 

I created custom component with t:if and syntetic properties isType1(),
isType2() as a workaround (or should I say: As a right way of doing things
in Tapestry). But that seems weird to do like that. Why can't I use
getMyDynaObject() to tell Tapestry of what I need to render ?


Filip S. Adamsen-2 wrote:
 
 Hi,
 
 I see. It's actually easier than you'd think. Here's what you do:
 
 Class:
 
@Inject
private ComponentResources componentResources;
 
public String getLink() {
  return componentResources.createPageLink(targetpagehere, 
 true).toURI();
}
 
 Template:
 
 ${link} text for link 
 
 See? It's easy. :)
 
 But since you're linking to a page, why not just use the PageLink 
 component? That's even easier.
 
t:pagelink t:page=targetpageheretext for link/t:pagelink
 
 You can see all the components here:
 http://tapestry.apache.org/tapestry5/tapestry-core/ref/index.html
 
 Hope this helps.
 
 -Filip
 
 Konstantin skrev:
 I think I'm missing concept behind renderObject component.
 The original idea was to render Link or just some text basing on other
 page
 properties and actual object to be rendered should be returned by public
 Object getMyDynaObject().
 So I need to get href ... in page markup for link, but instead I get
 targetPageHere/11.
 Is it possible to do without creating custom component ?
 
 
 Filip S. Adamsen-2 wrote:
 Hi,

 Tapestry does what you ask it to do - returns a (relative) URI for the 
 link. (Check out the Javadocs/source for AbstractLink to see this.)

 I suspect that calling toAbsoluteURI() on the link will give you what 
 you want. Oh, and you won't need RenderObject for that - you can just do 
 an expansion ${myDynaObject} in that case.

 -Filip

 Konstantin skrev:
 in tml:

 t:renderobject object=myDynaObject/

 in java:

 @Inject
 private ComponentResources componentResources;

 public Object getMyDynaObject() {
 Link testLink;
 testLink = componentResources.createPageLink(targetPageHere,
 true,
 11);
 return testLink;
 }

 Renders text targetPageHere/11 instead of actual link. What am I
 doing
 wrong here ?

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

-- 
View this message in context: 
http://www.nabble.com/T5-t%3ArenderObject-and-pageLink-won%27t-render-link-just-text-instead-tp17782707p17794921.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]



T5.0.13 : Form submit not refreshing page anymore

2008-06-12 Thread Stephane Decleire
It seems that since i've upgraded my app on T5.0.13, an event like the 
one below doesn't refresh the page anymore :


Object onSuccessFromMyForm() {
   ...
   return this;
}


Any clue ?

Stephane


Creating a mixin on a component that is not a field

2008-06-12 Thread Lance Java
I'm trying to create a SortableTarget mixin on my own component but am not
having any luck as yet.
I have created a MixinAny component that implements ClientElement so I can
attach mixins to an Any style component and get the client id.

I have not been able to find any examples of attaching a mixin to a
component that does not extend field.

At the moment, when I attach my mixin to my MixinAny
div t:id=sort1 t:type=mixinAny t:mixins=sortableTarget
t:accept=...

My mixin parameters (@Parameter) are populated but the container
(@InjectContainer) is null in the afterRender method of my mixin.

Any suggestions as to what to do?

I have added the following to MixinAny

@Mixin @SuppressWarnings(unused)
private DiscardBody discardBody;

@Mixin @SuppressWarnings(unused)
private RenderInformals renderInformals;

Thanks,
Lance.








I have a mixin that uses @Parameter to get parameter and @InjectContainer to
inject the container
I include my mixin


How do you deal with dynamic fields

2008-06-12 Thread Eric BIANCHI

Hello List,

My application use dynamic fields that I create on the fly in a loop.

Problem is : If a field trigger an error, how can I highlight it  
correctly.


I don't want to use the per field onValidate mechanism  since all  
the values of the form have not been set yet and I want to do cross  
validation between these values.


I can't use a validationTracker since recordError take a Field as  
parameter. My fields are dynamic. In fact, I would like to recordError  
not on a field, but on a clientId.


If I get a Field from the clientId using componetResources, I always  
get the last Field of the Form.


Any ideas.

Thanks

Eric
--
Eric BIANCHI [EMAIL PROTECTED]
http://www.rodanotech.ch

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



Re: T5: BeanEditor component containing BeanEditor component

2008-06-12 Thread Kristian Marinkovic
Hi Howard,

unfortunately it does not work at least as i am doing it :)

could you take a look at the sample page below and verify
whether i've done a mistake or there is a bug. As mentionend
before the display of the beaneditor components works as
expected but when is submit the page i get a stackoverflow 
with this stacktrace 

two propertyconduits call temselves in an infinite loop:

g,
kris

RequestExceptionHandler:45 - Processing of request failed with uncaught 
exception: java.lang.StackOverflowError
java.lang.StackOverflowError
at java.lang.String.equalsIgnoreCase(String.java:950)
at 
org.apache.tapestry5.ioc.util.CaseInsensitiveMap$CIMEntry.matches(
CaseInsensitiveMap.java:84)
at org.apache.tapestry5.ioc.util.CaseInsensitiveMap.tunePosition(
CaseInsensitiveMap.java:454)
at org.apache.tapestry5.ioc.util.CaseInsensitiveMap.select(
CaseInsensitiveMap.java:427)
at org.apache.tapestry5.ioc.util.CaseInsensitiveMap.select(
CaseInsensitiveMap.java:390)
at org.apache.tapestry5.ioc.util.CaseInsensitiveMap.get(
CaseInsensitiveMap.java:367)
at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.getBinding(
InternalComponentResourcesImpl.java:284)
at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:230)
at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:252)
at 
org.apache.tapestry5.corelib.components.BeanEditor._$read_parameter_object(BeanEditor.java)
at org.apache.tapestry5.corelib.components.BeanEditor.getObject(
BeanEditor.java:130)
at 
$PropertyConduit_11a7c41c4f2.get($PropertyConduit_11a7c41c4f2.java)
at org.apache.tapestry5.internal.bindings.PropBinding.get(
PropBinding.java:53)
at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:237)
at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:252)
at 
org.apache.tapestry5.corelib.components.PropertyEditor._$read_parameter_object(PropertyEditor.java)
at 
org.apache.tapestry5.corelib.components.PropertyEditor.access$2(
PropertyEditor.java:72)
at 
org.apache.tapestry5.corelib.components.PropertyEditor$1.getPropertyValue(
PropertyEditor.java:152)
at 
$PropertyConduit_11a7c41c4eb.get($PropertyConduit_11a7c41c4eb.java)
at org.apache.tapestry5.internal.bindings.PropBinding.get(
PropBinding.java:53)
at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:237)
at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:252)
at 
org.apache.tapestry5.corelib.components.BeanEditor._$read_parameter_object(BeanEditor.java)
at org.apache.tapestry5.corelib.components.BeanEditor.getObject(
BeanEditor.java:130)
at 
$PropertyConduit_11a7c41c4f2.get($PropertyConduit_11a7c41c4f2.java)
at org.apache.tapestry5.internal.bindings.PropBinding.get(
PropBinding.java:53)
at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:237)
at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:252)
at 
org.apache.tapestry5.corelib.components.PropertyEditor._$read_parameter_object(PropertyEditor.java)
at 
org.apache.tapestry5.corelib.components.PropertyEditor.access$2(
PropertyEditor.java:72)
at 
org.apache.tapestry5.corelib.components.PropertyEditor$1.getPropertyValue(
PropertyEditor.java:152)
at 
$PropertyConduit_11a7c41c4eb.get($PropertyConduit_11a7c41c4eb.java)
at org.apache.tapestry5.internal.bindings.PropBinding.get(
PropBinding.java:53)

page:
public class EditorTest
{
   @Persist @Property
   private EditorEntityA a;
 
   @Component private Form form;
 
   @Component private Submit link;
 
   @Component(parameters={object=a,data=block:dataBlock})
   private BeanEditor editor;
 
   @Component(parameters={object=context.propertyValue,model=model})
   private BeanEditor editor2;
 
   @Environmental @Property
   private PropertyEditContext context;
 
   @Inject
   private BeanModelSource modelSource;
 
   @Inject
   private ComponentResources resources;

   public BeanModel getModel() {
  return modelSource.create(context.getPropertyType(), false, 
resources);
   } 

   void setupRender() {
  if(a == null)
 a = new EditorEntityA(Long.valueOf(5),xxx,yyy,new 
EditorEntityB(Austria,german));
   }


template:
html xmlns=http://www.w3.org/1999/xhtml;
xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 
head

Starting T4, what database layer to use?

2008-06-12 Thread James Sherwood
Hello all,

Currently all our development is in T3(I know we are behind).

The word has come down its time to upgrade.  My question is, what technology 
works best with T4 as the layer between it and the database?

Currently we use Torque with T3(behind again I know).  I have been researching 
it and hibernate pops up everywhere but it seems like most of the posts are 
from 2006 or earlier.

So what is the best solution for us?(Is maybe T5 and something better than 
going T4 even?)  

Thanks in advance for your advice,

--James

Re: Starting T4, what database layer to use?

2008-06-12 Thread Filip S. Adamsen

Hi James,

I'd recommend you skip T4 and go straight to T5 if you can live with it 
not being final yet. As far as I know the final release should happen 
sometime this summer, though.


T5 is already quite mature, though - I've been using T5 in production 
for more than 7 months with only minor issues along the way.


Hibernate is very much alive and kicking - check the tapestry-hibernate 
module, which adds some very nice, slick Hibernate 3 support to T5.


Oh, and if you decide to use Hibernate... get the book from Manning, 
Java Persistence with Hibernate - formerly known as Hibernate in Action.


-Filip


James Sherwood skrev:

Hello all,

Currently all our development is in T3(I know we are behind).

The word has come down its time to upgrade.  My question is, what technology 
works best with T4 as the layer between it and the database?

Currently we use Torque with T3(behind again I know).  I have been researching 
it and hibernate pops up everywhere but it seems like most of the posts are 
from 2006 or earlier.

So what is the best solution for us?(Is maybe T5 and something better than going T4 even?)  


Thanks in advance for your advice,

--James


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



Re: Starting T4, what database layer to use?

2008-06-12 Thread 9902468

Hi,

You really should skip T4. I've used both and must say that T5 is really
much clearer and easier to work with.

If you want to go serious with technology, you should probably look for
Hibernate - Spring - T5 combo. For our latest project we decided to drop
Spring, because T5 ioc offered everything we need - and configuration went
down from 2 ~ 400 line xml files to 20 rows in AppModule... (Binds) That's
amazing :) Also the app is generally faster, because many Spring filters are
left out now.

Only word of caution is that T5 is not final yet. And there are some
components / functionality missing that should be there. (Date picker
localization for an example.)

Buy a book (Tapestry 5 - Buildin Web Applications by Alexander Kolesnikov is
ok.) and make a small POC with T5. Fastest way is to download Netbeans 6.1
and use it's maven support to start new project using archetype. Here is a
tutorial how to do that :
http://www.troymaxventures.com/2008/05/tapestry5-netbeans-quickstart.html

 - 99


James Sherwood wrote:
 
 Hello all,
 
 Currently all our development is in T3(I know we are behind).
 
 The word has come down its time to upgrade.  My question is, what
 technology works best with T4 as the layer between it and the database?
 
 Currently we use Torque with T3(behind again I know).  I have been
 researching it and hibernate pops up everywhere but it seems like most of
 the posts are from 2006 or earlier.
 
 So what is the best solution for us?(Is maybe T5 and something better than
 going T4 even?)  
 
 Thanks in advance for your advice,
 
 --James
 

-- 
View this message in context: 
http://www.nabble.com/Starting-T4%2C-what-database-layer-to-use--tp17797716p17799716.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]



Question about T5's page lifecycle - instance variables NOT being purged

2008-06-12 Thread Ciaran Wood
I¹ve noticed on a tapestry app that we are building, that if two users on
separate machines go to the same page, the second user can see the first
users submitted details on the form. We¹re just using a Form component, a
model Object in the page class and declaring each of the properties as
Œeditor¹ components (Textfield, Checkbox etc) like so:

t:textfield t:id=userName t:value=member.credentials.userName
t:validate=required,minLength=4,maxLength=16,regexp²/

We¹re not using a beanEditForm since the Member object has nested objects
such as Credentials, Contact etc. I¹ve checked that the two users are
getting different JSESSIONIDs, so no session sharing is present. There is a
@Persist(session) annotation on the Member model object inside the page. Is
this a bug in Tapestry? I thought that Tapestry was meant to clear all
instance variables once the page returns to the pool?

Cheers for any help, I¹m completely stumped!

Ciaran Wood


RE: Question about T5's page lifecycle - instance variables NOT being purged

2008-06-12 Thread Kristian Marinkovic
could you post the source of your page and template?
are you using https? http - https switches?

we're already using T5 in production and never had this issues

g,
kris




Ciaran Wood [EMAIL PROTECTED] 
12.06.2008 16:03
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
Tapestry users users@tapestry.apache.org
Kopie

Thema
Question about T5's page lifecycle - instance variables NOT being purged






I¹ve noticed on a tapestry app that we are building, that if two users on
separate machines go to the same page, the second user can see the first
users submitted details on the form. We¹re just using a Form component, a
model Object in the page class and declaring each of the properties as
Œeditor¹ components (Textfield, Checkbox etc) like so:

t:textfield t:id=userName t:value=member.credentials.userName
t:validate=required,minLength=4,maxLength=16,regexp²/

We¹re not using a beanEditForm since the Member object has nested objects
such as Credentials, Contact etc. I¹ve checked that the two users are
getting different JSESSIONIDs, so no session sharing is present. There is 
a
@Persist(session) annotation on the Member model object inside the page. 
Is
this a bug in Tapestry? I thought that Tapestry was meant to clear all
instance variables once the page returns to the pool?

Cheers for any help, I¹m completely stumped!

Ciaran Wood




RE: Question about T5's page lifecycle - instance variables NOT being purged

2008-06-12 Thread Cordenier Christophe
Actually, at the end of the request, each variable instance is set to its 
default value before giving the page instance back to the pool. Do you 
initialize the member at declaration time ?

Can you us more code ?


-Message d'origine-
De : Ciaran Wood [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 12 juin 2008 16:03
À : Tapestry users
Objet : Question about T5's page lifecycle - instance variables NOT being purged

I¹ve noticed on a tapestry app that we are building, that if two users on
separate machines go to the same page, the second user can see the first
users submitted details on the form. We¹re just using a Form component, a
model Object in the page class and declaring each of the properties as
Œeditor¹ components (Textfield, Checkbox etc) like so:

t:textfield t:id=userName t:value=member.credentials.userName
t:validate=required,minLength=4,maxLength=16,regexp²/

We¹re not using a beanEditForm since the Member object has nested objects
such as Credentials, Contact etc. I¹ve checked that the two users are
getting different JSESSIONIDs, so no session sharing is present. There is a
@Persist(session) annotation on the Member model object inside the page. Is
this a bug in Tapestry? I thought that Tapestry was meant to clear all
instance variables once the page returns to the pool?

Cheers for any help, I¹m completely stumped!

Ciaran Wood


Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
exclusif de ses destinataires. Il peut également être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant 
être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra 
être recherchée quant au contenu de ce message. Bien que les meilleurs efforts 
soient faits pour maintenir cette transmission exempte de tout virus, 
l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Atos Origin group liability cannot be triggered 
for the message content. Although the sender endeavours to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.


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



Re: Question about T5's page lifecycle - instance variables NOT being purged

2008-06-12 Thread Ciaran Wood
Here's the code:

public class Register {

@Component

private Form registerForm;

@Persist(session)

private Member member;



@PageLoaded
   
void pageLoaded(){

log.debug(member created);

member = new Member();

member.setCurrency(GBP);

}
}


And in the tml:

t:form t:id=registerForm 

t:errors /
  
p
t:label for=userName /br /
t:textfield t:id=userName t:value=member.credentials.userName 
t:validate=required,minLength=4,maxLength=16,regexp /

/p
  
p
   
t:label for=password /br /

t:passwordfield t:id=password
t:value=member.credentials.password

t:validate=required,minLength=6,maxLength=16,regexp/

/p
/t:form


Ciaran

On 12/06/2008 3:20pm, Cordenier Christophe
[EMAIL PROTECTED] wrote:

 Actually, at the end of the request, each variable instance is set to its
 default value before giving the page instance back to the pool. Do you
 initialize the member at declaration time ?
 
 Can you us more code ?
 
 
 -Message d'origine-
 De : Ciaran Wood [mailto:[EMAIL PROTECTED]
 Envoyé : jeudi 12 juin 2008 16:03
 À : Tapestry users
 Objet : Question about T5's page lifecycle - instance variables NOT being
 purged
 
 I¹ve noticed on a tapestry app that we are building, that if two users on
 separate machines go to the same page, the second user can see the first
 users submitted details on the form. We¹re just using a Form component, a
 model Object in the page class and declaring each of the properties as
 Œeditor¹ components (Textfield, Checkbox etc) like so:
 
 t:textfield t:id=userName t:value=member.credentials.userName
 t:validate=required,minLength=4,maxLength=16,regexp²/
 
 We¹re not using a beanEditForm since the Member object has nested objects
 such as Credentials, Contact etc. I¹ve checked that the two users are
 getting different JSESSIONIDs, so no session sharing is present. There is a
 @Persist(session) annotation on the Member model object inside the page. Is
 this a bug in Tapestry? I thought that Tapestry was meant to clear all
 instance variables once the page returns to the pool?
 
 Cheers for any help, I¹m completely stumped!
 
 Ciaran Wood
 
 
 Ce message et les pièces jointes sont confidentiels et réservés à l'usage
 exclusif de ses destinataires. Il peut également être protégé par le secret
 professionnel. Si vous recevez ce message par erreur, merci d'en avertir
 immédiatement l'expéditeur et de le détruire. L'intégrité du message ne
 pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne
 pourra être recherchée quant au contenu de ce message. Bien que les meilleurs
 efforts soient faits pour maintenir cette transmission exempte de tout virus,
 l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne
 saurait être recherchée pour tout dommage résultant d'un virus transmis.
 
 This e-mail and the documents attached are confidential and intended solely
 for the addressee; it may also be privileged. If you receive this e-mail in
 error, please notify the sender immediately and destroy it. As its integrity
 cannot be secured on the Internet, the Atos Origin group liability cannot be
 triggered for the message content. Although the sender endeavours to maintain
 a computer virus-free network, the sender does not warrant that this
 transmission is virus-free and will not be liable for any damages resulting
 from any virus transmitted.
 
 
 -
 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: Question about T5's page lifecycle - instance variables NOT being purged

2008-06-12 Thread Cordenier Christophe
PageLoaded is executed only once during the page pool instance creation.
I Think it's the same as setting a default value to your member variable, and 
then the Form may always work on the same instance.

Can you try something like this :

@OnEvent(activate)
void pageLoaded(){

log.debug(member created);

if(member == null) {
  member = new Member();
  member.setCurrency(GBP);
}

}

instead of using PageLoaded phase.


Christophe.

-Message d'origine-
De : Ciaran Wood [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 12 juin 2008 16:42
À : Tapestry users
Objet : Re: Question about T5's page lifecycle - instance variables NOT being 
purged

Here's the code:

public class Register {

@Component

private Form registerForm;

@Persist(session)

private Member member;



@PageLoaded

void pageLoaded(){

log.debug(member created);

member = new Member();

member.setCurrency(GBP);

}
}


And in the tml:

t:form t:id=registerForm 

t:errors /

p
t:label for=userName /br /
t:textfield t:id=userName t:value=member.credentials.userName
t:validate=required,minLength=4,maxLength=16,regexp /

/p

p

t:label for=password /br /

t:passwordfield t:id=password
t:value=member.credentials.password

t:validate=required,minLength=6,maxLength=16,regexp/

/p
/t:form


Ciaran

On 12/06/2008 3:20pm, Cordenier Christophe
[EMAIL PROTECTED] wrote:

 Actually, at the end of the request, each variable instance is set to its
 default value before giving the page instance back to the pool. Do you
 initialize the member at declaration time ?

 Can you us more code ?


 -Message d'origine-
 De : Ciaran Wood [mailto:[EMAIL PROTECTED]
 Envoyé : jeudi 12 juin 2008 16:03
 À : Tapestry users
 Objet : Question about T5's page lifecycle - instance variables NOT being
 purged

 I¹ve noticed on a tapestry app that we are building, that if two users on
 separate machines go to the same page, the second user can see the first
 users submitted details on the form. We¹re just using a Form component, a
 model Object in the page class and declaring each of the properties as
 Œeditor¹ components (Textfield, Checkbox etc) like so:

 t:textfield t:id=userName t:value=member.credentials.userName
 t:validate=required,minLength=4,maxLength=16,regexp²/

 We¹re not using a beanEditForm since the Member object has nested objects
 such as Credentials, Contact etc. I¹ve checked that the two users are
 getting different JSESSIONIDs, so no session sharing is present. There is a
 @Persist(session) annotation on the Member model object inside the page. Is
 this a bug in Tapestry? I thought that Tapestry was meant to clear all
 instance variables once the page returns to the pool?

 Cheers for any help, I¹m completely stumped!

 Ciaran Wood


 Ce message et les pièces jointes sont confidentiels et réservés à l'usage
 exclusif de ses destinataires. Il peut également être protégé par le secret
 professionnel. Si vous recevez ce message par erreur, merci d'en avertir
 immédiatement l'expéditeur et de le détruire. L'intégrité du message ne
 pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne
 pourra être recherchée quant au contenu de ce message. Bien que les meilleurs
 efforts soient faits pour maintenir cette transmission exempte de tout virus,
 l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne
 saurait être recherchée pour tout dommage résultant d'un virus transmis.

 This e-mail and the documents attached are confidential and intended solely
 for the addressee; it may also be privileged. If you receive this e-mail in
 error, please notify the sender immediately and destroy it. As its integrity
 cannot be secured on the Internet, the Atos Origin group liability cannot be
 triggered for the message content. Although the sender endeavours to maintain
 a computer virus-free network, the sender does not warrant that this
 transmission is virus-free and will not be liable for any damages resulting
 from any virus transmitted.


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




Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
exclusif de ses destinataires. Il peut également être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant 
être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra 
être recherchée quant au contenu de ce message. Bien que les meilleurs efforts 
soient faits pour maintenir cette transmission exempte 

Re: Question about T5's page lifecycle - instance variables NOT being purged

2008-06-12 Thread Ciaran Wood
Excellent, that solved the problem. Thanks very much!

Ciaran


On 12/06/2008 3:52pm, Cordenier Christophe
[EMAIL PROTECTED] wrote:

 @OnEvent(activate)


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



RE: Question about T5's page lifecycle - instance variables NOT being purged

2008-06-12 Thread Cordenier Christophe
For information, I think that the PersistentFieldManager is told of a 
modification only when you do a 'new'.
In your exemple, the Form is changing the properties of an existing bean.

The 'new' is called before the page is attached to the user request. The 'new' 
must be called after 'PageAttached' phase (in activation phase, in a getter 
method...)

-Message d'origine-
De : Ciaran Wood [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 12 juin 2008 16:42
À : Tapestry users
Objet : Re: Question about T5's page lifecycle - instance variables NOT being 
purged

Here's the code:

public class Register {

@Component

private Form registerForm;

@Persist(session)

private Member member;



@PageLoaded

void pageLoaded(){

log.debug(member created);

member = new Member();

member.setCurrency(GBP);

}
}


And in the tml:

t:form t:id=registerForm 

t:errors /

p
t:label for=userName /br /
t:textfield t:id=userName t:value=member.credentials.userName
t:validate=required,minLength=4,maxLength=16,regexp /

/p

p

t:label for=password /br /

t:passwordfield t:id=password
t:value=member.credentials.password

t:validate=required,minLength=6,maxLength=16,regexp/

/p
/t:form


Ciaran

On 12/06/2008 3:20pm, Cordenier Christophe
[EMAIL PROTECTED] wrote:

 Actually, at the end of the request, each variable instance is set to its
 default value before giving the page instance back to the pool. Do you
 initialize the member at declaration time ?

 Can you us more code ?


 -Message d'origine-
 De : Ciaran Wood [mailto:[EMAIL PROTECTED]
 Envoyé : jeudi 12 juin 2008 16:03
 À : Tapestry users
 Objet : Question about T5's page lifecycle - instance variables NOT being
 purged

 I¹ve noticed on a tapestry app that we are building, that if two users on
 separate machines go to the same page, the second user can see the first
 users submitted details on the form. We¹re just using a Form component, a
 model Object in the page class and declaring each of the properties as
 Œeditor¹ components (Textfield, Checkbox etc) like so:

 t:textfield t:id=userName t:value=member.credentials.userName
 t:validate=required,minLength=4,maxLength=16,regexp²/

 We¹re not using a beanEditForm since the Member object has nested objects
 such as Credentials, Contact etc. I¹ve checked that the two users are
 getting different JSESSIONIDs, so no session sharing is present. There is a
 @Persist(session) annotation on the Member model object inside the page. Is
 this a bug in Tapestry? I thought that Tapestry was meant to clear all
 instance variables once the page returns to the pool?

 Cheers for any help, I¹m completely stumped!

 Ciaran Wood


 Ce message et les pièces jointes sont confidentiels et réservés à l'usage
 exclusif de ses destinataires. Il peut également être protégé par le secret
 professionnel. Si vous recevez ce message par erreur, merci d'en avertir
 immédiatement l'expéditeur et de le détruire. L'intégrité du message ne
 pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne
 pourra être recherchée quant au contenu de ce message. Bien que les meilleurs
 efforts soient faits pour maintenir cette transmission exempte de tout virus,
 l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne
 saurait être recherchée pour tout dommage résultant d'un virus transmis.

 This e-mail and the documents attached are confidential and intended solely
 for the addressee; it may also be privileged. If you receive this e-mail in
 error, please notify the sender immediately and destroy it. As its integrity
 cannot be secured on the Internet, the Atos Origin group liability cannot be
 triggered for the message content. Although the sender endeavours to maintain
 a computer virus-free network, the sender does not warrant that this
 transmission is virus-free and will not be liable for any damages resulting
 from any virus transmitted.


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




Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
exclusif de ses destinataires. Il peut également être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant 
être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra 
être recherchée quant au contenu de ce message. Bien que les meilleurs efforts 
soient faits pour maintenir cette transmission exempte de tout virus, 
l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
saurait être recherchée pour tout dommage 

Re: Re: T5 t:renderObject and pageLink won't render link just text instead

2008-06-12 Thread nille hammer

Hi Konstanin,

I don´t think Filips post was irony. It really is simple. Anyway answering your 
question: Simply returning a component from a getter (in your case a Link from 
getMyDynaObject) won´t cause tapestry to render it. For a component to be 
rendered you have to place it somewhere in the template.

The eplanation of the strange behaviour you see is you handing over a Link to a 
Grid as a data object. The default behaviour of Grid is to scan the data 
object for simple properies (i.e. a public getter and corresponding setter are 
present and getter returns simple types like Integer, String, Date etc.) and 
display the values in a table. The only property a Link contains is anchor 
(look here: 
http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/Link.html). 
And that is displayed.

To achieve what you want you have to use t:parameter within the Grid and 
place some type of Link-component in the template. Look here for example: 
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
 
The UserList.tml right at the middle of the page.

Hope that helps, nillehammer


- original Nachricht 

Betreff: Re: T5 t:renderObject and pageLink won't render link just text instead
Gesendet: Do, 12. Jun 2008
Von: Konstantin[EMAIL PROTECTED]

 
 Irony ... good :-) Thanks for trying to help me with my dumb questions.
 I simplified my first sample, let me make it more close to what I wanted:
 
 @Property
 private MyGridRowObject myObject; // t:grid row=myObject ...
 
 public Object getMyDynaObject() {
 Link testLink;
 switch(myObject.type) {
 case TYPE1:
 testLink =
 componentResources.createPageLink(targetPageHere, true, 11);
 // here I need to get myObject.description to put it into
 link, but
 // don't know how to do that, you know ?
 // also some link context would be nice but that could be
 addParameter(context, ...) ??
 return testLink;
 case TYPE2:
 return myObject.description; // no link just render text
 into this grid cell
 }
 } 
 
 I created custom component with t:if and syntetic properties isType1(),
 isType2() as a workaround (or should I say: As a right way of doing things
 in Tapestry). But that seems weird to do like that. Why can't I use
 getMyDynaObject() to tell Tapestry of what I need to render ?
 
 
 Filip S. Adamsen-2 wrote:
  
  Hi,
  
  I see. It's actually easier than you'd think. Here's what you do:
  
  Class:
  
 @Inject
 private ComponentResources componentResources;
  
 public String getLink() {
   return componentResources.createPageLink(targetpagehere, 
  true).toURI();
 }
  
  Template:
  
  ${link} text for link 
  
  See? It's easy. :)
  
  But since you're linking to a page, why not just use the PageLink 
  component? That's even easier.
  
 t:pagelink t:page=targetpageheretext for link/t:pagelink
  
  You can see all the components here:
  http://tapestry.apache.org/tapestry5/tapestry-core/ref/index.html
  
  Hope this helps.
  
  -Filip
  
  Konstantin skrev:
  I think I'm missing concept behind renderObject component.
  The original idea was to render Link or just some text basing on other
  page
  properties and actual object to be rendered should be returned by public
  Object getMyDynaObject().
  So I need to get href ... in page markup for link, but instead I get
  targetPageHere/11.
  Is it possible to do without creating custom component ?
  
  
  Filip S. Adamsen-2 wrote:
  Hi,
 
  Tapestry does what you ask it to do - returns a (relative) URI for the 
  link. (Check out the Javadocs/source for AbstractLink to see this.)
 
  I suspect that calling toAbsoluteURI() on the link will give you what 
  you want. Oh, and you won't need RenderObject for that - you can just do
 
  an expansion ${myDynaObject} in that case.
 
  -Filip
 
  Konstantin skrev:
  in tml:
 
  t:renderobject object=myDynaObject/
 
  in java:
 
  @Inject
  private ComponentResources componentResources;
 
  public Object getMyDynaObject() {
  Link testLink;
  testLink = componentResources.createPageLink(targetPageHere,
  true,
  11);
  return testLink;
  }
 
  Renders text targetPageHere/11 instead of actual link. What am I
  doing
  wrong here ?
 
  -
  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]
  
  
  
 
 -- 
 View this message in context:
 http://www.nabble.com/T5-t%3ArenderObject-and-pageLink-won%27t-render-link-j
 ust-text-instead-tp17782707p17794921.html
 Sent from the Tapestry - User mailing list archive 

Re: T5 Questions

2008-06-12 Thread Robert Zeigler

Yes, that's correct for the custom editor.
Have a look, for example, at:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/beaneditform.html
Under the section Adding new property editors.
If you need a display, you can similarly add a contribution to  
BeanBlockSource for your data-type, but the last parameter of the  
BeanBlockContribution constructor would be false.


For real examples of this, see, for instance:

For contributions to BeanBlockSource:
http://code.google.com/p/tapestry5-cayenne/source/browse/trunk/tapestry5-cayenne-core/src/main/java/com/googlecode/tapestry5cayenne/services/TapestryCayenneCoreModule.java

For the editor component:
http://code.google.com/p/tapestry5-cayenne/source/browse/trunk/tapestry5-cayenne-core/src/main/java/com/googlecode/tapestry5cayenne/components/ToOneEditor.java

For the setup of the appropriate editor/viewer blocks:
http://code.google.com/p/tapestry5-cayenne/source/browse/trunk/tapestry5-cayenne-core/src/main/java/com/googlecode/tapestry5cayenne/pages/CayenneEditBlockContributions.java

and

http://code.google.com/p/tapestry5-cayenne/source/browse/trunk/tapestry5-cayenne-core/src/main/java/com/googlecode/tapestry5cayenne/pages/CayenneViewBlockContributions.java

HTH,

Robert

On Jun 10, 2008, at 6/102:27 PM , Tim de jager wrote:



Thanks a lot for the prompt response!

Regarding the customer editor, do you have a link which has an  
explanation

or example?
Is it like extending the BeanEditForm so it correctly displays an  
input

field for the (in my case User entity)
object of the underlying bean?

Thanks,

Tim


Robert Zeigler wrote:


Hi Tim,

1) The framework version corresponds to the quickstart archetype
version.  So if you use the quickstart archetype version 5.0.6, you
get the framework version 5.0.6.  You can always check to see what
version of tapestry you're using.  Edit your pom.xml, and look for  
the

definition of the property: tapestry-release-version.

For your issues:
1) @Property was added recently (5.0.11); I suspect you're using an
older version of T5.
2) There are two pieces to a label.  The t:label property of an input
is used for validation messages (eg: You must supply a value for X,
where X is the t:label value, with sensible defaults).  If you want  
an

html label, you need to use the Label component:
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Label.html

Regarding the bean edit form: there are a variety of ways of dealing
with this.
a) One way would be to have your entity class use a pseudo-property
that is the text value.  Then you just need to specify the real
property in the exclude parameter of BeanEditForm (or even add
@NonVisual to the real property, so that it's never included).

b) Alternatively (and more powerfully) you can add an editor for the
User property type.  If you're using T5  hibernate, make sure to
check out the tapestry-hibernate integration module, which will auto-
add ValueEncoders for all of your hibernate entities, so you don't
have to think about converting User-String-User; it will happen
automagically.

c) or a brute-force approach, you could probably do something along
the lines of specifying a property in includes, and then including
the appropriate editor block as a t:parameter, and then writing the
editor directly into the page.

B is going to be your best option, long term.

Cheers,

Robert

On Jun 9, 2008, at 6/99:07 AM , Tim de jager wrote:



Hi,

I have a few questions regarding some issues i've been having
working with
the T5 framework.

I used the maven archteype supplied in the new Tapestry 5: Building
Web
Applications book to build the skeleton project. And i believe the
archetype
doesn't specify which tapestry framework version to download but
downloads
the most recent?

Issues:
1. Not having an @Property anntotation at least it can't be  
imported.

2. t:label inside an input not generating exceptions but not being
displayed
either.
Has anybody else encountered these issues or does anyone have a
solution

Also is their a way to use add a input to a beanedit form that  
doesn't

directly map to the underlying bean, I'm asking this because the
bean is a
hiberante entity and has a many to one relation with User. And im
wondering
if i can store the text value in the page class and look up the
appropriate
user before saving the entity.

Thanks,

Tim de Jager
--
View this message in context:
http://www.nabble.com/T5-Questions-tp17733559p17733559.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]





--
View this message in context: 

T5 UTF8 encoding

2008-06-12 Thread maxthesecond


-- 
View this message in context: 
http://www.nabble.com/T5-UTF8-encoding-tp17804815p17804815.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]



Tomcat 5.5.26 + JDK 6_05 - java.lang.OutOfMemoryError: PermGen Space

2008-06-12 Thread Estevam Henrique Portela Mota e Silva
Good Afternoon,

Who knows the problem of tomcat on the server.

Tomcat's war have 17 in my company
Memory (Initial memory pool: 512mb and Maximum memory pool: 1024mb)
Version:
 -- Tomcat 5.5.26
 -- JDK 6_05
Server:
 -- Gigabyte, Core 2 Duo and Memory 2 gb (motherboard has maximum of
memory is 2 gb)
Added:
 -- Isapi Redirector 1.2.14 on another server (IIS 5.0 and Win 2000)
Note:
 -- All programs are installed executable (EXE)

When I clicked generate PDF (Jasper) in my project, was wrong ... See below
pra

[ERROR] RequestExceptionHandler Processing of request failed with uncaught
exception: PermGen space
java.lang.OutOfMemoryError: PermGen Space

How resolved?

-- 
Regards,

Estevam Henrique Portela Mota e Silva
Handicapped Auditory = deaf
[EMAIL PROTECTED] / [EMAIL PROTECTED]
Programmer Java and Tapestry
Brazil - Fortaleza / CE


Re: Re: T5 t:renderObject and pageLink won't render link just text instead

2008-06-12 Thread Konstantin

Thanks for trying to help me. And as I said I managed to get what I want by
creating custom component. With markup like:
t:if test=type1
  t:pageLink ...
t:parameter name=else
  t:if test=type2
t:pageLike ... another page and params here
  t:parameter name=else
${simpleDescription}
  /t:parameter
  /t:if
/t:parameter
/t:if
and appropriate backing class. But it looks like I'm back to c:if here ...

Ideal solution for my needs would be: 
And Java class with getDynaObject sending actual component to render.
I would say: inline component.
I'm not sure (will check) but I think that's possible with Wicket (I can
construct any component replacing placeholder) :-)

Thanks for help guys! Moving forward slowly in getting Tapestry concepts.


nille hammer wrote:
 
 
 Hi Konstanin,
 
 I don´t think Filips post was irony. It really is simple. Anyway answering
 your question: Simply returning a component from a getter (in your case a
 Link from getMyDynaObject) won´t cause tapestry to render it. For a
 component to be rendered you have to place it somewhere in the template.
 
 The eplanation of the strange behaviour you see is you handing over a Link
 to a Grid as a data object. The default behaviour of Grid is to scan the
 data object for simple properies (i.e. a public getter and corresponding
 setter are present and getter returns simple types like Integer, String,
 Date etc.) and display the values in a table. The only property a Link
 contains is anchor (look here:
 http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/Link.html).
 And that is displayed.
 
 To achieve what you want you have to use t:parameter within the Grid and
 place some type of Link-component in the template. Look here for example:
 http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
  
 The UserList.tml right at the middle of the page.
 
 Hope that helps, nillehammer
 
 
 - original Nachricht 
 
 Betreff: Re: T5 t:renderObject and pageLink won't render link just text
 instead
 Gesendet: Do, 12. Jun 2008
 Von: Konstantin[EMAIL PROTECTED]
 
 
 Irony ... good :-) Thanks for trying to help me with my dumb questions.
 I simplified my first sample, let me make it more close to what I wanted:
 
 @Property
 private MyGridRowObject myObject; // t:grid row=myObject ...
 
 public Object getMyDynaObject() {
 Link testLink;
 switch(myObject.type) {
 case TYPE1:
 testLink =
 componentResources.createPageLink(targetPageHere, true, 11);
 // here I need to get myObject.description to put it into
 link, but
 // don't know how to do that, you know ?
 // also some link context would be nice but that could be
 addParameter(context, ...) ??
 return testLink;
 case TYPE2:
 return myObject.description; // no link just render text
 into this grid cell
 }
 } 
 
 I created custom component with t:if and syntetic properties isType1(),
 isType2() as a workaround (or should I say: As a right way of doing
 things
 in Tapestry). But that seems weird to do like that. Why can't I use
 getMyDynaObject() to tell Tapestry of what I need to render ?
 
 
 Filip S. Adamsen-2 wrote:
  
  Hi,
  
  I see. It's actually easier than you'd think. Here's what you do:
  
  Class:
  
 @Inject
 private ComponentResources componentResources;
  
 public String getLink() {
   return componentResources.createPageLink(targetpagehere, 
  true).toURI();
 }
  
  Template:
  
  ${link} text for link 
  
  See? It's easy. :)
  
  But since you're linking to a page, why not just use the PageLink 
  component? That's even easier.
  
 t:pagelink t:page=targetpageheretext for link/t:pagelink
  
  You can see all the components here:
  http://tapestry.apache.org/tapestry5/tapestry-core/ref/index.html
  
  Hope this helps.
  
  -Filip
  
  Konstantin skrev:
  I think I'm missing concept behind renderObject component.
  The original idea was to render Link or just some text basing on other
  page
  properties and actual object to be rendered should be returned by
 public
  Object getMyDynaObject().
  So I need to get href ... in page markup for link, but instead I get
  targetPageHere/11.
  Is it possible to do without creating custom component ?
  
  
  Filip S. Adamsen-2 wrote:
  Hi,
 
  Tapestry does what you ask it to do - returns a (relative) URI for
 the 
  link. (Check out the Javadocs/source for AbstractLink to see this.)
 
  I suspect that calling toAbsoluteURI() on the link will give you what 
  you want. Oh, and you won't need RenderObject for that - you can just
 do
 
  an expansion ${myDynaObject} in that case.
 
  -Filip
 
  Konstantin skrev:
  in tml:
 
  t:renderobject object=myDynaObject/
 
  in java:
 
  @Inject
  private ComponentResources componentResources;
 
  public Object getMyDynaObject() {
  

Re: 答复: 答复: 答复: About refresh action of grid component

2008-06-12 Thread Marcus
Have you checked the content of allCustomers list after call the method
customerManager.getCustomersByKey(searchKey)?

Marcus


T5 UTF8 encoding

2008-06-12 Thread maxthesecond

After some work I've achieved to be able to store and retrieve my foreign
caracters, but know poor of me I've tried to add a link to a textbox, like:


input text box content:

Hello Box speciall caracters test ñáòú
link test  www.google.com click to search in google 


When this input box is sumbmited to the server and updated in the database
everithing looks ok,but once you retrieve it's value and display in a page
still everithing is ok (foreign caracters) except the links, all the  are
converted to gth; lth; entities.

It my be not a tapestry issue, but I need to be able to let the user to
insert his links and html tags (br,b...) in the text box.

Thanks.



-- 
View this message in context: 
http://www.nabble.com/T5-UTF8-encoding-tp17806489p17806489.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: T5 t:renderObject and pageLink won't render link just text instead

2008-06-12 Thread Filip S. Adamsen

Hi there,

I wasn't being ironic at all. (Nor am I now.)

It still looks to me like you only need a PageLink. It has three 
parameters that you should use: page, context, and disabled. Page is the 
page name, context is a list/array of context parameters, and disabled 
decides whether to render a link or just the text.


What values to use for these three parameters can be decided in your 
Java class, just create getPage, getContext and isDisabled methods that 
you can call from your template like this t:pagelink t:page=page 
t:context=context t:disabled=disabled/.


By the way, I just checked RenderObject in the Component Reference. It says:

Renders out an object using the 
org.apache.tapestry5.services.ObjectRenderer service. Used primarily on 
the org.apache.tapestry5.corelib.pages.ExceptionReport page. This is 
focused on objects that have a specific 
org.apache.tapestry5.services.ObjectRenderer strategy. The 
org.apache.tapestry5.corelib.components.BeanDisplay component is used 
for displaying the contents of arbitrary objects in terms of a series of 
property names and values.


So that's why it doesn't work for Links.

-Filip

On 2008-06-12 19:17, Konstantin wrote:

Thanks for trying to help me. And as I said I managed to get what I want by
creating custom component. With markup like:
t:if test=type1
  t:pageLink ...
t:parameter name=else
  t:if test=type2
t:pageLike ... another page and params here
  t:parameter name=else
${simpleDescription}
  /t:parameter
  /t:if
/t:parameter
/t:if
and appropriate backing class. But it looks like I'm back to c:if here ...

Ideal solution for my needs would be: 
And Java class with getDynaObject sending actual component to render.

I would say: inline component.
I'm not sure (will check) but I think that's possible with Wicket (I can
construct any component replacing placeholder) :-)

Thanks for help guys! Moving forward slowly in getting Tapestry concepts.


nille hammer wrote:


Hi Konstanin,

I don´t think Filips post was irony. It really is simple. Anyway answering
your question: Simply returning a component from a getter (in your case a
Link from getMyDynaObject) won´t cause tapestry to render it. For a
component to be rendered you have to place it somewhere in the template.

The eplanation of the strange behaviour you see is you handing over a Link
to a Grid as a data object. The default behaviour of Grid is to scan the
data object for simple properies (i.e. a public getter and corresponding
setter are present and getter returns simple types like Integer, String,
Date etc.) and display the values in a table. The only property a Link
contains is anchor (look here:
http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/Link.html).
And that is displayed.

To achieve what you want you have to use t:parameter within the Grid and
place some type of Link-component in the template. Look here for example:
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html 
The UserList.tml right at the middle of the page.


Hope that helps, nillehammer


- original Nachricht 

Betreff: Re: T5 t:renderObject and pageLink won't render link just text
instead
Gesendet: Do, 12. Jun 2008
Von: Konstantin[EMAIL PROTECTED]


Irony ... good :-) Thanks for trying to help me with my dumb questions.
I simplified my first sample, let me make it more close to what I wanted:

@Property
private MyGridRowObject myObject; // t:grid row=myObject ...

public Object getMyDynaObject() {
Link testLink;
switch(myObject.type) {
case TYPE1:
testLink =
componentResources.createPageLink(targetPageHere, true, 11);
// here I need to get myObject.description to put it into
link, but
// don't know how to do that, you know ?
// also some link context would be nice but that could be
addParameter(context, ...) ??
return testLink;
case TYPE2:
return myObject.description; // no link just render text
into this grid cell
}
} 


I created custom component with t:if and syntetic properties isType1(),
isType2() as a workaround (or should I say: As a right way of doing
things
in Tapestry). But that seems weird to do like that. Why can't I use
getMyDynaObject() to tell Tapestry of what I need to render ?


Filip S. Adamsen-2 wrote:

Hi,

I see. It's actually easier than you'd think. Here's what you do:

Class:

   @Inject
   private ComponentResources componentResources;

   public String getLink() {
 return componentResources.createPageLink(targetpagehere, 
true).toURI();

   }

Template:

${link} text for link 


See? It's easy. :)

But since you're linking to a page, why not just use the PageLink 
component? That's even easier.


   t:pagelink t:page=targetpageheretext for link/t:pagelink

You can see all the components here:

Re: T5 UTF8 encoding

2008-06-12 Thread Filip S. Adamsen

Hi,

${} expansions in T5 are filtered, that's your problem. You need to use 
the Output component with filter=false or the OutputRaw component to 
output the value if you don't want it to be filtered.


-Filip

On 2008-06-12 20:21, maxthesecond wrote:

After some work I've achieved to be able to store and retrieve my foreign
caracters, but know poor of me I've tried to add a link to a textbox, like:


input text box content:

Hello Box speciall caracters test ñáòú
link test  www.google.com click to search in google 



When this input box is sumbmited to the server and updated in the database
everithing looks ok,but once you retrieve it's value and display in a page
still everithing is ok (foreign caracters) except the links, all the  are
converted to gth; lth; entities.

It my be not a tapestry issue, but I need to be able to let the user to
insert his links and html tags (br,b...) in the text box.

Thanks.





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



Re: Tomcat 5.5.26 + JDK 6_05 - java.lang.OutOfMemoryError: PermGen Space

2008-06-12 Thread Filip S. Adamsen

Hi,

I think you'll have better luck getting an answer on the Tomcat users 
list. :)


-Filip

On 2008-06-12 19:06, Estevam Henrique Portela Mota e Silva wrote:

Good Afternoon,

Who knows the problem of tomcat on the server.

Tomcat's war have 17 in my company
Memory (Initial memory pool: 512mb and Maximum memory pool: 1024mb)
Version:
 -- Tomcat 5.5.26
 -- JDK 6_05
Server:
 -- Gigabyte, Core 2 Duo and Memory 2 gb (motherboard has maximum of
memory is 2 gb)
Added:
 -- Isapi Redirector 1.2.14 on another server (IIS 5.0 and Win 2000)
Note:
 -- All programs are installed executable (EXE)

When I clicked generate PDF (Jasper) in my project, was wrong ... See below
pra

[ERROR] RequestExceptionHandler Processing of request failed with uncaught
exception: PermGen space
java.lang.OutOfMemoryError: PermGen Space

How resolved?



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



Re: Tomcat 5.5.26 + JDK 6_05 - java.lang.OutOfMemoryError: PermGen Space

2008-06-12 Thread Norbert Sándor
Try to set some more memory for permgen space, eg. 
/-XX:MaxPermSize=128m/ in case of Sun's JVM.
The correct value depends on the environment, you can use for example 
JConsole to diagnose the JVM.


Regards:
Norbi

Estevam Henrique Portela Mota e Silva írta:

Good Afternoon,

Who knows the problem of tomcat on the server.

Tomcat's war have 17 in my company
Memory (Initial memory pool: 512mb and Maximum memory pool: 1024mb)
Version:
 -- Tomcat 5.5.26
 -- JDK 6_05
Server:
 -- Gigabyte, Core 2 Duo and Memory 2 gb (motherboard has maximum of
memory is 2 gb)
Added:
 -- Isapi Redirector 1.2.14 on another server (IIS 5.0 and Win 2000)
Note:
 -- All programs are installed executable (EXE)

When I clicked generate PDF (Jasper) in my project, was wrong ... See below
pra

[ERROR] RequestExceptionHandler Processing of request failed with uncaught
exception: PermGen space
java.lang.OutOfMemoryError: PermGen Space

How resolved?

  




No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 270.3.0/1499 - Release Date: 6/12/2008 7:13 AM
  



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



Re: T5 UTF8 encoding

2008-06-12 Thread maxthesecond

Thanks, one more time.

What I did is to add the following parameter to my grid component 

t:parameter name=nameDescriptionCell
  t:outputraw value=product.namepicture/
/t:parameter

Unfortunatelly with no succes.
Things I've observed:  
1) If I change the namewDescriptionCell to whatever I
get the same result
2) If I change tha value=product.namepicture to a non
existing field I've got an exception(this proves me that the column is
called.)
3) whatever propertie from the product I write:
product.whatever I've got allways the same field wich corresponds to
product.description.

It looks as if something was wrong...

Cheers


 
-- 
View this message in context: 
http://www.nabble.com/T5-UTF8-encoding-tp17806489p17808264.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: T5 UTF8 encoding

2008-06-12 Thread maxthesecond

Sorry again
I finally make it work, the problem was in the name parameter ,it's a little
bit strange but in some cases you have to write:   t:parameter
name=namePropertyCell
and in others t:parameter name=PropertyCell

Anyway now working!
-- 
View this message in context: 
http://www.nabble.com/T5-UTF8-encoding-tp17806489p17808284.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]



Question About BeanEditForm

2008-06-12 Thread 滕训华
When I put a beanEditForm component in my tml file as following:

 

t:beaneditform t:id=customer submitlabel=message:create-user/

 

And in page class 

 

 

public class EditCustomer {

@Persist

private TblMenuItem customer;

 

public TblMenuItem getCustomer() {

   return customer;

}

 

public void setCustomer(TblMenuItem customer) {

   this.customer = customer;

}





}

 

But I found it has a error if there has other constructor in TblMenuItem as
following:

 

public TblMenuItem(long menuId, String menuName, String menuLink,

   String executeRoles) {

   this.menuId = menuId;

   this.menuName = menuName;

   this.menuLink = menuLink;

   this.executeRoles = executeRoles;

}

 

And the error is:

 


An unexpected application exception has occurred.


Render queue error in SetupRender[EditCustomer:customer.editor]: Exception
instantiating instance of com.callcenter.model.TblMenuItem (for component
'EditCustomer:customer.editor'): Error invoking constructor
com.callcenter.model.TblMenuItem(long, String, String, String) (at
TblMenuItem.java:24) (for service 'BeanModelSource'): No service implements
the interface long.

 

If I remove the class constructor it will be correct.I should not have
other constructor except default constructor???