[4.1] AJAX Substituting a component
Hi, I have a BasePage with a template which declares a component like this: first.html: div jwcid=firstHello World /div Now I want a DirectLink thats update the content of the first.jwc and substitute it with second.jwc: second.html: div jwcid=secondByeBye /div (Imagine that the real components contain a complex template like the short texts described here in the static way. Perhaps with further encapsulated components...) http://tapestry.apache.org/tapestry4.1/ajax/index.html gives information how to reload informations in a tapestry component like Insert, but I can not derive from that how to substitute a self-made component with another. The given example could be dissolved by an insert-component, but what happens, if I want to fully delete a complex component as the part of the actual dom and fully insert the substitute there? As like Prototypes AJAX.Update(id of node,...) I would be very happy, to get a tip or link to get information about that. I could imagine that I have to declare a further component that encapsulate the component, which should be substitute (like first in example), but then I do not know how to substitute the inner component. Regards, Michael Wölm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T4.1] Project Website Ajax Development Basics
Hi, I have tested the Ajax Development Basics on http://tapestry.apache.org/tapestry4.1/ajax/basics.html and it do not work with the code there, but I have tinkered a little bit (too much ^^). First, the listener method may not have the same label then the fieldlabel (it will cause a type mismatch failure), so I have renamed it to listener:resetTime and the field Date needs a initial value.If it is null, the component isn't displayed and reloaded with new values. If I do so, it works. Regards, Michael Wölm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: path to referenced files
I use path=context:/images/logo.jpg to display the office emblem, for example. But I use T4, doesn't know if T5 has is still... That has the small adavantage that renaming the application doesn't force a change to such links. Regards, Michael Wölm [EMAIL PROTECTED] schrieb: yourWebApp/images -Original Message- From: Angelo Chen [mailto:[EMAIL PROTECTED] Sent: Friday, August 24, 2007 1:07 PM To: users@tapestry.apache.org Subject: path to referenced files Hi, If I have something like following in the html, which directory should i put so that it can be picked up during run time: /images/logo.jpg Thanks, A.C. -- View this message in context: http://www.nabble.com/path-to-referenced-files-tf4322970.html# a12310389 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T4.1] Two beginner questions (Pageconfig / AJAX)
Hi guys, after a simple basic test application, I decided to use Tapestry now for a real-used office application. I have one small and one general bigger question, hoping you can help me. The first question is about configurating directory informations for pages. In the .application-file I can setup where to search for the .class files by default. But what is with the pages itself? I can declare each page or component seperately and his directory-path, but no default. Especially if I have my pages in /WEB-INF/pages and my components in /WEB-INF/comps, is it possible to set these paths as default? The second question is about AJAX. I have used the AJAX-concept much in PHP - JS[ with Prototype(/Behaviour)]. The tapestry-dev-page gives information how to change an Insertion-Field via AJAX. But if I want to change a complete div-component by link, that could especially a seperate tapestry-component (Like Ajax.Update() in Prototype.js). Is this possible with tapestry itself or do I need the tacos-extension? Is there an example source available how to do this or could anybody give me some initial How-To-information? Example: If a user chooses in selection-field account mmustermann, the tapestry-component accountdata should reload with all informations of mmustermann. Thanks + Regards, Michael Wölm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to clear the page cach
I think it's that: http://tapestry.apache.org/tapestry4/UsersGuide/configuration.html#configuration.search-path at: org.apache.tapestry.disable-caching (set in application-name.application) robinson wang schrieb: when i click a link ,if the session is invalid ,it will return to the page of login,but when i login again, click then link ,it still return to the page of login. when i restart the server , it's ok,i think it's caught by the page in the pool,how can i clear the pooled page? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: How to do this with tapestry 4?
Or you encapsulate all of the components with a own if statements which validates if the component was chosen. -Ursprüngliche Nachricht- Von: 张启迪 [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 29. September 2006 16:28 An: Tapestry users Betreff: How to do this with tapestry 4? For example, there is a page named PA, which contains 10 components (BaseComponent). We name these components as C1,C2,...,C10. Let's assume that C1 prints C1,C2 prints C2,C3 prints C3, etc. I have another page named PB which contains a form. Users can input a string which includes a serial of component names, such as C1-C2-C3-C2-C3-C2-C2-C3. Requirements: If a user input a string in page PB, then jump to page PA and render PA with those components. For example, if the user input C1-C2-C3-C2-C3-C2-C2-C3, then PA should dynamically render 8 components and the result html text is C1-C2-C3-C2-C3-C2-C2-C3 too. Thanks. Qidi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WG: Question: Can not get access to object fields (Null Pointer Exception) pls pls help!
Hi, Sadly, nobody have helped me with my problem. I dont know why. Am I too noob or is my question incomprehensible? I would be pleased, if anybody could give me an advice for my problem. Greettings from Germany, Michael Wölm Original message is under this. -Ursprüngliche Nachricht- Von: m-woelm [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 10. September 2006 16:13 An: 'Tapestry users' Betreff: Question: Can not get access to object fields (Null Pointer Exception) Hi, I hope anybody could explain me why I get a Null Pointer Exception, if I want to get access to a field of an object. My method is similar to the eshop-project of the book Enjoying web dev with Tapestry. I tried to change the Listener-method onLogin as follows: public void onLogin(IRequestCycle cycle) { try { User user = Users.getKnownUsers().getUser(email,password); getUser().copyFrom(user); if (user.getState().equals(admin)) cycle.activate(Admin_Konsole); else cycle.activate(User_Konsole); } catch (AuthenticationException e) { ValidationDelegate delegate = getDelegate(); delegate.setFormComponent(null); delegate.record(Login failed, null); } } Now I get an exception at point (user.getState().equals(admin)). But why? user was set to the login-user two lines before? Why I cant get the field: private String state which I have set in User.class: private String state; public String getState() { return this.state; } Thx ahead! Michael Wölm mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Public Key: http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc href=http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]