Re: T4: Async submit client side listeners

2008-06-03 Thread Kalle Korhonen
cycle.getResponseBuilder().addInitializationScript(this,
myJavascriptFunction(););

Kalle


On Mon, Jun 2, 2008 at 9:19 PM, Paul Stanton [EMAIL PROTECTED]
wrote:

 Hi all,

 I've got a form which is submitted asynchronously as follows:

 form jwcid=[EMAIL PROTECTED] listener=listener:process async=true
   input jwcid=[EMAIL PROTECTED] selected=ognl:selected tag=tag
 value=go/
 /form

 I can add javascript handling before the form is submitted by adding an
 onclick handler to the submit button, but is there a way to call javascript
 after the form is submitted - ie directly after async request has been made?

 Thanks, Paul.


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




Re: T4: Async submit client side listeners

2008-06-03 Thread Andreas Andreou
I think tapestry.form.submit(formId, submitName, parms)
is called for async submit

you can dojo.event.connect on it and do stuff when it finishes

On Tue, Jun 3, 2008 at 7:19 AM, Paul Stanton
[EMAIL PROTECTED] wrote:
 Hi all,

 I've got a form which is submitted asynchronously as follows:

 form jwcid=[EMAIL PROTECTED] listener=listener:process async=true
   input jwcid=[EMAIL PROTECTED] selected=ognl:selected tag=tag
 value=go/
 /form

 I can add javascript handling before the form is submitted by adding an
 onclick handler to the submit button, but is there a way to call javascript
 after the form is submitted - ie directly after async request has been made?

 Thanks, Paul.


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





-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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



Re: Tap 5.0.11 : How to get page instance from page

2008-06-03 Thread Robert Zeigler
This is by-product of the live class reloading, and not related to the  
instrumentation, per se.
Two classes in different classloaders are not equal. In this case,  
you're casting the component object, whose class is in the  
discardable classloader (which handles page and component classes)  
to the MyPage class which is in the non-discardable class loader  
(which handles anything not a page, component, or mixin).  There are  
two workarounds to your problem.
1) You code will work as is if you put it into a page or component.  
In that case, you could try passing the page or component to the  
service, instead of trying to load the page or component in the  
service.  Or...
2) Have your page/pages implement a common interface (the interface  
class should be stored outside of the page/component/mixin sub- 
packages). Then cast to your interface, instead of to the actual  
page.  Personally, I think this is a cleaner solution, anyway (knowing  
the property you want to set beforehand, but not knowing the actual  
class/page name until runtime smells like you want an interface,  
anyway).


Robert

On Jun 2, 2008, at 6/25:18 PM , raulmt wrote:



No, I need to do this in a service... but even in a page, i have the  
page
class in a String at runtime, so I can't declare a property and use  
the

InjectPage like that

Regards.


Robert Zeigler wrote:


Is this in a component or page class? If so, the answer is:

@InjectPage
private MyPage page;
...

page.setSomething();

Robert

On Jun 2, 2008, at 6/25:04 PM , raulmt wrote:



Hi,

I'm trying to obtain a page from it's name to set a property on it.
I'm
trying something like this:

Component page = componentSource.getPage(MyPage);
MyPage myPage = (MyPage)page;
myPage.setSomething();

This code fails in the cast, despite a

System.out.println(page.getClass().getName());

prints the expected page class (com.myapp.pages.MyPage) I assume
is
because all the instrumentation T5 does to the pages, but is there a
way to
obtain a page from its name and then set a property that the
original
class has??

The only workaround i've found is to call the method setSomething  
with

reflection, without casting it to MyPage, but it would be really
nice not to
use reflection for this

Regards.


Filip S. Adamsen-2 wrote:


Hi,

RequestPageCache is an internal service, it's better to use
ComponentSource instead. It has methods to get a component or  
page by

logical name.

http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/ComponentSource.html

-Filip

On 2008-05-05 16:01, Kristian Marinkovic wrote:

@Inject
private RequestPageCache pageCache;

pageCache.get(logicalName)


g,
kris







Shing Hing Man [EMAIL PROTECTED]
05.05.2008 15:53
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
tapestry Tapestry [EMAIL PROTECTED]
Kopie

Thema
Tap 5.0.11 : How to get page instance  from page







Usually, I could use the following to inject a page
into another  page

@InjectPage
private DetailsPage  details;

How to retrieve an instance of a page if I am given
the logical name of a page as a String variable ?

In Tap 4, I would use RequestCycle.getPage(pageName).

Thanks in advance for any asistance!

Shing

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



   ___
Yahoo! For Good. Give and get cool things for free, reduce waste
and help
our planet. Plus find hidden Yahoo! treasure

http://green.yahoo.com/uk/earth-day/

-
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/Tap-5.0.11-%3A-How-to-get-page-instance--from-page-tp17062196p17611843.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



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





--
View this message in context: 
http://www.nabble.com/Tap-5.0.11-%3A-How-to-get-page-instance--from-page-tp17062196p17612066.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]



when do the environmental object (like validationtracker) become available?

2008-06-03 Thread Joachim Van der Auwera

Hi,

I have a page which should display an error when rendered.
I tried putting the error message in validationtracker either in 
onActivate or beginRender, but in both cases, the v alidationtracker is 
not found in the environment.


When does this become available or what is the right event to put stuff 
in the validationtracker?


Thanks for the help,
Joachim

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


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



Re: PageTester and Select Component

2008-06-03 Thread David Roberts

Replying to myself again!  Probably a bad sign:

 the problem was this:  id=searchOptions
 should have been this:t:id=searchOptions

funny that it worked in the web page but failed the test.   Anyway, I 
guess that's what the test is for.



David Roberts wrote:

Hi,

I'm having problems instantiating values into a select component when 
testing forms.  This is my form:


   t:form t:id=searchForm
  t:errors/
  t:select id=searchOptions value=searchType 
model=searchTypes validate=required/
  t:textfield t:id=searchString t:value=searchString  
validate=required/

  input type=submit value=Search/
   /t:form

 and this is the test:

   doc = this.pageTester.renderPage(Search);
   form = doc.getElementById(searchForm);
   fieldValues = new HashMapString, String();
   fieldValues.put(searchOptions, TEL_NO);
   fieldValues.put(searchString, +443739182931);
   doc = pageTester.submitForm(form, fieldValues);

Basically, the select component value is left as null.   The select is 
backed by an EnumSelectModel:


   public enum SearchType {
   NAME,
   TEL_NO
   }

Any ideas?  thanks.


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



Acegi and tapestry login page

2008-06-03 Thread 滕训华
I made my own login.tml and integrate acegi for my security.But when I run
the login page in IE,there is a error icon after username and password filed
even the first time to access it.

 

I don’t know why,

 

The login.tml is:

 

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;

 

head

link href=${asset:context:css/style.css}  rel=stylesheet
type=text/css /

titleYOUR TITLE HERE!/title

 

/head

 

body scroll=no

 

div class=header

  div class=header_interiorimg src=${asset:context:/images/logo.gif}
alt=Logo width=44 height=44 style=float:left; margin-right:10px; / 

  h1 class=titleCall Center for JILIN Tax Revenue /h1

  /div

/div

 

div class=header_shadow /div

 

  div class=content_interior

 

 

div class=login_table

br /

br/

br/

t:form t:id=loginForm

   table

   tr

  tdusername:/td

  tdinput t:type=TextField type=text t:id=j_username
//td

   /tr

   tr

  tdpassword:/td

  tdinput t:type=PasswordField  type=password
t:id=j_password //td

   /tr

   /table





/t:form

  /div

/div

div class=footerdiv class=footer-inner

 



br clear=all /

hr width=100%  noshade=noshade  style=border-top:1px solid #FF;
border-bottom: none; margin-bottom:5px; /

div style=text-align:center;Copyright ? 2008 YourName 

  !-- Thanks Again -- /div

/divbr clear=all //div

/body

/html

 



Re: when do the environmental object (like validationtracker) become available?

2008-06-03 Thread nille hammer

Hi Joachim,
a ValidationTracker ist pushed into the environment by the tapestry Form 
component during its beginRender()-method and popped from it during 
cleanupRender(). I don´t think, there is a ValidationTracker available in the 
environment for pages that do not contain forms (or you might have to push one 
into it yourself). On pages with forms you can get the ValidationTracker by 
calling getDefaultTracker() on the form. The metods recordError(...) might be 
of interest too.
Regards, nillehammer



- original Nachricht 

Betreff: when do the environmental object (like validationtracker) become 
available?
Gesendet: Di, 03. Jun 2008
Von: Joachim Van der Auwera[EMAIL PROTECTED]

 Hi,
 
 I have a page which should display an error when rendered.
 I tried putting the error message in validationtracker either in 
 onActivate or beginRender, but in both cases, the v alidationtracker is 
 not found in the environment.
 
 When does this become available or what is the right event to put stuff 
 in the validationtracker?
 
 Thanks for the help,
 Joachim
 
 -- 
 Joachim Van der Auwera
 PROGS bvba, progs.be
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

--- original Nachricht Ende 


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



Re: when do the environmental object (like validationtracker) become available?

2008-06-03 Thread Denis Kok
he?


- Original Message 
From: nille hammer [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Tuesday, June 3, 2008 11:49:31 AM
Subject: Re: when do the environmental object (like validationtracker) become 
available?


Hi Joachim,
a ValidationTracker ist pushed into the environment by the tapestry Form 
component during its beginRender()-method and popped from it during 
cleanupRender(). I don´t think, there is a ValidationTracker available in the 
environment for pages that do not contain forms (or you might have to push one 
into it yourself). On pages with forms you can get the ValidationTracker by 
calling getDefaultTracker() on the form. The metods recordError(...) might be 
of interest too.
Regards, nillehammer



- original Nachricht 

Betreff: when do the environmental object (like validationtracker) become 
available?
Gesendet: Di, 03. Jun 2008
Von: Joachim Van der Auwera[EMAIL PROTECTED]

 Hi,
 
 I have a page which should display an error when rendered.
 I tried putting the error message in validationtracker either in 
 onActivate or beginRender, but in both cases, the v alidationtracker is 
 not found in the environment.
 
 When does this become available or what is the right event to put stuff 
 in the validationtracker?
 
 Thanks for the help,
 Joachim
 
 -- 
 Joachim Van der Auwera
 PROGS bvba, progs.be
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

--- original Nachricht Ende 


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


  

Re: Tap 5.0.11 : How to get page instance from page

2008-06-03 Thread Marcelo Lotif
Raulmt,
I'm using exactly the same code as you with the solution #2 from
Robert and it's working very well for me. Maybe you should try it
first.

2008/6/3 Robert Zeigler [EMAIL PROTECTED]:
 This is by-product of the live class reloading, and not related to the
 instrumentation, per se.
 Two classes in different classloaders are not equal. In this case, you're
 casting the component object, whose class is in the discardable
 classloader (which handles page and component classes) to the MyPage class
 which is in the non-discardable class loader (which handles anything not a
 page, component, or mixin).  There are two workarounds to your problem.
 1) You code will work as is if you put it into a page or component. In
 that case, you could try passing the page or component to the service,
 instead of trying to load the page or component in the service.  Or...
 2) Have your page/pages implement a common interface (the interface class
 should be stored outside of the page/component/mixin sub-packages). Then
 cast to your interface, instead of to the actual page.  Personally, I think
 this is a cleaner solution, anyway (knowing the property you want to set
 beforehand, but not knowing the actual class/page name until runtime smells
 like you want an interface, anyway).

 Robert

 On Jun 2, 2008, at 6/25:18 PM , raulmt wrote:


 No, I need to do this in a service... but even in a page, i have the page
 class in a String at runtime, so I can't declare a property and use the
 InjectPage like that

 Regards.


 Robert Zeigler wrote:

 Is this in a component or page class? If so, the answer is:

 @InjectPage
 private MyPage page;
 ...

 page.setSomething();

 Robert

 On Jun 2, 2008, at 6/25:04 PM , raulmt wrote:


 Hi,

 I'm trying to obtain a page from it's name to set a property on it.
 I'm
 trying something like this:

 Component page = componentSource.getPage(MyPage);
 MyPage myPage = (MyPage)page;
 myPage.setSomething();

 This code fails in the cast, despite a

 System.out.println(page.getClass().getName());

 prints the expected page class (com.myapp.pages.MyPage) I assume
 is
 because all the instrumentation T5 does to the pages, but is there a
 way to
 obtain a page from its name and then set a property that the
 original
 class has??

 The only workaround i've found is to call the method setSomething with
 reflection, without casting it to MyPage, but it would be really
 nice not to
 use reflection for this

 Regards.


 Filip S. Adamsen-2 wrote:

 Hi,

 RequestPageCache is an internal service, it's better to use
 ComponentSource instead. It has methods to get a component or page by
 logical name.


 http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/ComponentSource.html

 -Filip

 On 2008-05-05 16:01, Kristian Marinkovic wrote:

 @Inject
 private RequestPageCache pageCache;

 pageCache.get(logicalName)


 g,
 kris







 Shing Hing Man [EMAIL PROTECTED]
 05.05.2008 15:53
 Bitte antworten an
 Tapestry users users@tapestry.apache.org


 An
 tapestry Tapestry [EMAIL PROTECTED]
 Kopie

 Thema
 Tap 5.0.11 : How to get page instance  from page







 Usually, I could use the following to inject a page
 into another  page

 @InjectPage
 private DetailsPage  details;

 How to retrieve an instance of a page if I am given
 the logical name of a page as a String variable ?

 In Tap 4, I would use RequestCycle.getPage(pageName).

 Thanks in advance for any asistance!

 Shing

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



   ___
 Yahoo! For Good. Give and get cool things for free, reduce waste
 and help
 our planet. Plus find hidden Yahoo! treasure

 http://green.yahoo.com/uk/earth-day/

 -
 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/Tap-5.0.11-%3A-How-to-get-page-instance--from-page-tp17062196p17611843.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


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




 --
 View this message in context:
 http://www.nabble.com/Tap-5.0.11-%3A-How-to-get-page-instance--from-page-tp17062196p17612066.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

2008-06-03 Thread Menno Kok
Hi,

I have see Tapestry and quite like it. Though some people no like it.
Is there plans to integrate Tapestry with YUI?

Thanks

Menno



  

ApplicationState not stored during onSuccess?

2008-06-03 Thread Martin Kersten
Hi,

  I have a simple login status. When doing a login, the user 
-object is stored using login.setUser(user). Two places
where this can happen one works (onAction) and one it doesn't
work (onSuccess). First is triggered by action-link using a 
context and second is triggered by an ordinary form. Both 
logins are correctly performed and loginStatus is correctly
Updated, but the later one (onSuccess) the application state
object is not remembered (updated) correctly.

What is wrong? (Using tapestry 5.11)


Following code-snippets I have:

...
@ApplicationState
private LoginStatus loginStatus;

...

private void login(String name, String password) {
   User user = userService.login(name, password);
   loginStatus.setUser(user);
}

...
public boolean onAction(String name, String password) {
   login(name, password); //works well
   return true;
}

...
public Object onSuccess() {
   if(name != null  password != null) 
  //results in correct login but loginStatus change is 
  //not remembered afterwards
  login(name, password); 
  return true;
}


Thanks for any hint or help,

Martin (Kersten)

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



Re: REpost: T3: Stop back button view after form submits.

2008-06-03 Thread Andy Pahne


google Redirect After Post



Gutemberg A. Da Silva schrieb:

I'm having the same problem too. I would like any ideas for stopping back
button of browser.

Thanks.

2008/6/2 James Sherwood [EMAIL PROTECTED]:


disregard, im an idiot and sent it from the wrong account and didn't think
it would go through:)

--James
- Original Message - From: James  Carrie 
[EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Monday, June 02, 2008 9:26 AM
Subject: REpost: T3: Stop back button view after form submits.



Hello,

I was told I posted this in the wrong spot so I am sending to the list
again and hopefully it goes in the right spot..

I am trying to stop users from submitting a form and then pressing the back
button and seeing the form again.  I would like to either redirect them
somehow or just show them a session expired.

Any ideas?

Thanks,
--James


__ Information from ESET Smart Security, version of virus signature
database 3151 (20080602) __

The message was checked by ESET Smart Security.

http://www.eset.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]



AW: ApplicationState not stored during onSuccess?

2008-06-03 Thread Martin Kersten
Hi there, 
  
   I just found a little bit of a hack. OnSuccess I just return
an action-link. So I guess that Tapestry just thinks the form 
processing failed and 'rolled back' the application state changes.

So the question is again, what is wrong?


Cheers,

Martin (Kersten)

-Ursprüngliche Nachricht-
Von: Martin Kersten [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 3. Juni 2008 14:21
An: Tapestry users
Betreff: ApplicationState not stored during onSuccess?

Hi,

  I have a simple login status. When doing a login, the user -object is stored 
using login.setUser(user). Two places where this can happen one works 
(onAction) and one it doesn't work (onSuccess). First is triggered by 
action-link using a context and second is triggered by an ordinary form. Both 
logins are correctly performed and loginStatus is correctly Updated, but the 
later one (onSuccess) the application state object is not remembered (updated) 
correctly.

What is wrong? (Using tapestry 5.11)


Following code-snippets I have:

...
@ApplicationState
private LoginStatus loginStatus;

...

private void login(String name, String password) {
   User user = userService.login(name, password);
   loginStatus.setUser(user);
}

...
public boolean onAction(String name, String password) {
   login(name, password); //works well
   return true;
}

...
public Object onSuccess() {
   if(name != null  password != null) 
  //results in correct login but loginStatus change is 
  //not remembered afterwards
  login(name, password); 
  return true;
}


Thanks for any hint or help,

Martin (Kersten)

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



[T4.1.6]: Template Parsing problem?

2008-06-03 Thread Andy Pahne


I have a page called Details which contains a form component (id = 
reservationForm).


Whenever I enter the page's URL in the browser, the page displays correctly.

But whenever I try to invoke a listener on another page that returns a 
Details page instance, there is an exception:
 org.apache.tapestry.parse.TemplateParseException: Tag form on 
line 25 references unknown component id 'reservationForm'.




the listener on the other page:

public IPage lastMinuteSelectAction(
long objectID, Supplier supplier) {

...

return getInterhomeDetailsPage();
//throw new PageRedirectException(PAGE_INTERHOME_DETAILS);
//return getRequestCycle().getPage(PAGE_INTERHOME_DETAILS);

}

@InjectPage(PAGE_INTERHOME_DETAILS)
public abstract InterhomeDetails getInterhomeDetailsPage();





I tried all three versions, all with the same outcome: the form 
component cannot be found.






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



[Tapestry 5] Multiple Action Request Handling

2008-06-03 Thread Cordenier Christophe
Hello,

I'm trying to find a good server side solution to avoid the process of an 
action multiple times, when the user click repeatedly on a submit button, or an 
action link...

I have thought about the old synchronized token pattern that should be 
implemented in a ComponentEventRequestHandlerFilter to stop similar action 
request, and then, using a decorator for the ActionRenderResponseGenerator to 
store the result in user session when first access is finished, so that the 
Filter can redirect the user to the request page using the built-in 
ActionRenderResponseGenerator

What do you advice ?

Christophe.



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

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


Re: [T4.1.6]: Template Parsing problem? -- SOLVED

2008-06-03 Thread Andy Pahne



Found it myself:

the name of the page that was defined in PAGE_INTERHOME_DETAILS had a 
leading slash. It works without the slash!


Andy



Andy Pahne schrieb:


I have a page called Details which contains a form component (id = 
reservationForm).


Whenever I enter the page's URL in the browser, the page displays 
correctly.


But whenever I try to invoke a listener on another page that returns a 
Details page instance, there is an exception:
 org.apache.tapestry.parse.TemplateParseException: Tag form on 
line 25 references unknown component id 'reservationForm'.




the listener on the other page:

public IPage lastMinuteSelectAction(
long objectID, Supplier supplier) {

...

return getInterhomeDetailsPage();
//throw new PageRedirectException(PAGE_INTERHOME_DETAILS);
//return getRequestCycle().getPage(PAGE_INTERHOME_DETAILS);

}

@InjectPage(PAGE_INTERHOME_DETAILS)
public abstract InterhomeDetails getInterhomeDetailsPage();





I tried all three versions, all with the same outcome: the form 
component cannot be found.






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



Re: Newbie

2008-06-03 Thread Sven Homburg
let me know your google query string

2008/6/3 Menno Kok [EMAIL PROTECTED]:

 Hello men and women,

 I saw many google search result about tapestry that maked me nervos. Is it
 true that tapetsry 6 would be not compatible with other tapestry versions?
 I want to know before I spend many times with learning tapestry.
 Forgive me my bad english, please.

 Thank you,

 Menno


 - Original Message 
 From: Menno Kok [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Sent: Tuesday, June 3, 2008 1:53:29 PM
 Subject: Newbie

 Hi,

 I have see Tapestry and quite like it. Though some people no like it.
 Is there plans to integrate Tapestry with YUI?

 Thanks

 Menno







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


Re: Newbie

2008-06-03 Thread Menno Kok
Hello men and women,

I saw many google search result about tapestry that maked me nervos. Is it true 
that tapetsry 6 would be not compatible with other tapestry versions?
I want to know before I spend many times with learning tapestry.
Forgive me my bad english, please.

Thank you,

Menno


- Original Message 
From: Menno Kok [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Tuesday, June 3, 2008 1:53:29 PM
Subject: Newbie

Hi,

I have see Tapestry and quite like it. Though some people no like it.
Is there plans to integrate Tapestry with YUI?

Thanks

Menno


  

AW: Newbie

2008-06-03 Thread Martin Kersten
:-) 

-Ursprüngliche Nachricht-
Von: Menno Kok [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 3. Juni 2008 15:45
An: Tapestry users
Betreff: Re: Newbie

Hello men and women,

I saw many google search result about tapestry that maked me nervos. Is it true 
that tapetsry 6 would be not compatible with other tapestry versions?
I want to know before I spend many times with learning tapestry.
Forgive me my bad english, please.

Thank you,

Menno


- Original Message 
From: Menno Kok [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Tuesday, June 3, 2008 1:53:29 PM
Subject: Newbie

Hi,

I have see Tapestry and quite like it. Though some people no like it.
Is there plans to integrate Tapestry with YUI?

Thanks

Menno


  

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



Re: Newbie

2008-06-03 Thread Daniel Jue
Dear Kok Menno,

Tapestry 6 is perfectly compatible with Tapestry 5, I am using it now.
 It's just one class file right now, but I like to imagine that it's
adding heuristic artificial intelligence to my T5 application.  It
makes error 403 pages say I'm sorry Daniel, I can't let you do that.
 You can always dream, can't you?
But you seemed to have missed the point, because there is no Tapestry
6.  Tapestry 5 is the final release of Tapestry.  I hope I have
unmaked you nervos. ;-)


On Tue, Jun 3, 2008 at 9:50 AM, Sven Homburg [EMAIL PROTECTED] wrote:
 let me know your google query string

 2008/6/3 Menno Kok [EMAIL PROTECTED]:

 Hello men and women,

 I saw many google search result about tapestry that maked me nervos. Is it
 true that tapetsry 6 would be not compatible with other tapestry versions?
 I want to know before I spend many times with learning tapestry.
 Forgive me my bad english, please.

 Thank you,

 Menno


 - Original Message 
 From: Menno Kok [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Sent: Tuesday, June 3, 2008 1:53:29 PM
 Subject: Newbie

 Hi,

 I have see Tapestry and quite like it. Though some people no like it.
 Is there plans to integrate Tapestry with YUI?

 Thanks

 Menno







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


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



Re: Newbie

2008-06-03 Thread Menno Kok
I search tapestry inside google and get many result and read many many of 
them.
Sven, can you answer my question? I am now afraid with tapestry. Help me to be 
afraid not. I like tapestry a bit and I want to use tapestry.

Thank you.

Menno


- Original Message 
From: Sven Homburg [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Tuesday, June 3, 2008 3:50:13 PM
Subject: Re: Newbie

let me know your google query string

2008/6/3 Menno Kok [EMAIL PROTECTED]:

 Hello men and women,

 I saw many google search result about tapestry that maked me nervos. Is it
 true that tapetsry 6 would be not compatible with other tapestry versions?
 I want to know before I spend many times with learning tapestry.
 Forgive me my bad english, please.

 Thank you,

 Menno


 - Original Message 
 From: Menno Kok [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Sent: Tuesday, June 3, 2008 1:53:29 PM
 Subject: Newbie

 Hi,

 I have see Tapestry and quite like it. Though some people no like it.
 Is there plans to integrate Tapestry with YUI?

 Thanks

 Menno







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



  

Re: Tap 5.0.11 : How to get page instance from page

2008-06-03 Thread raulmt

Thanks Robert!!

I tried 2) before, but I left the interface in the same package
([...].pages) now I move it to another package like you said and it
works perfectly :)

And thanks for the explanation of the classloaders, it is all clear now.

Regards.


Robert Zeigler wrote:
 
 This is by-product of the live class reloading, and not related to the  
 instrumentation, per se.
 Two classes in different classloaders are not equal. In this case,  
 you're casting the component object, whose class is in the  
 discardable classloader (which handles page and component classes)  
 to the MyPage class which is in the non-discardable class loader  
 (which handles anything not a page, component, or mixin).  There are  
 two workarounds to your problem.
 1) You code will work as is if you put it into a page or component.  
 In that case, you could try passing the page or component to the  
 service, instead of trying to load the page or component in the  
 service.  Or...
 2) Have your page/pages implement a common interface (the interface  
 class should be stored outside of the page/component/mixin sub- 
 packages). Then cast to your interface, instead of to the actual  
 page.  Personally, I think this is a cleaner solution, anyway (knowing  
 the property you want to set beforehand, but not knowing the actual  
 class/page name until runtime smells like you want an interface,  
 anyway).
 
 Robert
 
 On Jun 2, 2008, at 6/25:18 PM , raulmt wrote:
 

 No, I need to do this in a service... but even in a page, i have the  
 page
 class in a String at runtime, so I can't declare a property and use  
 the
 InjectPage like that

 Regards.


 Robert Zeigler wrote:

 Is this in a component or page class? If so, the answer is:

 @InjectPage
 private MyPage page;
 ...

 page.setSomething();

 Robert

 On Jun 2, 2008, at 6/25:04 PM , raulmt wrote:


 Hi,

 I'm trying to obtain a page from it's name to set a property on it.
 I'm
 trying something like this:

 Component page = componentSource.getPage(MyPage);
 MyPage myPage = (MyPage)page;
 myPage.setSomething();

 This code fails in the cast, despite a

 System.out.println(page.getClass().getName());

 prints the expected page class (com.myapp.pages.MyPage) I assume
 is
 because all the instrumentation T5 does to the pages, but is there a
 way to
 obtain a page from its name and then set a property that the
 original
 class has??

 The only workaround i've found is to call the method setSomething  
 with
 reflection, without casting it to MyPage, but it would be really
 nice not to
 use reflection for this

 Regards.


 Filip S. Adamsen-2 wrote:

 Hi,

 RequestPageCache is an internal service, it's better to use
 ComponentSource instead. It has methods to get a component or  
 page by
 logical name.

 http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/ComponentSource.html

 -Filip

 On 2008-05-05 16:01, Kristian Marinkovic wrote:
 @Inject
 private RequestPageCache pageCache;

 pageCache.get(logicalName)


 g,
 kris







 Shing Hing Man [EMAIL PROTECTED]
 05.05.2008 15:53
 Bitte antworten an
 Tapestry users users@tapestry.apache.org


 An
 tapestry Tapestry [EMAIL PROTECTED]
 Kopie

 Thema
 Tap 5.0.11 : How to get page instance  from page







 Usually, I could use the following to inject a page
 into another  page

 @InjectPage
 private DetailsPage  details;

 How to retrieve an instance of a page if I am given
 the logical name of a page as a String variable ?

 In Tap 4, I would use RequestCycle.getPage(pageName).

 Thanks in advance for any asistance!

 Shing

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



___
 Yahoo! For Good. Give and get cool things for free, reduce waste
 and help
 our planet. Plus find hidden Yahoo! treasure

 http://green.yahoo.com/uk/earth-day/

 -
 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/Tap-5.0.11-%3A-How-to-get-page-instance--from-page-tp17062196p17611843.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


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




 -- 
 View this message in context:
 http://www.nabble.com/Tap-5.0.11-%3A-How-to-get-page-instance--from-page-tp17062196p17612066.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 

Re: Newbie

2008-06-03 Thread Sven Homburg
i have tried to find somthing about tapestry 6 with tapestry search query
wich version of google are using

2008/6/3 Menno Kok [EMAIL PROTECTED]:

 I search tapestry inside google and get many result and read many many of
 them.
 Sven, can you answer my question? I am now afraid with tapestry. Help me to
 be afraid not. I like tapestry a bit and I want to use tapestry.

 Thank you.

 Menno


 - Original Message 
 From: Sven Homburg [EMAIL PROTECTED]
 To: Tapestry users users@tapestry.apache.org
 Sent: Tuesday, June 3, 2008 3:50:13 PM
 Subject: Re: Newbie

 let me know your google query string

 2008/6/3 Menno Kok [EMAIL PROTECTED]:

  Hello men and women,
 
  I saw many google search result about tapestry that maked me nervos. Is
 it
  true that tapetsry 6 would be not compatible with other tapestry
 versions?
  I want to know before I spend many times with learning tapestry.
  Forgive me my bad english, please.
 
  Thank you,
 
  Menno
 
 
  - Original Message 
  From: Menno Kok [EMAIL PROTECTED]
  To: users@tapestry.apache.org
  Sent: Tuesday, June 3, 2008 1:53:29 PM
  Subject: Newbie
 
  Hi,
 
  I have see Tapestry and quite like it. Though some people no like it.
  Is there plans to integrate Tapestry with YUI?
 
  Thanks
 
  Menno
 
 
 
 



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








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


Re: Newbie

2008-06-03 Thread Menno Kok
Mr. Daniel,

You laugh my name and you laugh mine english.
Fuck you bastard.





- Original Message 
From: Daniel Jue [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Tuesday, June 3, 2008 4:11:17 PM
Subject: Re: Newbie

Dear Kok Menno,

Tapestry 6 is perfectly compatible with Tapestry 5, I am using it now.
It's just one class file right now, but I like to imagine that it's
adding heuristic artificial intelligence to my T5 application.  It
makes error 403 pages say I'm sorry Daniel, I can't let you do that.
You can always dream, can't you?
But you seemed to have missed the point, because there is no Tapestry
6.  Tapestry 5 is the final release of Tapestry.  I hope I have
unmaked you nervos. ;-)


On Tue, Jun 3, 2008 at 9:50 AM, Sven Homburg [EMAIL PROTECTED] wrote:
 let me know your google query string

 2008/6/3 Menno Kok [EMAIL PROTECTED]:

 Hello men and women,

 I saw many google search result about tapestry that maked me nervos. Is it
 true that tapetsry 6 would be not compatible with other tapestry versions?
 I want to know before I spend many times with learning tapestry.
 Forgive me my bad english, please.

 Thank you,

 Menno


 - Original Message 
 From: Menno Kok [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Sent: Tuesday, June 3, 2008 1:53:29 PM
 Subject: Newbie

 Hi,

 I have see Tapestry and quite like it. Though some people no like it.
 Is there plans to integrate Tapestry with YUI?

 Thanks

 Menno







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


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


  

RE: Newbie

2008-06-03 Thread Blower, Andy
Menno,

No one knows whether Tapestry 6 will be compatible with Tapestry 5 because it 
doesn't exist, and is not even planned. According to Howard Lewis Ship 
(Tapestry creator) he has no plans to make Tapestry 6, and that's all anyone 
has to go on.

The way I have of looking at the major version incompatibilities of Tapestry 
3-4-5 is that it driven by improvements and is much better than 'nearly 
compatible' versions touted as backward compatible (quite common) because you 
know what you're getting into beforehand.

My advice is to use Tapestry 5 if it suits your needs better than anything 
else, and not if some other framework is more suited to you and your needs.

Cheers,

Andy.
(new to Tapestry myself - 2 months now)

 -Original Message-
 From: Menno Kok [mailto:[EMAIL PROTECTED]
 Sent: 03 June 2008 15:11
 To: Tapestry users
 Subject: Re: Newbie

 I search tapestry inside google and get many result and read many
 many of them.
 Sven, can you answer my question? I am now afraid with tapestry. Help
 me to be afraid not. I like tapestry a bit and I want to use tapestry.

 Thank you.

 Menno


 - Original Message 
 From: Sven Homburg [EMAIL PROTECTED]
 To: Tapestry users users@tapestry.apache.org
 Sent: Tuesday, June 3, 2008 3:50:13 PM
 Subject: Re: Newbie

 let me know your google query string

 2008/6/3 Menno Kok [EMAIL PROTECTED]:

  Hello men and women,
 
  I saw many google search result about tapestry that maked me nervos.
 Is it
  true that tapetsry 6 would be not compatible with other tapestry
 versions?
  I want to know before I spend many times with learning tapestry.
  Forgive me my bad english, please.
 
  Thank you,
 
  Menno
 
 
  - Original Message 
  From: Menno Kok [EMAIL PROTECTED]
  To: users@tapestry.apache.org
  Sent: Tuesday, June 3, 2008 1:53:29 PM
  Subject: Newbie
 
  Hi,
 
  I have see Tapestry and quite like it. Though some people no like it.
  Is there plans to integrate Tapestry with YUI?
 
  Thanks
 
  Menno
 
 
 
 



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




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



Re: Newbie

2008-06-03 Thread Richard Clark
Hello Menno,

I have been using Tapestry for over three years,  starting with
Tapestry 3.  I am still maintaining  one application on Tapestry 3 and
a few applications on Tapestry 4;  I am also starting development with
Tapestry 5.  Most of what I learned with one version applies to the
next.

 I understand your worry that a future Tapestry 6  might be
incompatible with Tapestry 5  since, in the past, each new version of
Tapestry has not been compatible with the previous version. Howard
designed Tapestry 5  so he (and others) can update it without breaking
backward compatibility.  Some parts of Tapestry are now considered
private,  and can change in incompatible ways, while the public
interfaces  will stay the same even as Tapestry grows and improves.

 In my opinion, Tapestry is well worth learning and will help you
write high-quality Web applications very quickly.  it is different
from anything else out there, which means that some people will not
like it, but in my experience is often the best tool for the job.

Regards,

...Richard

 P.S. I have used YUI with both Tapestry 3 and 4.  Tapestry's  design
makes it easy to add a library such as YUI  to your application.

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



Re: Acegi and tapestry login page

2008-06-03 Thread Josh Canfield
 I made my own login.tml and integrate acegi for my security.But when I run
 the login page in IE,there is a error icon after username and password filed
 even the first time to access it.

There are error images injected after all of the tapestry form
elements. They are hidden using a class defined in the default
tapestry css file. Is it possible that your page is not getting the
default tapestry css loaded? Look at the generated html to see.


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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



Re: ApplicationState not stored during onSuccess?

2008-06-03 Thread Josh Canfield
Hi Martin,

Are you sure that your login method is getting called from onSuccess?
Have you stepped through with the debugger? I'm pretty sure that
Tapestry doesn't roll back your ASO's at any time.

Josh

On Tue, Jun 3, 2008 at 5:50 AM, Martin Kersten
[EMAIL PROTECTED] wrote:
 Hi there,

   I just found a little bit of a hack. OnSuccess I just return
 an action-link. So I guess that Tapestry just thinks the form
 processing failed and 'rolled back' the application state changes.

 So the question is again, what is wrong?


 Cheers,

 Martin (Kersten)

 -Ursprüngliche Nachricht-
 Von: Martin Kersten [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 3. Juni 2008 14:21
 An: Tapestry users
 Betreff: ApplicationState not stored during onSuccess?

 Hi,

  I have a simple login status. When doing a login, the user -object is stored 
 using login.setUser(user). Two places where this can happen one works 
 (onAction) and one it doesn't work (onSuccess). First is triggered by 
 action-link using a context and second is triggered by an ordinary form. Both 
 logins are correctly performed and loginStatus is correctly Updated, but the 
 later one (onSuccess) the application state object is not remembered 
 (updated) correctly.

 What is wrong? (Using tapestry 5.11)


 Following code-snippets I have:

 ...
 @ApplicationState
 private LoginStatus loginStatus;

 ...

 private void login(String name, String password) {
   User user = userService.login(name, password);
   loginStatus.setUser(user);
 }

 ...
 public boolean onAction(String name, String password) {
   login(name, password); //works well
   return true;
 }

 ...
 public Object onSuccess() {
   if(name != null  password != null)
  //results in correct login but loginStatus change is
  //not remembered afterwards
  login(name, password);
  return true;
 }


 Thanks for any hint or help,

 Martin (Kersten)

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





-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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



Re: the image in css file

2008-06-03 Thread Josh Canfield
 I can use the image file in tml file using the
 ${asset:context:/images/.gif} ,but how to use the image file in css
 file.

Your CSS file is not being run through the template parser so you
can't use template syntax.

Here are a few options:

You could define the style in your page. If you need it in a few
places you could make it a component. That has the downside of adding
page weight because it's inline with your html.

I haven't tried this, but you could try making your CSS into a .tml
file. Adding the @Meta annotation to change the returned content type:
@Meta(value = {tapestry.response-content-type=text/css})
Your .tml needs to be valid XML so you'll have to wrap the whole thing
in a t:container. The downside is this might be a waste of time and
not work... and it adds a little overhead.

If you're deploying your app to the root context (and thus don't have
to worry about changing contexts) then you can just use absolute paths
in your css (that's how I deploy...)


Josh


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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



Re: ApplicationState not stored during onSuccess?

2008-06-03 Thread Marcus
Hi Martin,

Maybe your problem is in the LoginStatus code, can you post it?

Marcus


Re: the image in css file

2008-06-03 Thread Filip S. Adamsen
Another option is to use relative URLs for images in your CSS file. 
That's how I deploy.


-Filip

On 2008-06-03 18:45, Josh Canfield wrote:

I can use the image file in tml file using the
${asset:context:/images/.gif} ,but how to use the image file in css
file.


Your CSS file is not being run through the template parser so you
can't use template syntax.

Here are a few options:

You could define the style in your page. If you need it in a few
places you could make it a component. That has the downside of adding
page weight because it's inline with your html.

I haven't tried this, but you could try making your CSS into a .tml
file. Adding the @Meta annotation to change the returned content type:
@Meta(value = {tapestry.response-content-type=text/css})
Your .tml needs to be valid XML so you'll have to wrap the whole thing
in a t:container. The downside is this might be a waste of time and
not work... and it adds a little overhead.

If you're deploying your app to the root context (and thus don't have
to worry about changing contexts) then you can just use absolute paths
in your css (that's how I deploy...)


Josh




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



Re: Extending BeanEditor, add model accessor

2008-06-03 Thread Howard Lewis Ship
Add an issue to JIRA.

On Mon, Jun 2, 2008 at 6:01 PM, Lawrence Blanchette
[EMAIL PROTECTED] wrote:

 I'd like to extend BeanEditor to enhance some rendering behavior.
 Unfortunately the _model property is not exposed and that has the info I
 need.  Specifically I need # of properties in the model.  BeanDisplay does
 have access to this via getPropertyModel().  Can we get a similar accessor
 on BeanEditor (symmetry)?

 I'm writing a Bean editor with layout feature. Specify # of columns and you
 get a balanced table of properties for edit/display.  I've been able to
 achieve this entirely thru extension of core Bean components except for this
 one spot.

 Thanks
 --
 View this message in context: 
 http://www.nabble.com/Extending-BeanEditor%2C-add-model-accessor-tp17614049p17614049.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]





-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: Newbie

2008-06-03 Thread Adam Zimowski
Emanuel heheh This is a poor impersination of a non-native English
speaker. It's still very easy to pick out your style, and figure out
it's you. Only you provoke people with classic trollish attacks such
as:

replier's name, can you [...]?
replier's name, why [...]?

so seeing this:

Sven, can you answer my question?

we all know you came right back since your old gmail account was disabled.


On Tue, Jun 3, 2008 at 11:08 AM, Richard Clark [EMAIL PROTECTED] wrote:
 Hello Menno,

 I have been using Tapestry for over three years,  starting with
 Tapestry 3.  I am still maintaining  one application on Tapestry 3 and
 a few applications on Tapestry 4;  I am also starting development with
 Tapestry 5.  Most of what I learned with one version applies to the
 next.

  I understand your worry that a future Tapestry 6  might be
 incompatible with Tapestry 5  since, in the past, each new version of
 Tapestry has not been compatible with the previous version. Howard
 designed Tapestry 5  so he (and others) can update it without breaking
 backward compatibility.  Some parts of Tapestry are now considered
 private,  and can change in incompatible ways, while the public
 interfaces  will stay the same even as Tapestry grows and improves.

  In my opinion, Tapestry is well worth learning and will help you
 write high-quality Web applications very quickly.  it is different
 from anything else out there, which means that some people will not
 like it, but in my experience is often the best tool for the job.

 Regards,

 ...Richard

  P.S. I have used YUI with both Tapestry 3 and 4.  Tapestry's  design
 makes it easy to add a library such as YUI  to your application.

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



login page error (T5Acegi)

2008-06-03 Thread 滕训华
Login.tml

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;

 

head

link href=${asset:context:css/style.css}  rel=stylesheet
type=text/css /

titleYOUR TITLE HERE!/title

 

/head

 

body scroll=no

 

div class=header

  div class=header_interiorimg src=${asset:context:/images/logo.gif}
alt=Logo width=44 height=44 style=float:left; margin-right:10px; / 

  h1 class=titleCall Center for JILIN Tax Revenue /h1

  /div

/div

 

div class=header_shadow /div

 

  div class=content_interior

 

 

div class=login_table

br /

br/

br/

t:form t:id=loginForm

   t:errors/

   table

   tr

  tdUserName:/td

  tdinput t:type=TextField type=text t:id=j_username
//td

   /tr

   tr

  tdPassword:/td

  tdinput t:type=PasswordField  type=password
t:id=j_password //td

   /tr

   

   tr

  td/td

  tdinput type=submit t:type=submit t:id=loginButton
//td

   /tr

   /table





/t:form

  /div

/div

div class=footerdiv class=footer-inner

 



br clear=all /

hr width=100%  noshade=noshade  style=border-top:1px solid #FF;
border-bottom: none; margin-bottom:5px; /

div style=text-align:center;Copyright ? 2008 YourName 

  !-- Thanks Again -- /div

/divbr clear=all //div

/body

/html

 

 

login.java

 

package com.callcenter.web.pages;

 

 

import org.apache.tapestry.services.RequestGlobals;

import org.apache.tapestry.ioc.annotations.*;

import org.apache.tapestry.services.Response;

import
org.springframework.security.providers.UsernamePasswordAuthenticationToken;

import org.springframework.security.Authentication;

import org.springframework.security.AuthenticationManager;

import org.springframework.security.AuthenticationException;

import org.springframework.security.context.SecurityContextHolder;

import org.springframework.security.ui.savedrequest.SavedRequest;

import org.springframework.security.ui.AbstractProcessingFilter;

 

import java.io.IOException;

 

 

public class Login {



private String j_username;

private String j_password;

public String getJ_username() {

   return j_username;

}

public void setJ_username(String j_username) {

   this.j_username = j_username;

}

public String getJ_password() {

   return j_password;

}

public void setJ_password(String j_password) {

   this.j_password = j_password;

}





/*

 * Process the event from login button

 */

@Inject 

private RequestGlobals requestGlobals;



@Inject 

private AuthenticationManager authenticationManager;


Object onSelectedFromLoginButton() throws IOException{  





   

 
//requestGlobals.getResponse().sendRedirect(j_spring_security_check?j_usern
ame=+j_username+j_password=+j_password);

   

   UsernamePasswordAuthenticationToken authRequest=new
UsernamePasswordAuthenticationToken(getJ_username(),getJ_password());

   

   Authentication authResult;

   

   /**

* 

*/

   try{

   authResult=authenticationManager.authenticate(authRequest);

   }

   catch(final AuthenticationException failed){

   return null;

   }

   

   SecurityContextHolder.getContext().setAuthentication(authResult);

   

   SavedRequest
savedRequest=(SavedRequest)requestGlobals.getRequest().getSession(false).get
Attribute(AbstractProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_KEY);

   

   if(savedRequest!=null){

 
requestGlobals.getResponse().sendRedirect(savedRequest.getFullRequestUrl());

   return null;

   }

   else{

   return /login;

   }

   

   

}



}

 

 

Web.xml

?xml version=1.0 encoding=UTF-8?

web-app id=WebApp_ID version=2.4
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

display-name

CallCenter

/display-name   

 

context-param

   param-namecontextConfigLocation/param-name

   param-value/WEB-INF/applicationContext.xml
/WEB-INF/applicationContext-security.xml/param-value

/context-param

 

context-param

   param-nametapestry.app-package/param-name

   param-valuecom.callcenter.web/param-value

/context-param

 

 

  !-- Integration with acegi start --





filter 

filter-nameAcegiFilterChainProxy/filter-name 

 
filter-classorg.springframework.security.util.FilterToBeanProxy/filter-cl
ass 

init-param 

   param-nametargetClass/param-name 

 
param-valueorg.springframework.security.util.FilterChainProxy/param-value
 

/init-param 

/filter 

 

filter-mapping