Markup rendering errors

2008-11-24 Thread Peter Stavrinides
Hi all,

I have reopened this issue: https://issues.apache.org/jira/browse/TAP5-333 , as 
it appears to extend to other elements as well, and not just label /. This 
bug does not appear in older versions (i.e.: 5.0.14), and may have been 
introduced since 5.0.16.

cheers,
Peter

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



T 5.0.16 : HTML code layout / format of generated files seemes to be wrong

2008-11-24 Thread Christian P.

Hey,

please excuse my bad English. I just started to try out Tapestry and have
one big problem I haven't found an answer for. The source code available in
the client's browsers seems to be really ugly.
All code from the tml-files (Layout.tml, Index.tml) is squeezed in one
single line. So the source code looks like:

1: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Stri...head...
/headbody... (EVERYTHING ;) )
2: /divscript src=assets/5.0.16/scriptaculous/prototype.js
type=text/javascript/scriptscript ... (All Java Scripts)
3: !--
4: Tapestry.DEBUG_ENABLED = true;
5: Tapestry.onDOMLoaded(function() {
6: $('firstNumber').activate();
7: Tapestry.init(...
8: });
9: // --
10: /script/body/html


Is there something I missed to do / add or might it be an Eclipse problem?


Thanks in advance,
Christian
-- 
View this message in context: 
http://www.nabble.com/T-5.0.16-%3A-HTML-code-layout---format-of-generated-files-seemes-to-be-wrong-tp20657660p20657660.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: Problem with 5.0.16/17

2008-11-24 Thread Joachim Van der Auwera

Thanks for the tip.
However, it makes no difference. I still get the same error.

Any other ideas?

Joachim

Ville Virtanen wrote:

Hi,

I have the same problem as you, and I have traced it to be the fault of
commons/hidden component. If you replace it with t:textfield for testing
purposes the problem should go away. Can you verify? So the problem is not
your linking or anything else, the hidden component breaks things.

 - Ville

Ps. I have filed issue to T5 commons website, so hopefully it will be fixed
soon.


Joachim Van der Auwera wrote:
  

Hi,

When I run my application in 5.0.15 everyting works just fine.
In 5.0.16 (and also 17) I get an exception saying No object of type 
org.apache.tapestry5.services.FormSupport is available from the 
Environment. Available types are 
org.apache.tapestry5.services.ComponentEventResultProcessor.


This happens when clicking on an actionlink with the following code

t:actionlink t:id=CreateMyPagelink to mypage/t:actionlink

public Object onActionFromCreateMyPage()
{
mypage.setObject( null );
mypage.setReturnPage( resources.createPageLink( 
resources.getPageName(), false ) );

return mypage;
}

The actionlink is not part of a form, but the exception seems to 
indicate an excerpt of code in the returned page (where that case *is* 
inside the form)


The stacktrace indicates :

# 
org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(EnvironmentImpl.java:73)
# 
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.findFormatter(FieldTranslatorSourceImpl.java:109)
# 
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createTranslator(FieldTranslatorSourceImpl.java:83)
# 
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:77)
# 
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:56)
# 
org.apache.tapestry5.internal.services.ComponentDefaultProviderImpl.defaultTranslator(ComponentDefaultProviderImpl.java:123)
# 
org.apache.tapestry.commons.components.Hidden.defaultTranslate(Hidden.java:82)
# 
org.apache.tapestry.commons.components.Hidden.containingPageDidLoad(Hidden.java)
# 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$4.run(ComponentPageElementImpl.java:101)
# 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:925)
# 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.containingPageDidLoad(ComponentPageElementImpl.java:779)

#
org.apache.tapestry5.internal.structure.PageImpl.loaded(PageImpl.java:145)
# 
org.apache.tapestry5.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:405)
# 
org.apache.tapestry5.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:59)
# 
org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210)
# 
org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99)
# 
org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51)
# 
org.apache.tapestry5.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:79)
# 
be.synergetics.ca.gui.components.Layout._$read_inject_page_assessedCompetencyEdit(Layout.java)


Anybody has an idea of the cause/solution of this exception?

Thanks,
Joachim

--
Joachim Van der Auwera
PROGS bvba, progs.be


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






  



--
Joachim Van der Auwera
PROGS bvba, progs.be


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



Re: Problem with 5.0.16/17

2008-11-24 Thread Joachim Van der Auwera
Unfortunately not. As suggested by Ville Virtanen I tried replacing 
all occurences of the Hidden component by TextField components, and I 
get exactly the same error.


So something else must be wrong.

Any ideas?

Joachim

Howard Lewis Ship wrote:

Please contact the author of
org.apache.tapestry.commons.components.Hidden, as that appears to be
the problem.

On Sun, Nov 23, 2008 at 3:57 AM, Joachim Van der Auwera
[EMAIL PROTECTED] wrote:
  

Thanks for the reply.

I am not rendering a part of a form. I have an actionlink which returns a
page.
This is not an ajax call, so it should just redirect to that page.
I cannot use a pagelink because I need to set some data on the page to be
rendered.
It all worked fine in previous versions of tapestry. It breaks now when
using 5.0.16 or 5.0.17.
Inside the page, the component which gives the exception is contained in a
form.

Joachim

Howard Lewis Ship wrote:


You can't render a portion of a Form, except for specialized cases
such as AjaxFormLoop and FormInjector.

On Sat, Nov 22, 2008 at 2:20 PM, Joachim Van der Auwera
[EMAIL PROTECTED] wrote:

  

Hi,

When I run my application in 5.0.15 everyting works just fine.
In 5.0.16 (and also 17) I get an exception saying No object of type
org.apache.tapestry5.services.FormSupport is available from the
Environment.
Available types are
org.apache.tapestry5.services.ComponentEventResultProcessor.

This happens when clicking on an actionlink with the following code

 t:actionlink t:id=CreateMyPagelink to mypage/t:actionlink

 public Object onActionFromCreateMyPage()
 {
 mypage.setObject( null );
 mypage.setReturnPage( resources.createPageLink(
resources.getPageName(), false ) );
 return mypage;
 }

The actionlink is not part of a form, but the exception seems to indicate
an
excerpt of code in the returned page (where that case *is* inside the
form)

The stacktrace indicates :

#

org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(EnvironmentImpl.java:73)
#

org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.findFormatter(FieldTranslatorSourceImpl.java:109)
#

org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createTranslator(FieldTranslatorSourceImpl.java:83)
#

org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:77)
#

org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:56)
#

org.apache.tapestry5.internal.services.ComponentDefaultProviderImpl.defaultTranslator(ComponentDefaultProviderImpl.java:123)
#

org.apache.tapestry.commons.components.Hidden.defaultTranslate(Hidden.java:82)
#

org.apache.tapestry.commons.components.Hidden.containingPageDidLoad(Hidden.java)
#

org.apache.tapestry5.internal.structure.ComponentPageElementImpl$4.run(ComponentPageElementImpl.java:101)
#

org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:925)
#

org.apache.tapestry5.internal.structure.ComponentPageElementImpl.containingPageDidLoad(ComponentPageElementImpl.java:779)
#
org.apache.tapestry5.internal.structure.PageImpl.loaded(PageImpl.java:145)
#

org.apache.tapestry5.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:405)
#

org.apache.tapestry5.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:59)
#

org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210)
#

org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99)
#

org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51)
#

org.apache.tapestry5.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:79)
#

be.synergetics.ca.gui.components.Layout._$read_inject_page_assessedCompetencyEdit(Layout.java)

Anybody has an idea of the cause/solution of this exception?

Thanks,
Joachim

--
Joachim Van der Auwera
PROGS bvba, progs.be


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







  

--
Joachim Van der Auwera
PROGS bvba, progs.be


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







  



--
Joachim Van der Auwera
PROGS bvba, progs.be


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



Re: T 5.0.16 : HTML code layout / format of generated files seemes to be wrong

2008-11-24 Thread dhning
That's default, not an issue.

To turn off the behavior and make code clean,  in your appmodule,

public static void contributeApplicationDefaults(
MappedConfigurationString, String configuration)
{
configuration.add(tapestry.compress-whitespace, false); // turn off it
}


Thanks!

DH


- Original Message - 
From: Christian P. [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Monday, November 24, 2008 5:46 PM
Subject: T 5.0.16 : HTML code layout / format of generated files seemes to be 
wrong


 
 Hey,
 
 please excuse my bad English. I just started to try out Tapestry and have
 one big problem I haven't found an answer for. The source code available in
 the client's browsers seems to be really ugly.
 All code from the tml-files (Layout.tml, Index.tml) is squeezed in one
 single line. So the source code looks like:
 
 1: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Stri...head...
 /headbody... (EVERYTHING ;) )
 2: /divscript src=assets/5.0.16/scriptaculous/prototype.js
 type=text/javascript/scriptscript ... (All Java Scripts)
 3: !--
 4: Tapestry.DEBUG_ENABLED = true;
 5: Tapestry.onDOMLoaded(function() {
 6: $('firstNumber').activate();
 7: Tapestry.init(...
 8: });
 9: // --
 10: /script/body/html
 
 
 Is there something I missed to do / add or might it be an Eclipse problem?
 
 
 Thanks in advance,
 Christian
 -- 
 View this message in context: 
 http://www.nabble.com/T-5.0.16-%3A-HTML-code-layout---format-of-generated-files-seemes-to-be-wrong-tp20657660p20657660.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: Problem with 5.0.16/17

2008-11-24 Thread Joachim Van der Auwera

Oops my bad, need to replace in all places.
THis does indeed fix it.

Joachim

Joachim Van der Auwera wrote:

Thanks for the tip.
However, it makes no difference. I still get the same error.

Any other ideas?

Joachim

Ville Virtanen wrote:

Hi,

I have the same problem as you, and I have traced it to be the fault of
commons/hidden component. If you replace it with t:textfield for testing
purposes the problem should go away. Can you verify? So the problem 
is not

your linking or anything else, the hidden component breaks things.

 - Ville

Ps. I have filed issue to T5 commons website, so hopefully it will be 
fixed

soon.


Joachim Van der Auwera wrote:
 

Hi,

When I run my application in 5.0.15 everyting works just fine.
In 5.0.16 (and also 17) I get an exception saying No object of type 
org.apache.tapestry5.services.FormSupport is available from the 
Environment. Available types are 
org.apache.tapestry5.services.ComponentEventResultProcessor.


This happens when clicking on an actionlink with the following code

t:actionlink t:id=CreateMyPagelink to mypage/t:actionlink

public Object onActionFromCreateMyPage()
{
mypage.setObject( null );
mypage.setReturnPage( resources.createPageLink( 
resources.getPageName(), false ) );

return mypage;
}

The actionlink is not part of a form, but the exception seems to 
indicate an excerpt of code in the returned page (where that case 
*is* inside the form)


The stacktrace indicates :

# 
org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(EnvironmentImpl.java:73) 

# 
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.findFormatter(FieldTranslatorSourceImpl.java:109) 

# 
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createTranslator(FieldTranslatorSourceImpl.java:83) 

# 
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:77) 

# 
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:56) 

# 
org.apache.tapestry5.internal.services.ComponentDefaultProviderImpl.defaultTranslator(ComponentDefaultProviderImpl.java:123) 

# 
org.apache.tapestry.commons.components.Hidden.defaultTranslate(Hidden.java:82) 

# 
org.apache.tapestry.commons.components.Hidden.containingPageDidLoad(Hidden.java) 

# 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$4.run(ComponentPageElementImpl.java:101) 

# 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:925) 

# 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.containingPageDidLoad(ComponentPageElementImpl.java:779) 


#
org.apache.tapestry5.internal.structure.PageImpl.loaded(PageImpl.java:145) 

# 
org.apache.tapestry5.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:405) 

# 
org.apache.tapestry5.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:59) 

# 
org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210) 

# 
org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99) 

# 
org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51) 

# 
org.apache.tapestry5.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:79) 

# 
be.synergetics.ca.gui.components.Layout._$read_inject_page_assessedCompetencyEdit(Layout.java) 



Anybody has an idea of the cause/solution of this exception?

Thanks,
Joachim

--
Joachim Van der Auwera
PROGS bvba, progs.be


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






  






--
Joachim Van der Auwera
PROGS bvba, progs.be


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



Re: Problem with 5.0.16/17

2008-11-24 Thread Joachim Van der Auwera
Sorry, was too quick (should have looked at the new tstacktrace 
properly, the t:id is taken from the code, not the template and I had 
only fixed the template).


Sorry for the noise.

Kind regards,
Joachim

Joachim Van der Auwera wrote:
Unfortunately not. As suggested by Ville Virtanen I tried replacing 
all occurences of the Hidden component by TextField components, and 
I get exactly the same error.


So something else must be wrong.

Any ideas?

Joachim

Howard Lewis Ship wrote:

Please contact the author of
org.apache.tapestry.commons.components.Hidden, as that appears to be
the problem.

On Sun, Nov 23, 2008 at 3:57 AM, Joachim Van der Auwera
[EMAIL PROTECTED] wrote:
 

Thanks for the reply.

I am not rendering a part of a form. I have an actionlink which 
returns a

page.
This is not an ajax call, so it should just redirect to that page.
I cannot use a pagelink because I need to set some data on the page 
to be

rendered.
It all worked fine in previous versions of tapestry. It breaks now when
using 5.0.16 or 5.0.17.
Inside the page, the component which gives the exception is 
contained in a

form.

Joachim

Howard Lewis Ship wrote:
   

You can't render a portion of a Form, except for specialized cases
such as AjaxFormLoop and FormInjector.

On Sat, Nov 22, 2008 at 2:20 PM, Joachim Van der Auwera
[EMAIL PROTECTED] wrote:

 

Hi,

When I run my application in 5.0.15 everyting works just fine.
In 5.0.16 (and also 17) I get an exception saying No object of type
org.apache.tapestry5.services.FormSupport is available from the
Environment.
Available types are
org.apache.tapestry5.services.ComponentEventResultProcessor.

This happens when clicking on an actionlink with the following code

 t:actionlink t:id=CreateMyPagelink to mypage/t:actionlink

 public Object onActionFromCreateMyPage()
 {
 mypage.setObject( null );
 mypage.setReturnPage( resources.createPageLink(
resources.getPageName(), false ) );
 return mypage;
 }

The actionlink is not part of a form, but the exception seems to 
indicate

an
excerpt of code in the returned page (where that case *is* inside the
form)

The stacktrace indicates :

#

org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(EnvironmentImpl.java:73) 


#

org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.findFormatter(FieldTranslatorSourceImpl.java:109) 


#

org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createTranslator(FieldTranslatorSourceImpl.java:83) 


#

org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:77) 


#

org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:56) 


#

org.apache.tapestry5.internal.services.ComponentDefaultProviderImpl.defaultTranslator(ComponentDefaultProviderImpl.java:123) 


#

org.apache.tapestry.commons.components.Hidden.defaultTranslate(Hidden.java:82) 


#

org.apache.tapestry.commons.components.Hidden.containingPageDidLoad(Hidden.java) 


#

org.apache.tapestry5.internal.structure.ComponentPageElementImpl$4.run(ComponentPageElementImpl.java:101) 


#

org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:925) 


#

org.apache.tapestry5.internal.structure.ComponentPageElementImpl.containingPageDidLoad(ComponentPageElementImpl.java:779) 


#
org.apache.tapestry5.internal.structure.PageImpl.loaded(PageImpl.java:145) 


#

org.apache.tapestry5.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:405) 


#

org.apache.tapestry5.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:59) 


#

org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210) 


#

org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99) 


#

org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51) 


#

org.apache.tapestry5.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:79) 


#

be.synergetics.ca.gui.components.Layout._$read_inject_page_assessedCompetencyEdit(Layout.java) 



Anybody has an idea of the cause/solution of this exception?

Thanks,
Joachim

--
Joachim Van der Auwera
PROGS bvba, progs.be


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







  

--
Joachim Van der Auwera
PROGS bvba, progs.be


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







  






--
Joachim Van der Auwera
PROGS bvba, progs.be


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



Re: EmittingRSSFeeds Using Tapestry 5.0.16

2008-11-24 Thread Thiago H. de Paula Figueiredo
Em Mon, 24 Nov 2008 04:15:03 -0300, dwi ardi irawan  
[EMAIL PROTECTED] escreveu:



could you give a simple example how to use StreamResponse or any lint
that provide that information...


It's about generating PDFs with iText, but the same concept applies to any  
other file you generate on the fly:  
http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: T 5.0.16 : HTML code layout / format of generated files seemes to be wrong

2008-11-24 Thread Geoff Callender
Or if you need it only during development, set the system property  - 
Dtapestry.compress-whitespace=false


On 24/11/2008, at 9:29 PM, dhning wrote:


That's default, not an issue.

To turn off the behavior and make code clean,  in your appmodule,

public static void contributeApplicationDefaults(
   MappedConfigurationString, String configuration)
{
   configuration.add(tapestry.compress-whitespace, false); //  
turn off it

}


Thanks!

DH


- Original Message -
From: Christian P. [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Monday, November 24, 2008 5:46 PM
Subject: T 5.0.16 : HTML code layout / format of generated files  
seemes to be wrong





Hey,

please excuse my bad English. I just started to try out Tapestry  
and have
one big problem I haven't found an answer for. The source code  
available in

the client's browsers seems to be really ugly.
All code from the tml-files (Layout.tml, Index.tml) is squeezed  
in one

single line. So the source code looks like:

1: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Stri...head...
/headbody... (EVERYTHING ;) )
2: /divscript src=assets/5.0.16/scriptaculous/prototype.js
type=text/javascript/scriptscript ... (All Java Scripts)
3: !--
4: Tapestry.DEBUG_ENABLED = true;
5: Tapestry.onDOMLoaded(function() {
6: $('firstNumber').activate();
7: Tapestry.init(...
8: });
9: // --
10: /script/body/html


Is there something I missed to do / add or might it be an Eclipse  
problem?



Thanks in advance,
Christian
--
View this message in context: 
http://www.nabble.com/T-5.0.16-%3A-HTML-code-layout---format-of-generated-files-seemes-to-be-wrong-tp20657660p20657660.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]



[T5.0.15] Email validator not working using @Validate

2008-11-24 Thread Borut BolĨina
Hi,

this works

@Override
@Validate(required)
public void setFullname(String fullname) {
super.setFullname(fullname);
}

@Override
@Validate(required)
public void setEmail(String email) {
super.setEmail(email);
}

this also works:

@Override
@Validate(required)
public void setFullname(String fullname) {
super.setFullname(fullname);
}

@Override
@Validate(required,minLength=3)
public void setEmail(String email) {
super.setEmail(email);
}

but this fails:

@Override
@Validate(required)
public void setFullname(String fullname) {
super.setFullname(fullname);
}

@Override
@Validate(required,email)
public void setEmail(String email) {
super.setEmail(email);
}

and it fails in such a way that even validation for fullname does not
work. If I replace email validator with

regexp=(\\w+)@(\\w+\\.)(\\w+)(\\.\\w+)*

then everything works as expected. I did not try putting validation in
tml nor with T5.0.16.

Is this a know bug or did I miss something?

I also noticed there is no email validator mentioned at
http://tapestry.apache.org/tapestry5/guide/validation.html and at
http://tapestry.apache.org/tapestry5/tutorial1/forms.html. The only
list of supported validators I found is at
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/input/validators1
which led me to
http://tapestry.apache.org/tapestry5/apidocs/index.html?org/apache/tapestry5/Validator.html
where obviously one can see which validators are supported.

-Borut

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



Re: T 5.0.16 : HTML code layout / format of generated files seemes to be wrong

2008-11-24 Thread Christian P.

First of all thanks for your help.

Unfortunately the source code still hast some ugly parts due to the added
/ refactored code from Tapestry itself.

This brings me to another question. Why is this the default setting?
Is it of any use (making the source more or less unreadable to exaggerate a
bit) ? 

I have to say, it discourage me a little bit.


Thanks again,
Christian



dhning-2 wrote:
 
 That's default, not an issue.
 
 To turn off the behavior and make code clean,  in your appmodule,
 
 public static void contributeApplicationDefaults(
 MappedConfigurationString, String configuration)
 {
 configuration.add(tapestry.compress-whitespace, false); // turn
 off it
 }
 
 
 Thanks!
 
 DH
 
 
 - Original Message - 
 From: Christian P. [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Sent: Monday, November 24, 2008 5:46 PM
 Subject: T 5.0.16 : HTML code layout / format of generated files seemes to
 be wrong
 
 
 ...
 All code from the tml-files (Layout.tml, Index.tml) is squeezed in one
 single line. So the source code looks like:
 ...
 

-- 
View this message in context: 
http://www.nabble.com/T-5.0.16-%3A-Generated-HTML-code-layout---format-seems-to-be-wrong-tp20657660p20659854.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: T 5.0.16 : HTML code layout / format of generated files seemes to be wrong

2008-11-24 Thread Thiago H. de Paula Figueiredo
Em Mon, 24 Nov 2008 09:17:46 -0300, Christian P. [EMAIL PROTECTED]  
escreveu:


Unfortunately the source code still hast some ugly parts due to the  
added / refactored code from Tapestry itself.


This brings me to another question. Why is this the default setting?
Is it of any use (making the source more or less unreadable to  
exaggerate a bit) ?


Smaller pages (in number of bytes). Most of the time nobody is looking at  
the source.



I have to say, it discourage me a little bit.


I don't understand why this would discourage anyone. You could use Firebug  
(Firefox extension), for example. It shows a very nice tree view of the  
HTML source, regardless of any whitespace compression like Tapestry does.  
By the way, Firebug makes Web development way nicer and  
productive, even to an Opera fanboy like me. :)


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: [T5] Components do not refresh after redirect

2008-11-24 Thread Otho
Solved the problem (it did work before the way I described in my first post
and suddenly stopped, thatswhy I was a bit puzzled).

In Spring security context add a context to the landing page

http
...

form-login login-page=/login default-target-url=/lindex/loginsuccess/
..
/http

in Index.java
...

@Inject
private Messages messages;

@Property
private String message;

@Property
private String context;

void onActivate(String contextString)
{
context = contextString;
if (context != null
 context.equalsIgnoreCase(loginsuccess))
{
message = messages.get(loginsuccess);
}
}

Object onPassivate()
{
return context;
}
...

And everything works as expected...

2008/11/23 Otho [EMAIL PROTECTED]

 Hi all!

 I couldn't find a thread about this problem:

 After logging in with spring security I get correctly redirected to the
 landing page, in this case Index, but the layout components, namely the main
 menu, which has entries shown depending on the user roles do not get
 refreshed. Only when I click on one of the links the whole page is reloaded
 and the menu is, as it should be. This phenomenon occurs if I use a normal
 form (not tapestry) and also if I use a tapestry form and construct a
 redirect link like in Shams phb1.0.2.

 Anybody knows this problem and a solution?



YesNoTranslator

2008-11-24 Thread Lucas Silva
Hi, I tried to inject Messages in the YesNoTranslator, but it didn't
work. So I need help, how can I use an internationalized
t:translate=yesno ? An example that I am using:

private String name;
private Boolean admin;

and I use t:beaneditform and t:beandisplay in the .tml files.

I want to show it as a checkbox in the form
and as a text from the TranslationMessages.properties.

regards,
Lucas

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



IE html/css problem

2008-11-24 Thread Joachim Van der Auwera

Hi,

I know it is not tapestry specific, but was hoping somebody on the list 
encountered the same problem.


I have a page which renders fine in FF, and mostly good in IE7.
However for some fields, using html like :

div classmyFieldlabelbla/labelinput/div

the styling is wrong in IE. If I change this to

div classmyFieldlabelbla/label
input/div

(indeed, only adding a newline) the styling is correct in IE7 as well.
Now I obviously have the additional problem that tapestry removes 
unnecessary whitespace, making the obvious solution not work.


Anybody encountered something similar of has any clues towards a fix?

Thanks,
Joachim

--
Joachim Van der Auwera
PROGS bvba, progs.be


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



Re: IE html/css problem

2008-11-24 Thread Thiago HP
On Mon, Nov 24, 2008 at 1:45 PM, Joachim Van der Auwera
[EMAIL PROTECTED] wrote:
 Hi,

Hi!
 (indeed, only adding a newline) the styling is correct in IE7 as well.
 Now I obviously have the additional problem that tapestry removes
 unnecessary whitespace, making the obvious solution not work.

You can disable the Tapestry removing unnecessary whitespace with

public static void contributeApplicationDefaults(
   MappedConfigurationString, String configuration) {
   configuration.add(tapestry.compress-whitespace, false); // turn off it
}

 Anybody encountered something similar of has any clues towards a fix?

Regarding Internet Explorer, it's not difficult to find out why it is
so hated by anyone that has HTML/CSS/Javascript writing as part of
their lives . . .

-- 
Thiago

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



RE: IE html/css problem

2008-11-24 Thread Anna Vo
You can also try installing the Internet Explorer Developer Toolbar if
you don't have that yet:
http://www.microsoft.com/downloadS/details.aspx?familyid=E59C3964-672D-4
511-BB3E-2D5E1DB91038displaylang=en

Usually problems between browsers is CSS related not HTML, if your HTML
is well-formed. You should be able to find a style solution without
resorting to taking out the whitespace.

Noticed in your example that you had 
div classmyFieldlabelbla/labelinput/div 
I am assuming you have class=myField (missing equals), etc.

-Original Message-
From: Thiago HP [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2008 10:00 AM
To: Tapestry users
Subject: Re: IE html/css problem

On Mon, Nov 24, 2008 at 1:45 PM, Joachim Van der Auwera
[EMAIL PROTECTED] wrote:
 Hi,

Hi!
 (indeed, only adding a newline) the styling is correct in IE7 as well.
 Now I obviously have the additional problem that tapestry removes
 unnecessary whitespace, making the obvious solution not work.

You can disable the Tapestry removing unnecessary whitespace with

public static void contributeApplicationDefaults(
   MappedConfigurationString, String configuration) {
   configuration.add(tapestry.compress-whitespace, false); // turn
off it
}

 Anybody encountered something similar of has any clues towards a fix?

Regarding Internet Explorer, it's not difficult to find out why it is
so hated by anyone that has HTML/CSS/Javascript writing as part of
their lives . . .

-- 
Thiago

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


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



[T5] Access to page instance

2008-11-24 Thread Henrik Schlanbusch
Hi all

Is it possible to get access to an instance 
of a page without using the InjectPage 
annotation? I know the logical name of the
page - the string groupEditor, and would
like get an instance of the page, and run
some getters on it. I have the logical names
in a map, and do not have the option to 
use annotations to get access  to a page
instance.

Henrik


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



Re: Global (application state) data

2008-11-24 Thread Marcus Veloso
Hi Toby,
from  http://tapestry.apache.org/tapestry5/guide/appstate.html

The default persistence strategy, session, stores the ASOs inside the
session. The session is created as needed.
Generally, you will configure an ASO if you need to change it from the
default persistence strategy. Right now there's only one built in strategy,
but more will be coming in the future.

But, as any java app, you can do this with static object.

Marcus Veloso


Re: Global (application state) data

2008-11-24 Thread superoverdrive
What about an IOC singleton service? Would that work?

 Original-Nachricht 
 Datum: Mon, 24 Nov 2008 13:59:24 -0300
 Von: Marcus Veloso [EMAIL PROTECTED]
 An: Tapestry users users@tapestry.apache.org
 Betreff: Re: Global (application state) data

 Hi Toby,
 from  http://tapestry.apache.org/tapestry5/guide/appstate.html
 
 The default persistence strategy, session, stores the ASOs inside the
 session. The session is created as needed.
 Generally, you will configure an ASO if you need to change it from the
 default persistence strategy. Right now there's only one built in
 strategy,
 but more will be coming in the future.
 
 But, as any java app, you can do this with static object.
 
 Marcus Veloso

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



Re: Global (application state) data

2008-11-24 Thread Daniel Jue
On Mon, Nov 24, 2008 at 1:55 PM,  [EMAIL PROTECTED] wrote:
 What about an IOC singleton service? Would that work?

Yes, a singleton should work, and may very well use static modifiers
in it's definition.

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



Re: YesNoTranslator

2008-11-24 Thread Lucas Silva
I solved it using  t:format. That I think fits better.
Here is my snapped code:

public StringBuffer format(Object obj, StringBuffer 
toAppendTo,
FieldPosition pos) {
if (obj instanceof Boolean) {
if (((Boolean) obj).booleanValue()) {
String r = 
messagesSource.getValidationMessages(

_currentLocale).get(yesno-yes);
return new StringBuffer(r);
} else {
String r = 
messagesSource.getValidationMessages(

_currentLocale).get(yesno-no);
return new StringBuffer(r);
}
}
return new StringBuffer(indefined);
}
I forgot to said that I am using T 5.0.16.

regards,
Lucas



On Mon, Nov 24, 2008 at 10:44 AM, Lucas Silva [EMAIL PROTECTED] wrote:
 Hi, I tried to inject Messages in the YesNoTranslator, but it didn't
 work. So I need help, how can I use an internationalized
 t:translate=yesno ? An example that I am using:

 private String name;
 private Boolean admin;

 and I use t:beaneditform and t:beandisplay in the .tml files.

 I want to show it as a checkbox in the form
 and as a text from the TranslationMessages.properties.

 regards,
 Lucas


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



Flash Persistence compatible with stateless load balancing?

2008-11-24 Thread Daniel Leffel
Hi all,
Is the flash persistence strategy compatible with stateless load balancing
or is client persistence the only strategy that would work with a
stateless load balancer?

Thanks in advance!

Daniel Leffel


Get instance of page

2008-11-24 Thread Henrik Schlanbusch
Hi

In tapestry 4 it was possible to get an instance of a page by using the
cycle.getPage(somePageName); Then it was possible to set properties on the
page before activating it. I would like to do something like this in T5, it
seems that the only way to get an instance of a page is by getting it from an
injected property (InjectPage). Is it possible in T5 to get hold of page
instances without using injected properties, but through string identifiers like
in T4?

Henrik


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



Re: Get instance of page

2008-11-24 Thread Shing Hing Man
Have you tried ComponentSource  ?

   @Inject
  private ComponentSource compSource;

 MyPage comp = (MyPage) compSource.getPage(pageName); 


Shing







Home page : http://www.lombok.demon.co.uk/



--- On Tue, 25/11/08, Henrik Schlanbusch [EMAIL PROTECTED] wrote:

 From: Henrik Schlanbusch [EMAIL PROTECTED]
 Subject: Get instance of page
 To: users@tapestry.apache.org
 Date: Tuesday, 25 November, 2008, 5:43 AM
 Hi
 
 In tapestry 4 it was possible to get an instance of a page
 by using the
 cycle.getPage(somePageName); Then it was
 possible to set properties on the
 page before activating it. I would like to do something
 like this in T5, it
 seems that the only way to get an instance of a page is by
 getting it from an
 injected property (InjectPage). Is it possible in T5 to get
 hold of page
 instances without using injected properties, but through
 string identifiers like
 in T4?
 
 Henrik
 
 
 -
 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: Get instance of page

2008-11-24 Thread Thiago H. de Paula Figueiredo
Em Mon, 24 Nov 2008 18:43:37 -0300, Henrik Schlanbusch [EMAIL PROTECTED]  
escreveu:



Is it possible in T5 to get hold of page
instances without using injected properties, but through string  
identifiers like in T4?


Using @InjectPage is the T5 way to do it, but it is possible that there is  
some way to do what you want. I'm just curious about what would be the  
advantage of doing it using identifiers (besides using something you're  
already familiar with, of course. :)).


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Q : paging using loop component ?

2008-11-24 Thread zack1403

You probably want to check out t5 components
(http://87.193.218.134:8080/t5components/t5c-commons/ref/index.html). 
Specifically the pagedLoop component.

Zack


dwi ardi irawan wrote:
 
 does anybody could give me information how to do paging using loop
 component
 in tapestry 5
 
 thnx u very much ^_^v
 
 -- 
 http://dwiardiirawan.blogspot.com
 cos everyone could be extraordinary...lighten up !
 
 

-- 
View this message in context: 
http://www.nabble.com/Q-%3A-paging-using-loop-component---tp20636732p20672176.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]



(newbie) Tapestry generated b/

2008-11-24 Thread akira
Hi, this is the first time i'm using Tapestry. I'm using a css tricky  
to make rounded corners, the css uses empty b (bold) to create the  
rounded corners, when Tapestry generates the html it creates the open  
b but doesn't create the closing b:

what i want: b class=top/b
Tapestry generated code: b class=top /
There's someplace where i can configure Tapestry to generate close  
tags when there is nothing between the tags? TIA.


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



Re: Get instance of page

2008-11-24 Thread Henrik Schlanbusch
Shing Hing Man matmsh at yahoo.com writes:

 
 Have you tried ComponentSource  ?
 
@Inject
   private ComponentSource compSource;
 
  MyPage comp = (MyPage) compSource.getPage(pageName); 
 
 Shing

Shing, thanks man! This worked. I can now get instances of the pages through
their id!

Best regards
Henrik


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



Re: Get instance of page

2008-11-24 Thread Henrik Schlanbusch
Thiago H. de Paula Figueiredo thiagohp at
 gmail.com writes:

 
 Em Mon, 24 Nov 2008 18:43:37 -0300, 
Henrik Schlanbusch henrik at enovate.no  
 escreveu:
 
  Is it possible in T5 to get hold 
of page
  instances without using injected 
properties, but through string  
  identifiers like in T4?
 
 Using @InjectPage is the T5 way to 
do it, but it is possible that there is  
 some way to do what you want. I'm 
just curious about what would be the  
 advantage of doing it using identifiers 
(besides using something you're  
 already familiar with, of course. :)).
 

Hi Thiago

I am doing this because I have one controller in the 
application that holds a
mapping between object types and page ids. 
When I create an object of any type,
the system will ask the controller to get 
a page that renders this object
correctly. If I do this through annotations 
I have to have a page full of all
pages as annotated properties, and then add 
these properties to a map where I
map object type and page, which is a bit 
heavy I think. Now I have a spring
injected map that simply maps com.somepackage.
SomeObject-SomeObjectEditor. So
when an instance of SomeObject has been created, 
I ask the map for the correct
editor (which returns the logical name of the page), 
and set the object as a
model on that page before returning it from my 
action method.

Does that make sense to you? Maybe the pattern 
isn't good? I do not know, but it
works. :-)

Henrik





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



Re: [T5] Access to page instance

2008-11-24 Thread Henrik Schlanbusch
Henrik Schlanbusch henrik at enovate.no writes:

 
 Hi all
 
 Is it possible to get access to an instance 
 of a page without using the InjectPage 
 annotation? I know the logical name of the
 page - the string groupEditor, and would
 like get an instance of the page, and run
 some getters on it. I have the logical names
 in a map, and do not have the option to 
 use annotations to get access  to a page
 instance.
 
 Henrik
 

Sorry for the double posting. The soloution 
was found thanks to Shing: 

 @Inject
  private ComponentSource compSource;

MyPage comp = (Mypage) compSource.getPage(pageId);

Henrik





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



Re: (newbie) Tapestry generated b/

2008-11-24 Thread Peter Stavrinides
Tapestry is meant to generate valid XHTML, which means the tag should be 
closed, but due to a bug introduced recently it appears not to with certain 
tags see:
https://issues.apache.org/jira/browse/TAP5-333 and vote for it to be fixed, in 
the meantime use a span / instead, it will work... I use the same rounded 
corner trick!

cheers,
Peter

- Original Message -
From: akira [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Tuesday, 25 November, 2008 2:53:51 AM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: (newbie) Tapestry generated b/

Hi, this is the first time i'm using Tapestry. I'm using a css tricky  
to make rounded corners, the css uses empty b (bold) to create the  
rounded corners, when Tapestry generates the html it creates the open  
b but doesn't create the closing b:
what i want: b class=top/b
Tapestry generated code: b class=top /
There's someplace where i can configure Tapestry to generate close  
tags when there is nothing between the tags? TIA.

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