Re: Validation.setFormComponent works only Once???

2007-04-05 Thread Skorpien126

Hmm more strange ... why doesnt stop Eclipse at
  
getDelegate().setFormComponent(); 
  
when there is set a breakPoint?!?!?.
I know the Code looks the same,  but that´s not true.



Skorpien126 wrote:
 
 Why does this Code in my RegisterPage doesn´t work:
 
 IFormComponent componentPassword = (IFormComponent)
 getComponent(password);
   IFormComponent componentPasswordConfirm = (IFormComponent)
 getComponent(passwordConfirm);
   
   if (!StringUtils.equals(getPassword(),getPasswordConfirm()))
 {
   getDelegate().setFormComponent(componentPassword);
   
 getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);
   
   getDelegate().setFormComponent(componentPasswordConfirm);
   
 getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);
 
 }
   
   //check if there is an error... in password confirm or other input
 fields... if yes 
   if (getDelegate().getHasErrors())
   {
   getDelegate().setFormComponent(componentPassword);
   getDelegate().recordFieldInputValue(null);
   
   getDelegate().setFormComponent(componentPasswordConfirm);
   getDelegate().recordFieldInputValue(null); 
   return;
   }
 
 whereas this works.
 
 if (!StringUtils.equals(getPassword(),getPasswordConfirm()))
 {
   getDelegate().setFormComponent(componentPassword);
 getDelegate().recordFieldInputValue(null);
   
 getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);
   
   getDelegate().setFormComponent(componentPasswordConfirm);
 getDelegate().recordFieldInputValue(null);
   
 getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);
 
 }
 
 it seems so strength
 
 

-- 
View this message in context: 
http://www.nabble.com/Validation.setFormComponent-works-only-Oncetf3526275.html#a9852320
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: Validation.setFormComponent works only Once???

2007-04-05 Thread Skorpien126

Ok found a Solution...

a cycle().commitPageChanges() dit the Job 
quess that a getDelegate().record(***) also calls cycle.commitChanges()...
not sure why getDelegate().recordFieldInputValue(null); doesnt do.




Skorpien126 wrote:
 
 Why does this Code in my RegisterPage doesn´t work:
 
 IFormComponent componentPassword = (IFormComponent)
 getComponent(password);
   IFormComponent componentPasswordConfirm = (IFormComponent)
 getComponent(passwordConfirm);
   
   if (!StringUtils.equals(getPassword(),getPasswordConfirm()))
 {
   getDelegate().setFormComponent(componentPassword);
   
 getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);
   
   getDelegate().setFormComponent(componentPasswordConfirm);
   
 getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);
 
 }
   
   //check if there is an error... in password confirm or other input
 fields... if yes 
   if (getDelegate().getHasErrors())
   {
   getDelegate().setFormComponent(componentPassword);
   getDelegate().recordFieldInputValue(null);
   
   getDelegate().setFormComponent(componentPasswordConfirm);
   getDelegate().recordFieldInputValue(null); 
   return;
   }
 
 whereas this works.
 
 if (!StringUtils.equals(getPassword(),getPasswordConfirm()))
 {
   getDelegate().setFormComponent(componentPassword);
 getDelegate().recordFieldInputValue(null);
   
 getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);
   
   getDelegate().setFormComponent(componentPasswordConfirm);
 getDelegate().recordFieldInputValue(null);
   
 getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);
 
 }
 
 it seems so strength
 
 

-- 
View this message in context: 
http://www.nabble.com/Validation.setFormComponent-works-only-Oncetf3526275.html#a9853301
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



No .jwc when using Annotations

2007-04-04 Thread Skorpien126

Hey,
I have implementet the following
http://wiki.apache.org/tapestry/SpeclessPagesInWEB-INF Code and it works
fine. so I tried to it with the components too. A Component Definition looks
like that 

@ComponentClass
public abstract class Border extends BaseComponent 
{ 

}

and in the *.application I added the meta-key. meta
key=org.apache.tapestry.component-class-packages value=my.package/.

(I tried several Combinations... also writing my own
SpecificationResolverDelegate with the findComponentSpecification method ...
no success) 

I alway get an error like this...

org.apache.hivemind.ApplicationRuntimeException
Could not find template for component MyPage/$Border in locale _myLanguage.


Anyone implementet such Code successfully Any Ideas whats wrong?


-- 
View this message in context: 
http://www.nabble.com/No-.jwc-when-using-Annotations-tf3524916.html#a9834093
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: No .jwc when using Annotations

2007-04-04 Thread Skorpien126

YEAAAH ... got it.
Simplie the same as the setupImplicitPage().. but setting the
setPageSpecification to false.
Furthermore I had to overwrite the ComponentSpecificationResolverImpl Class. 
(Defined it in the hivemodule like this
  implementation service-id=tapestry.page.ComponentSpecificationResolver
invoke-factory model=threaded
construct class=mypackage.myimpl
set-object property=specificationSource
value=infrastructure:specificationSource/
set-service property=delegate
service-id=tapestry.page.SpecificationResolverDelegate/
set-object property=applicationId
value=infrastructure:applicationId/
set-object property=contextRoot
value=infrastructure:contextRoot/
set-object property=classFinder
value=infrastructure:classFinder/
/construct
/invoke-factory
/implementation


Skorpien126 wrote:
 
 Hey,
 I have implementet the following
 http://wiki.apache.org/tapestry/SpeclessPagesInWEB-INF Code and it works
 fine. so I tried to it with the components too. A Component Definition
 looks like that 
 
 @ComponentClass
 public abstract class Border extends BaseComponent 
 { 
 
 }
 
 and in the *.application I added the meta-key. meta
 key=org.apache.tapestry.component-class-packages value=my.package/.
 
 (I tried several Combinations... also writing my own
 SpecificationResolverDelegate with the findComponentSpecification method
 ... no success) 
 
 I alway get an error like this...
 
 org.apache.hivemind.ApplicationRuntimeException
 Could not find template for component MyPage/$Border in locale
 _myLanguage.
 
 
 Anyone implementet such Code successfully Any Ideas whats wrong?
 
 P.S. Tapestry Version 4.0.2
 
 

-- 
View this message in context: 
http://www.nabble.com/No-.jwc-when-using-Annotations-tf3524916.html#a9835617
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Validation.setFormComponent works only Once???

2007-04-04 Thread Skorpien126

Why does this Code in my RegisterPage doesn´t work:

IFormComponent componentPassword = (IFormComponent)
getComponent(password);
IFormComponent componentPasswordConfirm = (IFormComponent)
getComponent(passwordConfirm);

if (!StringUtils.equals(getPassword(),getPasswordConfirm()))
{
getDelegate().setFormComponent(componentPassword);

getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);

getDelegate().setFormComponent(componentPasswordConfirm);

getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);
  
}

//check if there is an error... in password confirm or other input
fields... if yes 
if (getDelegate().getHasErrors())
{
getDelegate().setFormComponent(componentPassword);
getDelegate().recordFieldInputValue(null);

getDelegate().setFormComponent(componentPasswordConfirm);
getDelegate().recordFieldInputValue(null); 
return;
}

whereas this works.

if (!StringUtils.equals(getPassword(),getPasswordConfirm()))
{
getDelegate().setFormComponent(componentPassword);
getDelegate().recordFieldInputValue(null);

getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);

getDelegate().setFormComponent(componentPasswordConfirm);
getDelegate().recordFieldInputValue(null);

getDelegate().record(getText(validator.passwordMissmatch),ValidationConstraint.CONSISTENCY);
  
}

it seems so strength

-- 
View this message in context: 
http://www.nabble.com/Validation.setFormComponent-works-only-Oncetf3526275.html#a9838661
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Extendet ValidationDelegate not used

2007-03-27 Thread Skorpien126

Hmm I´ve a strange behaviour in my app...

I´ve build an own ValidationDelegate because I want to display the
errorMessage in the Label. Therefor I thought ... extend a Subclass
(http://tapestry.apache.org/tapestry4.1/usersguide/validation.html) should
be easy. My subclass extends from the orginal
org.apache.tapestry.valid.ValidationDelegate class.

The Delegate is defined in the .page:
 bean name=delegate class=myPackage.ErrorValidationDelegate/

I´ve several other workarounds like FriendlyUrls so I turned them of to
find the error.
Furthermore I extend the FieldLabel Component. (took a look to the appfuse
startup-application) 
There I set a breakPoint to find out what the app is doing:

I set this code in the renderComponent-method:
 if (form.getDelegate() instanceof myPackage.ErrorValidationDelegate)
 {
  //breakpoint here
 }

The Thread never reach the breakPoint and the Bean is never of type
ErrorValidationDelegate ... it´s always the basic ValidationDelegate. 
Maybe it´s a very simple Problem... but i can´t figure out. Can someone help
me??? ideas??? Would should I check???
-- 
View this message in context: 
http://www.nabble.com/Extendet-ValidationDelegate-not-used-tf3475496.html#a9700709
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Default ServiceParameterNames

2007-03-15 Thread Skorpien126

Hi @All,
some of my colleagues asked me, why we have to map the indexed
ServiceParamters.(we use FriendlyUrls) ... so I ask you if it´s possible
to change the following fact.

The ServiceParameters are saved in an List. Is it possible to save them in
Map... so that we could get the value of the parameter easily by Name.
Overwriting a service. Someone still did it  
-- 
View this message in context: 
http://www.nabble.com/Default-ServiceParameterNames-tf3409427.html#a9498375
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Title Tag not closed...

2006-12-11 Thread Skorpien126

Hmm not really a problem but maybe a mini bug... i´m using tapestry 4.0.2 ..
and i make use of the Border-Component . In the Border Component I include
this code snippet 
span jwcid=@Shell stylesheet=ognl:assets.defaultStyle title=my big
page

... on rendering the open title tag (title) is rendered.. I get this..

html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en
head   
titlemy big page  
/head
...
/html.

... the closing title-tag is not rendert ... what is no problem for
firefox... but for the actual Internet Explorer. :( 
-- 
View this message in context: 
http://www.nabble.com/Title-Tag-not-closed...-tf2796286.html#a7801843
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Tapestry and Spring 2.0

2006-12-07 Thread Skorpien126

Spring 2 is released and I want to know if it´s compatible with tapestry
4.0.2 or even with 4.1??? Is there maybe a new Tapestry-spring.jar
available??

-- 
View this message in context: 
http://www.nabble.com/Tapestry-and-Spring-2.0-tf2775514.html#a7742600
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: Re: Why propertys were not updated, when Form hasErrors??

2006-12-05 Thread Skorpien126

Yohhh... I take your Idea and add some more lines and it´s working. I just
had the same idea... setting a flag when a Page is loaded first time. But
this didn´t worked, maybe because of using prepareForRender().
Nevertheless.. you are my personal TODAYS HERO. Thx a lot.







Sam Gendler-2 wrote:
 
 Well, I have never used prepareForRender().   I tend to have my pages
 implement the pageBeginRenderListener interface or the
 pageAttachListener interface.   The former will cause a method called
 pageBeginRender(IRequestCycle) to be called at the start of each
 rendering of the page, much like prepareForRender.  Within that
 method, I know that the cycle parameter will return the correct value
 for isRewinding(), so you can check whether you are at the start of
 rewind cycle or a render cycle.  I imagine that this is also true for
 prepareForRender().  I could swear I remember reading something about
 preferring pageBeginRender() over prepareForRender(), but I'm not
 seeing it now, so maybe I was imagining things.
 
 But it isn't quite as simple as merely choosing to only initialize
 values before the rewind cycle but not before render, because when
 your page is loaded via a link rather than a form submit, there will
 be no rewind cycle, so you must do your initialization before the
 render cycle instead.  SO I have always done the following, in order
 to be able to do initialization once per request, once for eachcycle,
 or only for a particular cycle.  I apply the following code to the
 base page class for my application.
 
 @InitialValue(ognl:false)
 public abstract boolean isOnceInitialized();
 public abstract void setOnceInitialized(boolean val);
 
 public final void pageBeginRender(PageEvent event) {
 initPage(event);
 if (!isOnceInitialized()) {
 initOnlyOnce(event);
 setOnceInitialized(true);
 }
 if (getRequestCycle().isRewinding()) {
 initForRewind(event);
 } else {
 initForRender(event);
 }
 }
 
 // gets called before both rewind and render cycles
 public void initPage(PageEvent event) {
 }
 
 public void initOnlyOnce(PageEvent event) {
 }
 
 // gets called before rewind cycle
 public void initForRewind(PageEvent event) {
 }
 
 // gets called before render cycle
 public void initForRender(PageEvent event) {
 }
 
 initPage gets called before every cycle, initOnlyOnce gets called only
 once, no matter whether there is a rewind cycle or not.  The other two
 are self explanatory.
 
 In the future I might see if I can overload the behaviour of the
 object which controls the rendering of a page (the engine?  I haven't
 looked into it)  in order to test for interfaces specific to each of
 the 4 possible init phases, rather than overloading pageBeginRender,
 so that I am not forced into a common base class.  But this works
 nicely, so far.
 
 --sam
 
 
 On 12/4/06, Skorpien126 [EMAIL PROTECTED] wrote:

 Hmm yeah ... it´s doing something like this but I found no other way to
 make
 the data persistent. My preparePage() looks like this...
 public void prepareForRender(IRequestCycle request)
 {
 super.prepareForRender(request);
 getPersistItem().reInit(this.getItem());
 }
 where PersistItem is the bean and Item the Object, holding the initial
 data.
 Is there another way... I tried many ways but is the onliest one working.
 Have someone a better way More infos what happening (which function
 were) on validating could help.
 P.S.  THX for help.


 Sam Gendler-2 wrote:
 
  I've never had this problem.  When a form fails validation in my apps,
  I always see the content that was posted displayed back in the fields.
   Is it possible that the class which backs your page is initializing
  the bean back to default values after the rewind cycle completes with
  an error?
 
  --sam
 
 
  On 12/3/06, Skorpien126 [EMAIL PROTECTED] wrote:
 
  Ok... maybe I start nerving but I can´t belive that´s it not possible.
 
  The Situation: I have maybe 20 Textareas in a form... each one using
 the
  required validator. The textareas are BOUND to a bean which has
  lifecycle=Page. Reading and writing still works... but when I fill
 data
  in
  first 19 Textareas und I submit I get an ValidationError because the
 last
  textarea has no text... so far so good, Validation is working.. but
 why
  the
  Hell it´s not possible to update the values. I can´t expire that my
 users
  Refill all the textareas... Is there a workaround or so??? I read some
  posts
  refering this topic... but no REAL solution. Please help...
 
  --
  View this message in context:
 
 http://www.nabble.com/Why-propertys-were-not-updated%2C-when-Form-%22hasErrors%22---tf2747592.html#a7665535
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL

Re: Re: Why propertys were not updated, when Form hasErrors??

2006-12-05 Thread Skorpien126

Yohhh... I take your Idea and add some more lines and it´s working. I just
had the same idea... setting a flag when a Page is loaded first time. But
this didn´t worked, maybe because of using prepareForRender().
Nevertheless.. you are my personal TODAYS HERO. Thx a lot.







Sam Gendler-2 wrote:
 
 Well, I have never used prepareForRender().   I tend to have my pages
 implement the pageBeginRenderListener interface or the
 pageAttachListener interface.   The former will cause a method called
 pageBeginRender(IRequestCycle) to be called at the start of each
 rendering of the page, much like prepareForRender.  Within that
 method, I know that the cycle parameter will return the correct value
 for isRewinding(), so you can check whether you are at the start of
 rewind cycle or a render cycle.  I imagine that this is also true for
 prepareForRender().  I could swear I remember reading something about
 preferring pageBeginRender() over prepareForRender(), but I'm not
 seeing it now, so maybe I was imagining things.
 
 But it isn't quite as simple as merely choosing to only initialize
 values before the rewind cycle but not before render, because when
 your page is loaded via a link rather than a form submit, there will
 be no rewind cycle, so you must do your initialization before the
 render cycle instead.  SO I have always done the following, in order
 to be able to do initialization once per request, once for eachcycle,
 or only for a particular cycle.  I apply the following code to the
 base page class for my application.
 
 @InitialValue(ognl:false)
 public abstract boolean isOnceInitialized();
 public abstract void setOnceInitialized(boolean val);
 
 public final void pageBeginRender(PageEvent event) {
 initPage(event);
 if (!isOnceInitialized()) {
 initOnlyOnce(event);
 setOnceInitialized(true);
 }
 if (getRequestCycle().isRewinding()) {
 initForRewind(event);
 } else {
 initForRender(event);
 }
 }
 
 // gets called before both rewind and render cycles
 public void initPage(PageEvent event) {
 }
 
 public void initOnlyOnce(PageEvent event) {
 }
 
 // gets called before rewind cycle
 public void initForRewind(PageEvent event) {
 }
 
 // gets called before render cycle
 public void initForRender(PageEvent event) {
 }
 
 initPage gets called before every cycle, initOnlyOnce gets called only
 once, no matter whether there is a rewind cycle or not.  The other two
 are self explanatory.
 
 In the future I might see if I can overload the behaviour of the
 object which controls the rendering of a page (the engine?  I haven't
 looked into it)  in order to test for interfaces specific to each of
 the 4 possible init phases, rather than overloading pageBeginRender,
 so that I am not forced into a common base class.  But this works
 nicely, so far.
 
 --sam
 
 
 On 12/4/06, Skorpien126 [EMAIL PROTECTED] wrote:

 Hmm yeah ... it´s doing something like this but I found no other way to
 make
 the data persistent. My preparePage() looks like this...
 public void prepareForRender(IRequestCycle request)
 {
 super.prepareForRender(request);
 getPersistItem().reInit(this.getItem());
 }
 where PersistItem is the bean and Item the Object, holding the initial
 data.
 Is there another way... I tried many ways but is the onliest one working.
 Have someone a better way More infos what happening (which function
 were) on validating could help.
 P.S.  THX for help.


 Sam Gendler-2 wrote:
 
  I've never had this problem.  When a form fails validation in my apps,
  I always see the content that was posted displayed back in the fields.
   Is it possible that the class which backs your page is initializing
  the bean back to default values after the rewind cycle completes with
  an error?
 
  --sam
 
 
  On 12/3/06, Skorpien126 [EMAIL PROTECTED] wrote:
 
  Ok... maybe I start nerving but I can´t belive that´s it not possible.
 
  The Situation: I have maybe 20 Textareas in a form... each one using
 the
  required validator. The textareas are BOUND to a bean which has
  lifecycle=Page. Reading and writing still works... but when I fill
 data
  in
  first 19 Textareas und I submit I get an ValidationError because the
 last
  textarea has no text... so far so good, Validation is working.. but
 why
  the
  Hell it´s not possible to update the values. I can´t expire that my
 users
  Refill all the textareas... Is there a workaround or so??? I read some
  posts
  refering this topic... but no REAL solution. Please help...
 
  --
  View this message in context:
 
 http://www.nabble.com/Why-propertys-were-not-updated%2C-when-Form-%22hasErrors%22---tf2747592.html#a7665535
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL

Re: Why propertys were not updated, when Form hasErrors??

2006-12-04 Thread Skorpien126

Hmm yeah ... it´s doing something like this but I found no other way to make
the data persistent. My preparePage() looks like this...
public void prepareForRender(IRequestCycle request)
{   
super.prepareForRender(request);
getPersistItem().reInit(this.getItem());
}
where PersistItem is the bean and Item the Object, holding the initial data.
Is there another way... I tried many ways but is the onliest one working.
Have someone a better way More infos what happening (which function
were) on validating could help.
P.S.  THX for help.


Sam Gendler-2 wrote:
 
 I've never had this problem.  When a form fails validation in my apps,
 I always see the content that was posted displayed back in the fields.
  Is it possible that the class which backs your page is initializing
 the bean back to default values after the rewind cycle completes with
 an error?
 
 --sam
 
 
 On 12/3/06, Skorpien126 [EMAIL PROTECTED] wrote:

 Ok... maybe I start nerving but I can´t belive that´s it not possible.

 The Situation: I have maybe 20 Textareas in a form... each one using the
 required validator. The textareas are BOUND to a bean which has
 lifecycle=Page. Reading and writing still works... but when I fill data
 in
 first 19 Textareas und I submit I get an ValidationError because the last
 textarea has no text... so far so good, Validation is working.. but why
 the
 Hell it´s not possible to update the values. I can´t expire that my users
 Refill all the textareas... Is there a workaround or so??? I read some
 posts
 refering this topic... but no REAL solution. Please help...

 --
 View this message in context:
 http://www.nabble.com/Why-propertys-were-not-updated%2C-when-Form-%22hasErrors%22---tf2747592.html#a7665535
 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: 
http://www.nabble.com/Why-propertys-were-not-updated%2C-when-Form-%22hasErrors%22---tf2747592.html#a7686425
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: Commit PersistPropertys on Submit with Error

2006-12-02 Thread Skorpien126

After searching a while ... using a mass of searchWords I found this. 
http://www.nabble.com/Validatable-fields%3A-should-bound-property-be-updated-if-in-error--tf247395.html#a691248

This describes what I want... but not how I activate or if it´s still
builded in!?!! 


Skorpien126 wrote:
 
 Hi... 
 I want to ask, if somebody knows an easy way to update the binding values
 also if the form hasErrors. So lets say i´ve  5 textareas in a page,
 each of them have a required validator ... in the first 4 I fill in data
 and the last one I forget to fill. On Submitting the delegate Function
 show me the error, but it also set the values of the textareas to the
 startvalues... in my case an empty string. Is there an easy way to avoid
 this???
 

-- 
View this message in context: 
http://www.nabble.com/Commit-PersistPropertys-on-Submit-with-Error-tf2732434.html#a7652553
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Commit PersistPropertys on Submit with Error

2006-11-30 Thread Skorpien126

Hi... 
I want to ask, if somebody knows an easy way to update the binding values
also if the form hasErrors. So lets say i´ve  5 textareas in a page, each
of them have a required validator ... in the first 4 I fill in data and
the last one I forget to fill. On Submitting the delegate Function show me
the error, but it also set the values of the textareas to the startvalues...
in my case an empty string. Is there an easy way to avoid this???
-- 
View this message in context: 
http://www.nabble.com/Commit-PersistPropertys-on-Submit-with-Error-tf2732434.html#a7621725
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: Dynamic Working with Tapestry...

2006-11-29 Thread Skorpien126

Ron you do a great Job here!!!
Now I understand a little bit more how the delegate works. It could be
compared with ExceptionHandler which catchs Exceptions thrown by the
included subcomponents. (unimportant how deep the hierachy is).

But Now I have another Prob. I have multible Textareas in my Register page.
The Situation is: I have a Register Page including multible Textareas. When
I Submit the form and one of the validators HasErrors the textareas get
their InitialValues. Is thought Tapestry bind values in any Case?!?!?



Ron Piterman-2 wrote:
 
 Tapestry uses for validation the ValidationDelegate - I would recomment 
 you stick to it, it will make your life much easier, and it is one of 
 tapestry's most powerfull features:
 
 You can use validators on each of your fields, and that doesn't mean 
 they have to be preconfigured - you can use a dynamic list of Validator 
 objects, depending on the current iteration (maybe not all a required).
 
 So all you have to do is
 
 @Bean
 public abstract ValidationDelegate getDelegate();
 
 and
 
 form jwcid=@Form delegate=ognl:deleagte
 
 and in your submit listener:
 
 if ( getDeleagte().getHasErrors() )
return;
 
 Take a look at Form validation in the users guide.
 
 Cheers,
 Ron
 
 
 
 
 Skorpien126 wrote:
 Thats not exactly the situation... here a descreption depending on your
 code
 snippet.
 
 
 form jwcid=@Form
   div jwcid=@For source=ognl:objects value=ognl:currentValue
 span jwcid=@If condition=ognl:currentValue instanceof
 StringColumn
   input jwcid=@StringComponent
 value=ognl:currentValue/(includes Validation and further function)
 /span 
  span jwcid=@If condition=ognl:currentValue instanceof
 DateColumn
   input jwcid=@DateComponent value=ognl:currentValue/
 (includes Validation and further function)
 /span 
   /div
   input jwcid=@Submit/
 /form
 
 
 the Problem is that I don´t know how to check the Validation of each
 component in the doSubmit-Method. I need a way to iterate over the
 subcomponents!?!?!
 
 Maybe your way would work, but then it´s incosistent to my hierachy. 
 
 P.S. Thx for help.
 
 
 
 
 
 Ron Piterman-2 wrote:
 
If I get this right, there is some kind of iteration over objects inside 
the form component.
When the form is submitted, the iteration will be performed again, this 
one updating the values.
then you add an action binding to the submit, and persist the whole 
list of obejcts which were updated:

form jwcid=@Form
  div jwcid=@For source=ognl:objects value=ognl:currentValue
   input jwcid=@TextField value=ognl:currentValue.name/
  /div
  input jwcid=@Submit/
/form

the currentValue property will point to the current iteration value, and 
the input will update each object in the iteration.

Did I get it right this time?

Cheers,
Ron


Skorpien126 wrote:

I´m not sure I´ve I understand you in the right way. Updating one
Component
is not the problem, I stillt tried taht and it works.. I want that my
ContainerElement includes the @Form  and in the Form tag the dynamic
Number of Components is included. So the ConatinerElement have to take
care
of binding and updating the values of the Subcomponent.



Ron Piterman-2 wrote:


There are some approaches to that problem, one approach would be to use 
the parameter binding for that:

The component gets a paraemter from its container, and is responsible
to 
update the parameter.

Say you have a property on your page/container component:

public Data getData() {...}
public void setData( Data data ) { // now perform the save }

you pass data as a paraemter binding to your component which includes 
the form, and on your submit listener, after verifying everything is 
fine, you call setData:

@Parameter public abstract Data getData();
public abstract void setData( Data data );

public void doSubmit() {
  // validata...
  // check that everything is ok...
  if (getDelegate().getHasErrors() )
return;
  setData( getData() );
}


Another approach would be to use an IActionListener as paramter and 
invoke it - this is the approach I take usually.

Hope that helps,
Cheers,
Ron


Skorpien126 wrote:


Hi...
I´ve another Post, describing the same problem. In my eyes it is one
the
things which should be solved more than one times. So I will give a
 
 whole
 
describtion about what I want.

OK... i have ca 30 tables each one, holding information about 1
product.
Lets say one table holds information of chairs,  the other of tables
and
so
one. Each Table has a dynmamic number of Columns. Maybe an id,
 
 describing
 
text, a date.. . For each Type I´ve build a subcomponent ...
DateComponent,
StringComponent and so on. The Subcomponents include the value
(String,date ...) the validation and maybe some further functionality.

Ok... when openening a Page I get an Id with which I create a
Containercomponent RequestContainer(PERSISTBEAN) ...   this
Container
includes a Collection of Subcomponents correspondening to the
coloums

Re: Dynamic Working with Tapestry...

2006-11-26 Thread Skorpien126

Thats not exactly the situation... here a descreption depending on your code
snippet.


form jwcid=@Form
  div jwcid=@For source=ognl:objects value=ognl:currentValue
span jwcid=@If condition=ognl:currentValue instanceof
StringColumn
  input jwcid=@StringComponent
value=ognl:currentValue/(includes Validation and further function)
/span 
 span jwcid=@If condition=ognl:currentValue instanceof
DateColumn
  input jwcid=@DateComponent value=ognl:currentValue/
(includes Validation and further function)
/span 
  /div
  input jwcid=@Submit/
/form


the Problem is that I don´t know how to check the Validation of each
component in the doSubmit-Method. I need a way to iterate over the
subcomponents!?!?!

Maybe your way would work, but then it´s incosistent to my hierachy. 

P.S. Thx for help.





Ron Piterman-2 wrote:
 
 If I get this right, there is some kind of iteration over objects inside 
 the form component.
 When the form is submitted, the iteration will be performed again, this 
 one updating the values.
 then you add an action binding to the submit, and persist the whole 
 list of obejcts which were updated:
 
 form jwcid=@Form
   div jwcid=@For source=ognl:objects value=ognl:currentValue
input jwcid=@TextField value=ognl:currentValue.name/
   /div
   input jwcid=@Submit/
 /form
 
 the currentValue property will point to the current iteration value, and 
 the input will update each object in the iteration.
 
 Did I get it right this time?
 
 Cheers,
 Ron
 
 
 Skorpien126 wrote:
 I´m not sure I´ve I understand you in the right way. Updating one
 Component
 is not the problem, I stillt tried taht and it works.. I want that my
 ContainerElement includes the @Form  and in the Form tag the dynamic
 Number of Components is included. So the ConatinerElement have to take
 care
 of binding and updating the values of the Subcomponent.
 
 
 
 Ron Piterman-2 wrote:
 
There are some approaches to that problem, one approach would be to use 
the parameter binding for that:

The component gets a paraemter from its container, and is responsible to 
update the parameter.

Say you have a property on your page/container component:

public Data getData() {...}
public void setData( Data data ) { // now perform the save }

you pass data as a paraemter binding to your component which includes 
the form, and on your submit listener, after verifying everything is 
fine, you call setData:

@Parameter public abstract Data getData();
public abstract void setData( Data data );

public void doSubmit() {
   // validata...
   // check that everything is ok...
   if (getDelegate().getHasErrors() )
 return;
   setData( getData() );
}


Another approach would be to use an IActionListener as paramter and 
invoke it - this is the approach I take usually.

Hope that helps,
Cheers,
Ron


Skorpien126 wrote:

Hi...
I´ve another Post, describing the same problem. In my eyes it is one the
things which should be solved more than one times. So I will give a
whole
describtion about what I want.

OK... i have ca 30 tables each one, holding information about 1 product.
Lets say one table holds information of chairs,  the other of tables and
so
one. Each Table has a dynmamic number of Columns. Maybe an id,
describing
text, a date.. . For each Type I´ve build a subcomponent ...
DateComponent,
StringComponent and so on. The Subcomponents include the value
(String,date ...) the validation and maybe some further functionality.

Ok... when openening a Page I get an Id with which I create a
Containercomponent RequestContainer(PERSISTBEAN) ...   this Container
includes a Collection of Subcomponents correspondening to the coloums
of
the depending table and also some further, unimportant informations... 

Ok... so far so good. It´s not problem to visualize the information. But
I
want to update the whole Object at once. So  I´ve make a form in the
Containercomponent and in the Form-Tag I iterate over the Column-Values.
The
Form invokes a SaveMethod. In which I want to write back the values of
the
validated, values of the subcomponents. My Question... How Can I get the
values of the dynamic subcomponents (image that it+s not possible to
bind a parameter to a dynamicList-Item) How can I check that each value
is
correct/validated??? 

If more code is needed... just ask. 
Thx u... and have a nice WE.


Here Some Example Code:
ContainerComponent.html
form jwcid=[EMAIL PROTECTED] success=listener:saveAll
 span jwcid=@Foreach source=ognl:item.getList()
value=ognl:ListItem index=ognl:ListIndex
 span jwcid=@If condition=ognl:ListItem instanceof DisplayString
   span jwcid=@DisplayString item=ognl:ListItem
editable=true/
 /span  
 span jwcid=@If condition=ognl:ListItem instanceof DisplayDate
   span jwcid=@DisplayDate item=ognl:ListItem 
editable=true/
 /span

Dynamic Working with Tapestry...

2006-11-24 Thread Skorpien126

Hi...
I´ve another Post, describing the same problem. In my eyes it is one the
things which should be solved more than one times. So I will give a whole
describtion about what I want.

OK... i have ca 30 tables each one, holding information about 1 product.
Lets say one table holds information of chairs,  the other of tables and so
one. Each Table has a dynmamic number of Columns. Maybe an id, describing
text, a date.. . For each Type I´ve build a subcomponent ... DateComponent,
StringComponent and so on. The Subcomponents include the value
(String,date ...) the validation and maybe some further functionality.

Ok... when openening a Page I get an Id with which I create a
Containercomponent RequestContainer(PERSISTBEAN) ...   this Container
includes a Collection of Subcomponents correspondening to the coloums of
the depending table and also some further, unimportant informations... 

Ok... so far so good. It´s not problem to visualize the information. But I
want to update the whole Object at once. So  I´ve make a form in the
Containercomponent and in the Form-Tag I iterate over the Column-Values. The
Form invokes a SaveMethod. In which I want to write back the values of the
validated, values of the subcomponents. My Question... How Can I get the
values of the dynamic subcomponents (image that it+s not possible to
bind a parameter to a dynamicList-Item) How can I check that each value is
correct/validated??? 

If more code is needed... just ask. 
Thx u... and have a nice WE.


Here Some Example Code:
ContainerComponent.html
form jwcid=[EMAIL PROTECTED] success=listener:saveAll
 span jwcid=@Foreach source=ognl:item.getList()
value=ognl:ListItem index=ognl:ListIndex
 span jwcid=@If condition=ognl:ListItem instanceof DisplayString
   span jwcid=@DisplayString item=ognl:ListItem 
editable=true/   
 /span  
 span jwcid=@If condition=ognl:ListItem instanceof DisplayDate
   span jwcid=@DisplayDate item=ognl:ListItem  
editable=true/
 /span  
 ...   
  /span  
form jwcid=@bf:BeanForm

DisplayString.html
span jwcid=@If condition=ognl:editable
input type=text jwcid=ColoumNameComponent/br/
br/
textarea jwcid=contentComponent cols=70 rows=10
Der Inhalt halt...
/textarea
p/p
/span
-- 
View this message in context: 
http://www.nabble.com/Dynamic-Working-with-Tapestry...-tf2697699.html#a7523697
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: MultipleComponents Submit

2006-11-24 Thread Skorpien126

Ahh damn... my fault. I thought the they mean the standart contrib-libary.
I´ll check it out. Thanks... ^^



Dennis Sinelnikov wrote:
 
 Did you get Tapestry-Prop library?
 
 -Dennis
 
 Skorpien126 wrote:
 I´m not sure if I can add Components dynamicly. I try to add several
 SubComponents with a @For Component, building the Subcomponent with a
 Value
 of a List. Can I use BeanForm in this way??? I now get currently this
 error
 Message Unable to parse OGNL expression 'prop:isInsideAForm': Malformed
 OGNL expression: prop:isInsideAForm.
 
 
 
 
 gredler wrote:
 Yes, it's possible, but it takes a bit of hand waving. Check out the
 BeanForm source code for examples:

 http://beanform.sourceforge.net/


 On 11/23/06, Skorpien126 [EMAIL PROTECTED] wrote:

 Hi @All...
 I want to make a MainComponent which includes a dynamic number of
 subcomponents, presenting String,Date etc. All these subcomponentes
 include
 a validation for the corresondending values.  The mainComponent
 includes
 the
 Submit-Button which should update the values of the subcomponents to
 the
 database. My Question: Is it possible???
 --
 View this message in context:
 http://www.nabble.com/MultipleComponents-Submit-tf2693218.html#a7510454
 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: 
http://www.nabble.com/MultipleComponents-Submit-tf2693218.html#a7523713
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



MultipleComponents Submit

2006-11-23 Thread Skorpien126

Hi @All... 
I want to make a MainComponent which includes a dynamic number of
subcomponents, presenting String,Date etc. All these subcomponentes include
a validation for the corresondending values.  The mainComponent includes the
Submit-Button which should update the values of the subcomponents to the
database. My Question: Is it possible??? 
-- 
View this message in context: 
http://www.nabble.com/MultipleComponents-Submit-tf2693218.html#a7510454
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: MultipleComponents Submit

2006-11-23 Thread Skorpien126

Thx u. 
I´ll check it out. More will follow... 


gredler wrote:
 
 Yes, it's possible, but it takes a bit of hand waving. Check out the
 BeanForm source code for examples:
 
 http://beanform.sourceforge.net/
 
 
 On 11/23/06, Skorpien126 [EMAIL PROTECTED] wrote:


 Hi @All...
 I want to make a MainComponent which includes a dynamic number of
 subcomponents, presenting String,Date etc. All these subcomponentes
 include
 a validation for the corresondending values.  The mainComponent includes
 the
 Submit-Button which should update the values of the subcomponents to the
 database. My Question: Is it possible???
 --
 View this message in context:
 http://www.nabble.com/MultipleComponents-Submit-tf2693218.html#a7510454
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/MultipleComponents-Submit-tf2693218.html#a7511449
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: MultipleComponents Submit

2006-11-23 Thread Skorpien126

I´m not sure if I can add Components dynamicly. I try to add several
SubComponents with a @For Component, building the Subcomponent with a Value
of a List. Can I use BeanForm in this way??? I now get currently this error
Message Unable to parse OGNL expression 'prop:isInsideAForm': Malformed
OGNL expression: prop:isInsideAForm.




gredler wrote:
 
 Yes, it's possible, but it takes a bit of hand waving. Check out the
 BeanForm source code for examples:
 
 http://beanform.sourceforge.net/
 
 
 On 11/23/06, Skorpien126 [EMAIL PROTECTED] wrote:


 Hi @All...
 I want to make a MainComponent which includes a dynamic number of
 subcomponents, presenting String,Date etc. All these subcomponentes
 include
 a validation for the corresondending values.  The mainComponent includes
 the
 Submit-Button which should update the values of the subcomponents to the
 database. My Question: Is it possible???
 --
 View this message in context:
 http://www.nabble.com/MultipleComponents-Submit-tf2693218.html#a7510454
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/MultipleComponents-Submit-tf2693218.html#a7515506
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: ComponentParameter value to Persistent ComponentProperty

2006-11-04 Thread Skorpien126

Ok I tried it very often ... and it looked like that 
 
page:
...
span jwcid=@Foreach source=ognl:MyList value=ognl:TemporaryItem
index=ognl:Index
 span jwcid=@If condition=ognl:MyClass
  span jwcid=@MyFormComponent
item=ognl:TemporaryItem/  
 /span
/span
...

myformcomponent.jwc
...
  component id=putitin type=TextArea
   binding name=value value=ognl:item.content/
   /component

   !-- Parameter --
   parameter name=item required=yes/
...

myformcomponent.html
form jwcid=[EMAIL PROTECTED] listener=listener:formSubmit
textarea jwcid=putitin cols=70 rows=10
Content...
/textarea
input type=submit value=Send/
/form

Reading the Parameter was no problem but when I submit the form i get an
setProperty(null,content,my new value exception)... I my eyes it looks
like that the binding wasn´t successfull. 
I read several forum-messages ... some of them with the same problem. They
all give the parameter to a persistent  property.



Jessek wrote:
 
 Sure it can...Just go look at the For component.
 
 On 11/3/06, Skorpien126 [EMAIL PROTECTED] wrote:


 Oh yeah... this was my first Idea,too ... after reading tapestry in
 action.
 but using parameter is not possible because the  parameters ( in my case
 )
 are propertys of an object which itself is put in a persist collection. I
 guess that tapestry can´t bind objects of an collection ?!?!?!?



 Jessek wrote:
 
  Generally speaking you really ~don't~ want to store persistent fields
 in
 a
  component if you can help it. Make everything a parameter.
 
  On 11/2/06, Skorpien126 [EMAIL PROTECTED] wrote:
 
 
  SOLVED:
 
  created a bean  but not using the property-attribute of the bean
  tag...
  instead i make use of getBeans().getBean(beanname)... SURELY not the
  most
  intuitiv way... an lot of casting around but it seems to work!!
 
 
 
  Skorpien126 wrote:
  
   I have found several posts here where this problem is discribed..
 but
  
   no one works in my case...
  
   One described: Overwrite the pageBeginRender ... i tried but i use a
   @For-Component so that this doesnt work because the property is
   persistent. Error (Change to persistent property ... has been
 ignored.
   Persistent properties may only be changed prior to the rendering of
 the
   response page.  )
  
   Another one make use of a bean... I also tried this... overwriting
 the
   bean-value with the parameter value in the pageBeginRender method
 but
  this
   also throws an error. in correspondending abstract class i make use
 of
  the
   property normally generated on rendering (discribed here
   http://tapestry.apache.org/tapestry4.1/usersguide/spec.html -bean
   specification).
   This throw also an error  ognl.NoSuchPropertyException
  
   org.apache.tapestry.bean.BeanProvider.persistItem 
  
   Here my bean specification:
   bean name=persistItemBean lifecycle=page property=persistItem
   class=myobject/bean
  
   Has anyone an idea... or better a solution??? ^^
  
 
  --
  View this message in context:
 
 http://www.nabble.com/ComponentParameter-value-to-Persistent-ComponentProperty-tf245.html#a7146931
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Jesse Kuhnert
  Tapestry/Dojo/(and a dash of TestNG), team member/developer
 
  Open source based consulting work centered around
  dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
 
 

 --
 View this message in context:
 http://www.nabble.com/ComponentParameter-value-to-Persistent-ComponentProperty-tf245.html#a7154502
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


 
 
 -- 
 Jesse Kuhnert
 Tapestry/Dojo/(and a dash of TestNG), team member/developer
 
 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
 
 

-- 
View this message in context: 
http://www.nabble.com/ComponentParameter-value-to-Persistent-ComponentProperty-tf245.html#a7172942
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: ComponentParameter value to Persistent ComponentProperty

2006-11-03 Thread Skorpien126

Oh yeah... this was my first Idea,too ... after reading tapestry in action.
but using parameter is not possible because the  parameters ( in my case )
are propertys of an object which itself is put in a persist collection. I
guess that tapestry can´t bind objects of an collection ?!?!?!?



Jessek wrote:
 
 Generally speaking you really ~don't~ want to store persistent fields in a
 component if you can help it. Make everything a parameter.
 
 On 11/2/06, Skorpien126 [EMAIL PROTECTED] wrote:


 SOLVED:

 created a bean  but not using the property-attribute of the bean
 tag...
 instead i make use of getBeans().getBean(beanname)... SURELY not the
 most
 intuitiv way... an lot of casting around but it seems to work!!



 Skorpien126 wrote:
 
  I have found several posts here where this problem is discribed.. but
 
  no one works in my case...
 
  One described: Overwrite the pageBeginRender ... i tried but i use a
  @For-Component so that this doesnt work because the property is
  persistent. Error (Change to persistent property ... has been ignored.
  Persistent properties may only be changed prior to the rendering of the
  response page.  )
 
  Another one make use of a bean... I also tried this... overwriting the
  bean-value with the parameter value in the pageBeginRender method but
 this
  also throws an error. in correspondending abstract class i make use of
 the
  property normally generated on rendering (discribed here
  http://tapestry.apache.org/tapestry4.1/usersguide/spec.html -bean
  specification).
  This throw also an error  ognl.NoSuchPropertyException
 
  org.apache.tapestry.bean.BeanProvider.persistItem 
 
  Here my bean specification:
  bean name=persistItemBean lifecycle=page property=persistItem
  class=myobject/bean
 
  Has anyone an idea... or better a solution??? ^^
 

 --
 View this message in context:
 http://www.nabble.com/ComponentParameter-value-to-Persistent-ComponentProperty-tf245.html#a7146931
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


 
 
 -- 
 Jesse Kuhnert
 Tapestry/Dojo/(and a dash of TestNG), team member/developer
 
 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
 
 

-- 
View this message in context: 
http://www.nabble.com/ComponentParameter-value-to-Persistent-ComponentProperty-tf245.html#a7154502
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: ComponentParameter value to Persistent ComponentProperty

2006-11-02 Thread Skorpien126

SOLVED:

created a bean  but not using the property-attribute of the bean tag...
instead i make use of getBeans().getBean(beanname)... SURELY not the most
intuitiv way... an lot of casting around but it seems to work!! 



Skorpien126 wrote:
 
 I have found several posts here where this problem is discribed.. but
 
 no one works in my case...
 
 One described: Overwrite the pageBeginRender ... i tried but i use a
 @For-Component so that this doesnt work because the property is
 persistent. Error (Change to persistent property ... has been ignored.
 Persistent properties may only be changed prior to the rendering of the
 response page.  )
 
 Another one make use of a bean... I also tried this... overwriting the
 bean-value with the parameter value in the pageBeginRender method but this
 also throws an error. in correspondending abstract class i make use of the
 property normally generated on rendering (discribed here
 http://tapestry.apache.org/tapestry4.1/usersguide/spec.html -bean
 specification). 
 This throw also an error  ognl.NoSuchPropertyException
   
 org.apache.tapestry.bean.BeanProvider.persistItem 
 
 Here my bean specification:
 bean name=persistItemBean lifecycle=page property=persistItem
 class=myobject/bean
 
 Has anyone an idea... or better a solution??? ^^ 
 

-- 
View this message in context: 
http://www.nabble.com/ComponentParameter-value-to-Persistent-ComponentProperty-tf245.html#a7146931
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



ComponentParameter value to Persistent ComponentProperty

2006-11-01 Thread Skorpien126

I have found several posts here where this problem is discribed.. but

no one works in my case...

One described: Overwrite the pageBeginRender ... i tried but i use a
@For-Component so that this doesnt work because the property is persistent.
Error (Change to persistent property ... has been ignored. Persistent
properties may only be changed prior to the rendering of the response page. 
)

Another one make use of a bean... I also tried this... overwriting the
bean-value with the parameter value in the pageBeginRender method but this
also throws an error. in correspondending abstract class i make use of the
property normally generated on rendering (discribed here
http://tapestry.apache.org/tapestry4.1/usersguide/spec.html -bean
specification). 
This throw also an error  ognl.NoSuchPropertyException
  
org.apache.tapestry.bean.BeanProvider.persistItem 

Here my bean specification:
bean name=persistItemBean lifecycle=page property=persistItem
class=myobject/bean

Has anyone an idea... or better a solution??? ^^ 
-- 
View this message in context: 
http://www.nabble.com/ComponentParameter-value-to-Persistent-ComponentProperty-tf245.html#a7121297
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: setAttribute() fails.. (Tapestry 4.1)

2006-10-31 Thread Skorpien126

I REALLY NEED HELP.
(last night i thought thats its maybe a problem with accesing because the
list is build and accessed by two different services (page,direct-service...
).. so i decide to make the list a porperty of an global/ Visit Object... i
can access the object and i can read the data... but i can´t save...
HEELLLP)



Skorpien126 wrote:
 
 Hi..
 I have a problem but i cant find out whats wrong.. (.. i also feel not
 really good).
 I have a page defining a table (persist property in page).. for each entry
 in the table i use the same component to visualize. in the page definition
 i use a @For component to write all. it looks like
 span jwcid=@For source=ognl:mylist value=ognl:item
  span jwcid=@MYCOMPONENT name=item.name content=item.content/
 span
 
 @MYCOMPONENT implements a form in which try to change the content... when
 i try to submit the change, Tapestry throw an exception that f.e. the
 setContent() Method fails... I thought that tapestry 4.1 binds parameters
 automaticly.. ??? so... what could be the problem???
 
 

-- 
View this message in context: 
http://www.nabble.com/setAttribute%28%29-fails..-%28Tapestry-4.1%29-tf2538245.html#a7091665
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: setAttribute() fails.. (Tapestry 4.1)

2006-10-31 Thread Skorpien126

The same problem 
I think he didn´t reference the correct Object. I would try to make the
parameters as properties(default-value then should be the value of the
input-parameter) and in the doSubmitForm() i would save them... but this
doesnt seem to work in tapestry 4.1!



[EMAIL PROTECTED] wrote:
 
 i had some problems wiht @For
 
 I used instead @Foreach. Try with @Foreach
 
 
 - Original Message - 
 From: Skorpien126 [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Sent: Tuesday, October 31, 2006 6:27 PM
 Subject: Re: setAttribute() fails.. (Tapestry 4.1)
 
 
 
 I REALLY NEED HELP.
 (last night i thought thats its maybe a problem with accesing because the
 list is build and accessed by two different services
 (page,direct-service...
 ).. so i decide to make the list a porperty of an global/ Visit Object...
 i
 can access the object and i can read the data... but i can´t save...
 HEELLLP)
 
 
 
 Skorpien126 wrote:

 Hi..
 I have a problem but i cant find out whats wrong.. (.. i also feel not
 really good).
 I have a page defining a table (persist property in page).. for each
 entry
 in the table i use the same component to visualize. in the page
 definition
 i use a @For component to write all. it looks like
 span jwcid=@For source=ognl:mylist value=ognl:item
  span jwcid=@MYCOMPONENT name=item.name content=item.content/
 span

 @MYCOMPONENT implements a form in which try to change the content... when
 i try to submit the change, Tapestry throw an exception that f.e. the
 setContent() Method fails... I thought that tapestry 4.1 binds parameters
 automaticly.. ??? so... what could be the problem???


 
 -- 
 View this message in context: 
 http://www.nabble.com/setAttribute%28%29-fails..-%28Tapestry-4.1%29-tf2538245.html#a7091665
 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: 
http://www.nabble.com/setAttribute%28%29-fails..-%28Tapestry-4.1%29-tf2538245.html#a7092495
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



setAttribute() fails.. (Tapestry 4.1)

2006-10-30 Thread Skorpien126

Hi..
I have a problem but i cant find out whats wrong.. (.. i also feel not
really good).
I have a page defining a table (persist property in page).. for each entry
in the table i use the same component to visualize. in the page definition i
use a @For component to write all. it looks like
span jwcid=@For source=ognl:mylist value=ognl:item
 span jwcid=@MYCOMPONENT name=item.name content=item.content/
span

@MYCOMPONENT implements a form in which try to change the content... when i
try to submit the change, Tapestry throw an exception that f.e. the
setContent() Method fails... I thought that tapestry 4.1 binds parameters
automaticly.. ??? so... what could be the problem???

-- 
View this message in context: 
http://www.nabble.com/setAttribute%28%29-fails..-%28Tapestry-4.1%29-tf2538245.html#a7071489
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: setAttribute() fails.. (Tapestry 4.1)

2006-10-30 Thread Skorpien126

Addition:
Unable to update OGNL expression 'parsed OGNL expression' of
[EMAIL PROTECTED] to testname: java.util.ArrayList.null. So I´m not
sure what he refers to.. i think refers to an component. I´m not sure how i
can make a parameter value persistent in Tapestry 4.1
-- 
View this message in context: 
http://www.nabble.com/setAttribute%28%29-fails..-%28Tapestry-4.1%29-tf2538245.html#a7082930
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



DirectSevice ... how does it works.

2006-10-26 Thread Skorpien126

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

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


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



CSS or even SiteMesh doesn´t work....

2006-10-18 Thread Skorpien126

Okay... before i become crazy ... i make use of your help.

The Situtaion: 

I have implemented a kind of friendly-urls...
(http://tapestry.apache.org/tapestry4/UsersGuide/friendly-urls.html) ...
mapping urls like  
  *myapp/person/richard/someone 
   to 
   external.svc?page=personsp=Srichard/someone and vice versa. This works
fine... 


My Servlet mapping looks like
servlet-mapping
servlet-namemyapp/servlet-name
url-pattern/assets/*/url-pattern
/servlet-mapping
  
servlet-mapping
servlet-namebackPacking/servlet-name
url-pattern/*/url-pattern
/servlet-mapping


Hivemind module
encoder id=ExternalMapper before=ExternalService
object=instance: JavaExternalMapper/
encoder id=AssetBug970Eraser before=AssetService
object=instance: JavaAssetBug970Eraser/   
asset-encoder id=AssetService path=/assets/ 
page-service-encoder id=ExternalService extension=*
service=page/


The Link in the final html is correct for the StyleSheet but Layout DOESN´T
change. 
(link rel=stylesheet type=text/css
href=/myapp/assets/styles/myStyle.css/) 


Then I tried to use SiteMesh but this doesn´t works, too. (follow the
Instructions)


HAS ANYONE AN IDEA whats wrong... if you need code just ask?!??

-- 
View this message in context: 
http://www.nabble.com/CSS-or-even-SiteMesh-doesnt-work-tf2467863.html#a6880375
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Problem Understanding Tapestry..

2006-10-07 Thread Skorpien126

Hi @ All

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

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

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

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

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

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

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

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


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


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



Insert Components depending on SubClass

2006-10-04 Thread Skorpien126

Hi Guys..
I?m let?s say a Newbie. I have a Project and i want to realize the
following:

I have a abstract class called Person extending from BaseComponent owning
some properties. Furthermore I have class Worker and Non-Worker extending
from Person and owning some properties each. I read an array from Database
including Worker and Non-Workers Objects.

I have made a new component for Workers and one for non-Worker.

In another Component I read the array. This one should entry a the
Non-worker component or the Worker-Component for each object depending on
which object i want to visualize. Is there a way realize that?!?!
-- 
View this message in context: 
http://www.nabble.com/Insert-Components-depending-on-SubClass-tf2382665.html#a6640638
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: Insert Components depending on SubClass

2006-10-04 Thread Skorpien126

Juip,  thats it. This should work.. 
( i thougth of a funtion definition in the base class, which i have to
override in every subclass... giving out the correct code)
thank u very much 



Norbert S?ndor wrote:
 
 Use the For and the If components. Pseudo code:
 
 span jwcid=@For source=ognl:arrayOfPersons value=ognl:person
 span jwcid=@If condition=ognl:person instanceof Worker
span jwcid=@Worker ... /
 /span
 span jwcid=@If condition=ognl:person instanceof NonWorker
span jwcid=@NonWorker ... /
 /span
 /span
 
 I hope I understood your problem well...
 
 Regards,
 Norbi
 
 Skorpien126 wrote:
 Hi Guys..
 I?m let?s say a Newbie. I have a Project and i want to realize the
 following:

 I have a abstract class called Person extending from BaseComponent owning
 some properties. Furthermore I have class Worker and Non-Worker extending
 from Person and owning some properties each. I read an array from
 Database
 including Worker and Non-Workers Objects.

 I have made a new component for Workers and one for non-Worker.

 In another Component I read the array. This one should entry a the
 Non-worker component or the Worker-Component for each object depending on
 which object i want to visualize. Is there a way realize that?!?!
   
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Insert-Components-depending-on-SubClass-tf2382665.html#a6641608
Sent from the Tapestry - User mailing list archive at Nabble.com.


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