Re: submitting a wiki?
Hi Angelo, I haven't found a way to upload an article, but if you just mean entering the text, that should be OK since you have an account: login and edit http://wiki.apache.org/tapestry/Tapestry5HowTos (click the 'edit' link, top left). Next, add the article name where it belongs. For example, when writing about a new component, copy one of the existing component descriptions, and change the text and name. Preview your changes, and if you are happy, describe the changes and submit it. Next, click the link you've just created and create/edit the new page. Two tips: - Every camel-cased word (e.g. MyJavaClass) becomes a page link. If you don't want that, use !MyJavaClass - When adding source code, do it like this {{{ my source code }}} Good luck, I'm curious what you will be adding! Erik On 9/13/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > > Hi I'd like to submit a wiki article, where to go? i have setup my > account, > can somebody pointing me to a url where i can upload that ? it's about T5. > -- > View this message in context: > http://www.nabble.com/submitting-a-wiki--tf4433692.html#a12649017 > 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: How to synchronize a service
Hi If you are refering to a "service" as a hivemind service, then you can hava look on the service modles which are threaded, pooled, primitive and singleton. Singleton service model will ensure that only one instance of service exists. After you know that you can synchronize part of the code which is responsible for checking and creating directories. But I guess better approach would be to put non-multithreaded part of your functionality to the singleton service and have other threaded services reading data prepared by singleton service. Renat On 12/09/2007, Manuel Sugawara <[EMAIL PROTECTED]> wrote: > Hi all, I'm using tapestry 4.0 and have a service that what roughly > does is create a PDF file in the tmp dir if it does not exists. If the > file exists or after its creation the service returns its contents to > the client. Now I'm worried about synchronization issues in this > code. Mi first idea was synchronize the method that looks for the file > and creates one if none exists, but this will not work if multiple > instances of the service are concurrently running. So, can I safely > assume that there is only one instance of the service running?, I > think not but wanted to be sure. If there may be many instances of the > service running, is Ok to synchronize on some global object? (global > as in > Any pointer to the docs are wellcome!. Thanks in advance. > > Regards, > Manuel. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Best regards, Renat Zubairov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
submitting a wiki?
Hi I'd like to submit a wiki article, where to go? i have setup my account, can somebody pointing me to a url where i can upload that ? it's about T5. -- View this message in context: http://www.nabble.com/submitting-a-wiki--tf4433692.html#a12649017 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: T3: DateTimePicker
Hmm, looks like you are trying to edit a value of type DateTimePicker! is used to define properties of your Java class. You are presumably trying to edit a date, so something like: .page All bindings given above are marked as required in DateTimePicker.jwc. .java public abstract Date getOffnHearDate(); public abstract void setOffnHearDate(Date offnHearDate); Cheers, Nick. Nazmul Bhuiyan wrote: Please help me finding what I'm missing here? I'm getting the following error: org.apache.tapestry.ApplicationRuntimeException Unable to convert 'myws:DateTimePicker' to a property type. location: context:/InfringementEdit.page, line 39, column 74 org.apache.tapestry.ApplicationRuntimeException Could not load class myws:DateTimePicker from WebappClassLoader delegate: false repositories: /WEB-INF/classes/ --> Parent Classloader: [EMAIL PROTECTED] : myws:DateTimePicker .application .page .java public abstract DateTimePicker getOffnHearDate(); public abstract void setOffnHearDate(DateTimePicker offnHearDate); Thanks Naz Nick Westgate wrote: Most readers here won't have a T3 project handy, and even fewer will have used this component (I haven't). Please define "didn't work". Cheers, Nick. Nazmul Bhuiyan wrote: I've downloaded the myworkspace-0.2.jar from http://myworkspace.sourceforge.net/component-library.html. I've tried to use this component as DatePicker but didn't work. I must have missed something basic. Can some one please some example how to use this component? For example: in the html templet, .page and the java? Thanks Naz - 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: T3: DateTimePicker
Please help me finding what I'm missing here? I'm getting the following error: org.apache.tapestry.ApplicationRuntimeException Unable to convert 'myws:DateTimePicker' to a property type. location: context:/InfringementEdit.page, line 39, column 74 org.apache.tapestry.ApplicationRuntimeException Could not load class myws:DateTimePicker from WebappClassLoader delegate: false repositories: /WEB-INF/classes/ --> Parent Classloader: [EMAIL PROTECTED] : myws:DateTimePicker .application .page .java public abstract DateTimePicker getOffnHearDate(); public abstract void setOffnHearDate(DateTimePicker offnHearDate); Thanks Naz Nick Westgate wrote: > > Most readers here won't have a T3 project handy, > and even fewer will have used this component (I haven't). > > Please define "didn't work". > > Cheers, > Nick. > > > Nazmul Bhuiyan wrote: >> I've downloaded the myworkspace-0.2.jar from >> http://myworkspace.sourceforge.net/component-library.html. >> I've tried to use this component as DatePicker but didn't work. I must >> have >> missed something basic. >> Can some one please some example how to use this component? >> For example: in the html templet, .page and the java? >> Thanks >> Naz > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/T3%3A-DateTimePicker-tf4344767.html#a12648572 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Error in 5.0.5 palette.js
There is a JIRA: https://issues.apache.org/jira/browse/TAPESTRY-1745 Cheers, Nick. Howard Lewis Ship wrote: Please add this as an issue in JIRA if you have not done so already. On 8/28/07, Daniel Jue <[EMAIL PROTECTED]> wrote: When using the Palette component, I am getting a Javascript error in IE, Line: 183 Char: 1 Error: Expected identifier, string or number Code: 0 reorderSelected : function(movers, before) { movers.each (function(option) { this.selected.add(option, before); }.bind(this)); this.updateHidden(); this.updateButtons(); }, }; Line 183 is the line after the }; I think the extra comma after the end of the reorderSelected code block is to blame. For me it was causing an error in IE6 which prevented me from using the select button in the Palette. I removed the "extra" comma, but then when I highlight some items and click the select button, I get a Type Mismatch error on the comma at the end of this function: moveOption : function(option, to, atEnd) { var before = null; if (!atEnd) { var optionOrder = this.valueToOrderIndex[option.value]; var candidate = $A(to.options).find(function (o) { return this.valueToOrderIndex[o.value] > optionOrder; }.bind(this)); if (candidate) before = candidate; } to.add(option, before); }, Is the T5 Palette working fine for anyone using IE? The IE Version I am testing is 6.0.2900.2180.xpsp_sp2_gdr.070227-2254 Everything works fine in Firefox, of course. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Error in 5.0.5 palette.js
I have not added a JIRA, but here is the EnhancedPalette I whipped up using other people's code. =) http://wiki.apache.org/tapestry/Tapestry5EnhancedPalette?action=show Daniel Jue On 9/12/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: > Please add this as an issue in JIRA if you have not done so already. > > On 8/28/07, Daniel Jue <[EMAIL PROTECTED]> wrote: > > > > When using the Palette component, I am getting a Javascript error in IE, > > > > Line: 183 > > Char: 1 > > Error: Expected identifier, string or number > > Code: 0 > > > > > > reorderSelected : function(movers, before) { > > movers.each (function(option) { this.selected.add(option, before); > > }.bind(this)); > > > > this.updateHidden(); > > this.updateButtons(); > > }, > > }; > > > > Line 183 is the line after the }; > > > > I think the extra comma after the end of the reorderSelected code block is > > to blame. > > For me it was causing an error in IE6 which prevented me from using the > > select button in the Palette. > > > > I removed the "extra" comma, but then when I highlight some items and > > click > > the select button, I get a Type Mismatch error on the comma at the end of > > this function: > > > > moveOption : function(option, to, atEnd) { > > var before = null; > > > > if (!atEnd) { > > var optionOrder = this.valueToOrderIndex[option.value]; > > var candidate = $A(to.options).find(function (o) { > > return this.valueToOrderIndex[o.value] > optionOrder; > > }.bind(this)); > > if (candidate) before = candidate; > > } > > > > to.add(option, before); > > }, > > > > Is the T5 Palette working fine for anyone using IE? > > The IE Version I am testing is > > 6.0.2900.2180.xpsp_sp2_gdr.070227-2254 > > > > > > Everything works fine in Firefox, of course. > > > > > > -- > Howard M. Lewis Ship > Partner and Senior Architect at Feature50 > > Creator Apache Tapestry and Apache HiveMind > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wiki profile creation
ASF is the Apache Software Foundation. You can find the name of the president here http://www.apache.org/foundation/ Angelo Chen wrote: Hi, I'd like to register in the Tapestrywiki so I can contribute something, but failed to setup my anncount, it's asking:Question: President of ASF = ? forgive my ignorance, what's ASF? and who is the president? I googled the word ASF, it means so many things:) A.C. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wiki profile creation
http://www.apache.org/ On 9/13/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi, > I'd like to register in the Tapestrywiki so I can contribute something, but > failed to setup my anncount, it's asking:Question: President of ASF = ? > forgive my ignorance, what's ASF? and who is the president? I googled the > word ASF, it means so many things:) > A.C. > -- > View this message in context: > http://www.nabble.com/wiki-profile-creation-tf4432986.html#a12647084 > 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]
wiki profile creation
Hi, I'd like to register in the Tapestrywiki so I can contribute something, but failed to setup my anncount, it's asking:Question: President of ASF = ? forgive my ignorance, what's ASF? and who is the president? I googled the word ASF, it means so many things:) A.C. -- View this message in context: http://www.nabble.com/wiki-profile-creation-tf4432986.html#a12647084 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Error in 5.0.5 palette.js
Please add this as an issue in JIRA if you have not done so already. On 8/28/07, Daniel Jue <[EMAIL PROTECTED]> wrote: > > When using the Palette component, I am getting a Javascript error in IE, > > Line: 183 > Char: 1 > Error: Expected identifier, string or number > Code: 0 > > > reorderSelected : function(movers, before) { > movers.each (function(option) { this.selected.add(option, before); > }.bind(this)); > > this.updateHidden(); > this.updateButtons(); > }, > }; > > Line 183 is the line after the }; > > I think the extra comma after the end of the reorderSelected code block is > to blame. > For me it was causing an error in IE6 which prevented me from using the > select button in the Palette. > > I removed the "extra" comma, but then when I highlight some items and > click > the select button, I get a Type Mismatch error on the comma at the end of > this function: > > moveOption : function(option, to, atEnd) { > var before = null; > > if (!atEnd) { > var optionOrder = this.valueToOrderIndex[option.value]; > var candidate = $A(to.options).find(function (o) { > return this.valueToOrderIndex[o.value] > optionOrder; > }.bind(this)); > if (candidate) before = candidate; > } > > to.add(option, before); > }, > > Is the T5 Palette working fine for anyone using IE? > The IE Version I am testing is > 6.0.2900.2180.xpsp_sp2_gdr.070227-2254 > > > Everything works fine in Firefox, of course. > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
Re: T5: @Parameter writes into the field without using the setter method?
That's not how parameters work. The access to the field, both read and write, is "enhanced" by Tapestry. Updating the field fires off some behavior to push the new value, through the binding object, into the bound property of the component's container. Likewise, reading a parameter field will fire off the behavior related to reading the property value via the binding. There's also a lot going on in terms of caching the value (while rendering, or if the binding is invariant) and clearing the value out at the end of the request (to get rid of dangling references, etc.). On 9/8/07, Marcus Schmidke <[EMAIL PROTECTED]> wrote: > > Hello, > > I've written a component which has a parameter field marked as > "@Parameter". This works fine, but if I try to do some other work in > the setter method for this parameter, I can see that it isn't called. > > Trying to put @Parameter annotation on the method fails because it's a > field annotation. > > Shouldn't, if present, the setter be used instead of directly writing > into the field? > > Marcus. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
Re: Revisit T5 / OC4J (Oracle) 10.1.3 - No root element has been defined.
It comes down to whether the container fulfills its contract in terms of the APIs used to locate resources and check for changes (based on date time modified). Jetty is very compliant in this area, so it works easily. I've never used OC4J so I can't say what the issue is off hand. On 9/11/07, Jan Vissers <[EMAIL PROTECTED]> wrote: > > Does this mean that the 'hot' reloading feature of T5 will be unusable in > OC4J Is this feature working on any other container that Jetty? > > > > See the Tomcat notes; it has a similar issue. > > > > On 9/11/07, Jan Vissers <[EMAIL PROTECTED]> wrote: > >> > >> On a different note. On OC4J this > >> > >> http://localhost:/tutorial1/ > >> > >> doesn't work. > >> > >> This: > >> > >> http://localhost:/tutorial1/start > >> > >> however does. > >> > >> -J. > >> > >> > >> > Sure - here it is: > >> > > >> > > >> > jar tf tapestry-tutorial1.war > >> > > >> > META-INF/MANIFEST.MF > >> > WEB-INF/GameOver.html > >> > WEB-INF/Guess.html > >> > WEB-INF/classes/org/apache/tapestry/tutorial/pages/address/ > >> > WEB-INF/classes/org/apache/tapestry/tutorial/services/AppModule.class > >> > > >> > WEB-INF/classes/org/apache/tapestry/tutorial/pages/address/CreateAddress.class > >> > > WEB-INF/classes/org/apache/tapestry/tutorial/services/AppModule$1.class > >> > WEB-INF/lib/log4j-1.2.9.jar > >> > WEB-INF/Start.html > >> > WEB-INF/classes/org/apache/tapestry/tutorial/pages/GameOver.class > >> > WEB-INF/classes/org/apache/tapestry/ > >> > WEB-INF/classes/org/apache/tapestry/tutorial/pages/Guess.class > >> > WEB-INF/classes/org/ > >> > WEB-INF/classes/ > >> > WEB-INF/classes/log4j.properties > >> > WEB-INF/lib/commons-codec-1.3.jar > >> > WEB-INF/classes/org/apache/tapestry/tutorial/pages/ > >> > WEB-INF/classes/org/apache/tapestry/tutorial/data/Honorific.class > >> > WEB-INF/lib/commons-logging-1.0.4.jar > >> > WEB-INF/classes/org/apache/tapestry/tutorial/services/ > >> > WEB-INF/web.xml > >> > WEB-INF/lib/javassist-3.4.ga.jar > >> > favicon.ico > >> > WEB-INF/classes/org/apache/tapestry/tutorial/pages/Start.class > >> > WEB-INF/address/CreateAddess.html > >> > WEB-INF/classes/org/apache/tapestry/tutorial/data/Address.class > >> > WEB-INF/classes/org/apache/tapestry/tutorial/ > >> > WEB-INF/lib/tapestry-ioc-5.0.5.jar > >> > WEB-INF/classes/org/apache/ > >> > WEB-INF/lib/tapestry-core-5.0.5.jar > >> > WEB-INF/address/ > >> > WEB-INF/classes/org/apache/tapestry/tutorial/data/ > >> > WEB-INF/ > >> > > >> >> That's really odd, its as if the framework was unable to locate the > >> >> template > >> >> files in WEB-INF. > >> >> > >> >> Could you do a "jar tf" on your WAR file? > >> >> > >> >> On 9/10/07, Jan Vissers <[EMAIL PROTECTED]> wrote: > >> >>> > >> >>> Retrying some stuff on OC4J 10.1.3 and T5. > >> >>> > >> >>> Running into issues going through Tapestry 5 Tutorial #1 (Forms). > >> >>> From 'Start' to 'Create Address' the link returns the following > >> error: > >> >>> > >> >>> No root element has been defined. > >> >>> Stack trace > >> >>> org.apache.tapestry.dom.Document.toMarkup(Document.java:89) > >> >>> org.apache.tapestry.internal.services.MarkupWriterImpl.toMarkup( > >> >>> MarkupWriterImpl.java:51) > >> >>> > >> >>> > >> > org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse > >> >>> (PageResponseRendererImpl.java:75) > >> >>> > >> > org.apache.tapestry.internal.services.PageRenderRequestHandlerImpl.handle( > >> >>> PageRenderRequestHandlerImpl.java:81) > >> >>> org.apache.tapestry.internal.services.PageRenderDispatcher.dispatch > ( > >> >>> PageRenderDispatcher.java:72) > >> >>> org.apache.tapestry.services.TapestryModule$12.service( > >> TapestryModule.java > >> >>> :1066) > >> >>> org.apache.tapestry.tutorial.services.AppModule$1.service( > >> AppModule.java > >> >>> :67) > >> >>> org.apache.tapestry.internal.services.LocalizationFilter.service( > >> >>> LocalizationFilter.java:43) > >> >>> org.apache.tapestry.services.TapestryModule$2.service( > >> TapestryModule.java > >> >>> :657) > >> >>> org.apache.tapestry.internal.services.StaticFilesFilter.service( > >> >>> StaticFilesFilter.java:63) > >> >>> > org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke( > >> >>> CheckForUpdatesFilter.java:97) > >> >>> > org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke( > >> >>> CheckForUpdatesFilter.java:88) > >> >>> org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead( > >> >>> ConcurrentBarrier.java:77) > >> >>> org.apache.tapestry.internal.services.CheckForUpdatesFilter.service > ( > >> >>> CheckForUpdatesFilter.java:110) > >> >>> org.apache.tapestry.services.TapestryModule$11.service( > >> TapestryModule.java > >> >>> :1044) > >> >>> org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java > :135) > >> >>> com.evermind.server.http.ServletRequestDispatcher.invoke( > >> >>> ServletRequestDispatcher.java:623) > >> >>> com.evermind.server.http.ServletRequestDispatcher.forwardInternal( > >> >>> Servle
Re: How to synchronize a service
Manuel Sugawara <[EMAIL PROTECTED]> writes: > So, can I safely assume that there is only one instance of the > service running? No, of course not. For set-object to work there should be an instance for client. Regards, Manuel. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 - Inject an Application State Object into a Service
I usually expose commonly used ASOs through a wrapper service, like CurrentUser for a User ASO. Works quite nice and gives me a place to put various user related methods. -Filip Kevin Menard skrev: Hmm . . . I haven't really gotten my feet wet with T5 yet. Does this mean that it will still only inject into page classes, as is the case with T4? I was hoping with the move to POJOs that you could inject into arbitrary classes, such as services. The ASM is a pain to use. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: replacing the ComponentInstantiatorSource service
I don't know much about CAL ... could this kind of thing be accomplished by extending the ComponentClassEnhancementWorker chain of command? Or is CAL based on the raw Javassist APIs? On 9/12/07, Tom Davies <[EMAIL PROTECTED]> wrote: > > > On 13/09/2007, at 12:00 AM, Howard Lewis Ship wrote: > > > I'd love to know why you want to do this ... it indicates to me > > that there > > needs to be some additional configuration available to CIS to > > support your > > needs. > > > > I don't know if I have a valid use-case, but what I'm doing is > experimenting with integrating Business Object's CAL language with > Java, so a page class from the tutorial app becomes: > > @Cal(workspace = "myworkspace.cws", module = "TDavies.Start") > public class Guess { > @Persist > private int _target; > > void setup(int target) > { > _target = target; > } > > public int getTarget() > { > return _target; > } > > private int _guess; > > public int getGuess() > { > return _guess; > } > > public void setGuess(int guess) > { > _guess = guess; > } > > @Persist > private String _message; > > public String getMessage() > { > return _message; > } > > String onActionFromLink(int guess) > { > _message = getNewMessage(guess, _target); > MaybeValue nextPage = getNextPage(guess,_target); > return nextPage.getValueField(); > } > > @Cal > String getNewMessage(int guess, int target) > { > return null; > } > @Cal > MaybeValue getNextPage(int guess, int target) > { > return null; > } > } > > Where the methods with the @Cal annotations are replaced by Javassist > with calls to CAL functions. I'm not even sure this is useful yet -- > I'm just exploring. > > To do this I needed to be able to apply a Javassist Translator to the > page classes as they were loaded (and javassist.Loader.addTranslator > should be named *setTranslator*!) > > Perhaps there is a better way? > > In any case, ComponentInstantiatorSourceImpl is quite monolithic -- > perhaps some of its components should be injected, e.g. a seperate > Translator, rather than having ComponentInstantiatorSourceImpl > implement Translator. > > Tom > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
Re: T5 - Inject an Application State Object into a Service
In T4, you'd have something like the following to grab a global Cayenne DataContext: public void setDataContext(final ApplicationStateManager asm) { this.dc = (DataContext) asm.get("global-data-context"); } Exposing the name of the ASO and having to do a cast is not nice. I'll have to check out the T5 IoC config to see how things might be better there. The snippet you posted seems to address the problems. -- Kevin On 9/12/07 4:53 PM, in article [EMAIL PROTECTED], "Robert Zeigler" <[EMAIL PROTECTED]> wrote: > Hm... it would certainly be nice if a service could have an ASO > injected into it directly, but that would then mandate a particular > scope to your service. > I personally like the approach of injecting the ASM into the service > and grabbing your ASO's from there. Not familiar with the T4 > ApplicationStateManager service, but the T5 version hasn't been > painful to use at all: > > User u = asm.get(User.class); > u > > It'll create your ASO's for you, too, if they don't exist yet (you > can also check to see if they exist if you want to avoid creating them). > > Anyway, that's definitely the right way for Cesar to go. > > Robert > > On Sep 12, 2007, at 9/121:23 PM , Kevin Menard wrote: > >> Hmm . . . I haven't really gotten my feet wet with T5 yet. Does >> this mean >> that it will still only inject into page classes, as is the case >> with T4? I >> was hoping with the move to POJOs that you could inject into arbitrary >> classes, such as services. The ASM is a pain to use. >> >> -- >> Kevin >> >> >> On 9/12/07 2:09 PM, in article [EMAIL PROTECTED], "Filip S. >> Adamsen" <[EMAIL PROTECTED]> wrote: >> >>> Have a look at the ApplicationStateManager service: >>> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/ >>> apache/tapestry >>> /services/ApplicationStateManager.html >>> >>> -Filip >>> >>> César Lesc skrev: I need to use data stored in an ASO (user information) to process the a requests in a service object, i guess the service object must be in perthread scope, because the ASO stores his data in the session, but the @ApplicationState annotation is not working inside the service. Finally i found the RequestGlobals Service to store and retrieve data in the session inside a service, but i feel that should be a better approach. May be i'm missing something. Thanks in advance César. >>> >>> - >>> 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] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 - Inject an Application State Object into a Service
Hm... it would certainly be nice if a service could have an ASO injected into it directly, but that would then mandate a particular scope to your service. I personally like the approach of injecting the ASM into the service and grabbing your ASO's from there. Not familiar with the T4 ApplicationStateManager service, but the T5 version hasn't been painful to use at all: User u = asm.get(User.class); u It'll create your ASO's for you, too, if they don't exist yet (you can also check to see if they exist if you want to avoid creating them). Anyway, that's definitely the right way for Cesar to go. Robert On Sep 12, 2007, at 9/121:23 PM , Kevin Menard wrote: Hmm . . . I haven't really gotten my feet wet with T5 yet. Does this mean that it will still only inject into page classes, as is the case with T4? I was hoping with the move to POJOs that you could inject into arbitrary classes, such as services. The ASM is a pain to use. -- Kevin On 9/12/07 2:09 PM, in article [EMAIL PROTECTED], "Filip S. Adamsen" <[EMAIL PROTECTED]> wrote: Have a look at the ApplicationStateManager service: http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/ apache/tapestry /services/ApplicationStateManager.html -Filip César Lesc skrev: I need to use data stored in an ASO (user information) to process the a requests in a service object, i guess the service object must be in perthread scope, because the ASO stores his data in the session, but the @ApplicationState annotation is not working inside the service. Finally i found the RequestGlobals Service to store and retrieve data in the session inside a service, but i feel that should be a better approach. May be i'm missing something. Thanks in advance César. - 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]
Re: T5 - Inject an Application State Object into a Service
Well, many of the methods of this service needs the user name (from the ASO) for security constraints, i don't want pollute the service interface with a parameter that is almost a constant (for each user), when can be easily grabbed from the session, and don't have to repeat the code to obtain the ASO in every page that use the service. César. On 9/12/07, lasitha <[EMAIL PROTECTED]> wrote: > > Sorry to ask the obvious, but is there some reason you can't just pass > the ASO into the relevant service method: > > class Page { > @ASO aso; > @Inject service; > void onAction() { >service.doSomethingWith(aso); > } > } > > I'm sure your situation's more complicated - just had to get the > obvious out of the way :) > Cheers. > > On 9/12/07, César Lesc <[EMAIL PROTECTED]> wrote: > > I need to use data stored in an ASO (user information) to process the a > > requests in a service object, i guess the service object must be in > > perthread scope, because the ASO stores his data in the session, but the > > @ApplicationState annotation is not working inside the service. Finally > i > > found the RequestGlobals Service to store and retrieve data in the > session > > inside a service, but i feel that should be a better approach. May be > i'm > > missing something. > > > > Thanks in advance > > > > César. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: T5: FCKEditor Component
Hi Alexander, Im glad you like it! But remember, there will be improvements and changes because this is very early versions of these components. Also, I think there will be a date picker included in T5 in the near future so this one could be obsolete. The fckeditor on the other hand could still be interesting in the future. About the toolbars, you could add your own customConfiguration where you define your own toolbarSet and then select that toolbarSet. I guess you mean that we should add more default toolbarsets to the default configuration, and I think you are right :) Thanks again! /Ted 2007/9/12, Kolesnikov, Alexander GNI <[EMAIL PROTECTED]>: > This is a fabulous component, indeed. I wonder if a few more toolbar > sets could be added to it? The default one is too big, the Basic is, > well, a bit basic:) > > I can suggest this one, it works well for my project: > > FCKConfig.ToolbarSets["Medium"] = [ > > ['Bold','Italic','Underline','-','OrderedList','UnorderedList','-','Text > Color','BGColor','-','Outdent','Indent'], > > ['JustifyLeft','JustifyCenter','JustifyRight','-','Cut','Copy','Paste',' > -','Link'] > ] ; > > Thanks for the great work! I am describing this component (as well as > the DatePicker) in the coming Tapestry 5 book. > > Alexander > > -Original Message- > From: Ted Steen [mailto:[EMAIL PROTECTED] > Sent: 30 March 2007 02:19 > To: Tapestry users; Tapestry development > Subject: T5: FCKEditor Component > > > Hi! > > We made a FCKEditor component for a project and it is available on > Google Code for anyone who is interested. > > http://code.google.com/p/tapestry5-fckeditor/ > > Please do give some feedback. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > CONFIDENTIALITY NOTICE: If you have received this email in error, please > immediately notify the sender by e-mail at the address shown. This email > transmission may contain confidential information. This information is > intended only for the use of the individual(s) or entity to whom it is > intended even if addressed incorrectly. Please delete it from your files if > you are not the intended recipient. Thank you for your compliance. > Copyright 2007 CIGNA > == > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- /ted - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [5.0.6-SNAPSHOT] Bug? isTraceEnabled missing when I switch to slf4j
I ran into this myself; I've updated the docs to explain, but haven't republished. I'm republishing now. Expect updates on the web site in an hour or two. On 9/12/07, Massimo Lusetti <[EMAIL PROTECTED]> wrote: > > On 9/12/07, Christian Koeberl <[EMAIL PROTECTED]> wrote: > > > > followup. Strange thing is - looking at the actuall log4j.Logger - it > > > has an isTraceEnabled, so I'm really unclear as to why this would > > > happen. > > The problem is the log4j lib in the Jetty ext directory - replace it > with > > the newer log4j (1.2.12 or higher) version. > > Or the same in other containers... like Geronimo. > > -- > Massimo > http://meridio.blogspot.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
Re: T5 - Inject an Application State Object into a Service
Hmm . . . I haven't really gotten my feet wet with T5 yet. Does this mean that it will still only inject into page classes, as is the case with T4? I was hoping with the move to POJOs that you could inject into arbitrary classes, such as services. The ASM is a pain to use. -- Kevin On 9/12/07 2:09 PM, in article [EMAIL PROTECTED], "Filip S. Adamsen" <[EMAIL PROTECTED]> wrote: > Have a look at the ApplicationStateManager service: > http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry > /services/ApplicationStateManager.html > > -Filip > > César Lesc skrev: >> I need to use data stored in an ASO (user information) to process the a >> requests in a service object, i guess the service object must be in >> perthread scope, because the ASO stores his data in the session, but the >> @ApplicationState annotation is not working inside the service. Finally i >> found the RequestGlobals Service to store and retrieve data in the session >> inside a service, but i feel that should be a better approach. May be i'm >> missing something. >> >> Thanks in advance >> >> César. >> > > - > 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: T5 - Inject an Application State Object into a Service
Have a look at the ApplicationStateManager service: http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/services/ApplicationStateManager.html -Filip César Lesc skrev: I need to use data stored in an ASO (user information) to process the a requests in a service object, i guess the service object must be in perthread scope, because the ASO stores his data in the session, but the @ApplicationState annotation is not working inside the service. Finally i found the RequestGlobals Service to store and retrieve data in the session inside a service, but i feel that should be a better approach. May be i'm missing something. Thanks in advance César. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 - Inject an Application State Object into a Service
Sorry to ask the obvious, but is there some reason you can't just pass the ASO into the relevant service method: class Page { @ASO aso; @Inject service; void onAction() { service.doSomethingWith(aso); } } I'm sure your situation's more complicated - just had to get the obvious out of the way :) Cheers. On 9/12/07, César Lesc <[EMAIL PROTECTED]> wrote: > I need to use data stored in an ASO (user information) to process the a > requests in a service object, i guess the service object must be in > perthread scope, because the ASO stores his data in the session, but the > @ApplicationState annotation is not working inside the service. Finally i > found the RequestGlobals Service to store and retrieve data in the session > inside a service, but i feel that should be a better approach. May be i'm > missing something. > > Thanks in advance > > César. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to synchronize a service
Hi all, I'm using tapestry 4.0 and have a service that what roughly does is create a PDF file in the tmp dir if it does not exists. If the file exists or after its creation the service returns its contents to the client. Now I'm worried about synchronization issues in this code. Mi first idea was synchronize the method that looks for the file and creates one if none exists, but this will not work if multiple instances of the service are concurrently running. So, can I safely assume that there is only one instance of the service running?, I think not but wanted to be sure. If there may be many instances of the service running, is Ok to synchronize on some global object? (global as in
T5 - Inject an Application State Object into a Service
I need to use data stored in an ASO (user information) to process the a requests in a service object, i guess the service object must be in perthread scope, because the ASO stores his data in the session, but the @ApplicationState annotation is not working inside the service. Finally i found the RequestGlobals Service to store and retrieve data in the session inside a service, but i feel that should be a better approach. May be i'm missing something. Thanks in advance César.
Re: T5: FCKEditor Component
Hello Alexander, when do you plan to publish T5 book? A rough estimate will do. Thanks! 2007/9/12, Kolesnikov, Alexander GNI <[EMAIL PROTECTED]>: > > This is a fabulous component, indeed. I wonder if a few more toolbar > sets could be added to it? The default one is too big, the Basic is, > well, a bit basic:) > > I can suggest this one, it works well for my project: > > FCKConfig.ToolbarSets["Medium"] = [ > > ['Bold','Italic','Underline','-','OrderedList','UnorderedList','-','Text > Color','BGColor','-','Outdent','Indent'], > > ['JustifyLeft','JustifyCenter','JustifyRight','-','Cut','Copy','Paste',' > -','Link'] > ] ; > > Thanks for the great work! I am describing this component (as well as > the DatePicker) in the coming Tapestry 5 book. > > Alexander > > -Original Message- > From: Ted Steen [mailto:[EMAIL PROTECTED] > Sent: 30 March 2007 02:19 > To: Tapestry users; Tapestry development > Subject: T5: FCKEditor Component > > > Hi! > > We made a FCKEditor component for a project and it is available on > Google Code for anyone who is interested. > > http://code.google.com/p/tapestry5-fckeditor/ > > Please do give some feedback. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- > CONFIDENTIALITY NOTICE: If you have received this email in error, please > immediately notify the sender by e-mail at the address shown. This email > transmission may contain confidential information. This information is > intended only for the use of the individual(s) or entity to whom it is > intended even if addressed incorrectly. Please delete it from your files if > you are not the intended recipient. Thank you for your > compliance. Copyright 2007 CIGNA > > == > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: [5.0.6-SNAPSHOT] Bug? isTraceEnabled missing when I switch to slf4j
On 9/12/07, Christian Koeberl <[EMAIL PROTECTED]> wrote: > > followup. Strange thing is - looking at the actuall log4j.Logger - it > > has an isTraceEnabled, so I'm really unclear as to why this would > > happen. > The problem is the log4j lib in the Jetty ext directory - replace it with > the newer log4j (1.2.12 or higher) version. Or the same in other containers... like Geronimo. -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [info] Tapestry >= 4.1.2 memory issues potentially fixed in latest 4.1.3-SNAPSHOT
Well, there are probably a few things: -) If the issue belongs anywhere it is probably in the Tapestry jira. -) While I can see ognl errors about missing classes I have no idea what led up to these errors. For all I know you got a java.lang.OutOfMemory exception in your app and this is the fallout from that. What caused the out of memory error is what I need to know. For me to fix it I have to see it - either with a re-producable bug report that somehow states what should vs. is happening or a yourkit snapshot profile of the apps memory - preferrably an object generation snapshot to show me the baseline vs. incremental changes. On 9/12/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote: > What further information do you require over and above the bug report I > filed? > http://jira.opensymphony.com/browse/OGNL-120 > > Jesse Kuhnert wrote: > > Hmmm... I think I'm going to need a lot more detailed information than > > that. I'm sure something is broken but without knowing more it's not > > something I'm going to look in to. > > > > On 9/11/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote: > > > >> Hi Jessie and co, > >> > >> I upgraded to the snapshot this morning at 6:00am GMT, deployed and > >> tested. I ran JConsole to monitor classes the whole day.. This evening I > >> just had it crash again 14 hours later. Doesn't appear to be fixed, I get > >> the same errors. > >> > >> I can see from your example that there may be a way I can avoid these > >> crashes by changing my code, the trouble is how do I test it? > >> > >> Peter > >> > >> Short version: > >> > >> Some users have brought up what appears to be a genuine memory > >> consumption bug in the new OGNL expression compiling integration with > >> Tapestry. The good news is that we think(hope) it has now been > >> addressed and fixed and would urge anyone experiencing any abnormally > >> high memory usage of their Tapestry apps based around version 4.1.2 or > >> greater to give the latest 4.1.3-SNAPSHOT version a try. > >> > >> Longer version: > >> > >> This issue doesn't have anything to do with OGNL itself, just my > >> implementation of the new compiler api it provides within Tapestry. > >> The core reason for the high memory consumption is based around the > >> javassist class pool that is used when generating and compiling > >> "anything" in Tapestry - which also includes these new compiled OGNL > >> expressions. > >> > >> The bug itself had to do with me generating javassist classes > >> needlessly on expressions that weren't compilable ~yet~. This is > >> also probably why only a few people have seen this issue while others > >> have been chugging along just fine. > >> > >> The yet part comes in when you are dealing with an expression where > >> all object types involved in the expression can't be known yet. For > >> example, suppose you had a state object looking something like this: > >> > >> public class UserState implements Serializable { > >> > >> User _user; > >> > >> public User getUser() > >> { > >> return _user; > >> } > >> > >> public void setUser(User user) > >> { > >> _user = user; > >> } > >> } > >> > >> public class User implements Serializable { > >> > >> String _name; > >> > >> public String getName() > >> { > >> return _name; > >> } > >> } > >> > >> and you needed to display the user name which you check in an ognl > >> expression doing something like this: > >> > >> Hello, > >> > >> If the user object isn't null when this expression is compiled then > >> all is well and everything works great. If the user object ~is~ null > >> however, the expression can't be compiled to native code yet because > >> we have to do a lot of introspection and class hierarchy walking to > >> determine the best classes to cast to in the generated java code. > >> Tapestry falls back to using normal ognl evaluation in these instances > >> ~until~ the user object isn't null - continually trying to compile and > >> checking for this condition until it succeeds. (there are instances > >> where it gives up forever as well) > >> > >> The core bug was that I was interacting with javassist and setting up > >> the new generated compiled expression classes ~before~ doing the work > >> necessary to know whether or not the statement was compilable - so for > >> every check a new javassist class was needlessly created and cached > >> internally by javassist. > >> > >> In development mode this isn't much of an issue as we can clear out > >> this cache of classes as often as we like - but in production we have > >> to leave the cache in tact as it can never really be known that > >> ~every~ component / page in the system has definitely been loaded and > >> will never need to be referenced in another compiled statement again. > >> > >> I think I fixed the bug by doing a JIT sort of javassist class > >> generation only after the majority of logic has passed that would > >> no
Re: T5: Troubles editing a list of objects
Woah, sorry, i messed up that subject line (missed the RE: ), so if you're looking for the original post, its: http://mail-archives.apache.org/mod_mbox/tapestry-users/200709.mbox/[EMAIL PROTECTED] On 9/12/07, lasitha <[EMAIL PROTECTED]> wrote: > Marcus, you mentioned offline you'd gotten this to work by setting the > Loop component's 'volatile' parameter to true. I've scanned the > source and must admit i don't quite understand how the component is > designed to work when _not_ volatile. If anyone's had any success > updating state within a non-volatile loop, please chime in. > > I do have a couple of related suggestions: > > 1. If you don't use an encoder, tapestry will try to serialize the > whole list (forcing the contained type to implement Serializable). > This might be ok - particularly if you use a client storage strategy - > but i think its cleaner to use a primary key encoder and allow it to > look up the list values from your backend on every hit. This also > ensures you don't run the risk of having two sets of objects floating > around. > > I've modified your example to use an encoder and appended the code below. > > You might also want to check out the ToDoList example in the > tapestry-core test source: > https://svn.apache.org/repos/asf/tapestry/tapestry5/trunk/tapestry-core/src/test > Look for: org.apache.tapestry.integration.app1.pages.ToDoList.java and > the corresponding ToDoList.html > > (There's also a ToDoListVolatile variation, but its essentially your > solution with volatile="true"). > > 2. Perhaps a Grid component is a more natural (albeit heavier) fit for > this kind of scenario? It may not be worth it if your example doesn't > get any more complicated, but throw in some validation, add/delete use > cases and the simple list may not hold up. I haven't used a Grid > myself, but i hear good things :) > > Cheers, > lasitha > > public class TestList { > private DefaultPrimaryKeyEncoder encoder; > private Value value;// current loop variable > private ValueRepository valueRepository = new ValueRepository(); > // would be @Inject-ed instead > > public void onPrepare() { > encoder = new DefaultPrimaryKeyEncoder(); > for(Value value: valueRepository.retrieve()) { > encoder.add(value.getName(), value); > } > } > public void onSuccess() { > repository.update(encoder.getValues()); > } > public List getValues () { > return encoder.getValues(); > } > public PrimaryKeyEncoder getEncoder() { > return encoder; > } > public Value getValue () { > return this.value; > } > public void setValue (Value value) { > this.value = value; > } > > public static class Value { > private String name; > private String text; > private boolean used; > > public Value(String name, String text, boolean used) { > this.name = name; > this.text = text; > this.used = used; > } > public String getName () { > return this.name; > } > public void setName (String name) { > this.name = name; > } > public String getText () { > return this.text; > } > public void setText (String text) { > this.text = text; > } > public boolean isUsed () { > return this.used; > } > public void setUsed (boolean used) { > this.used = used; > } > } > > > public static class ValueRepository { > > private static List values = new ArrayList() {{ > add(new Value("first", "text one", false)); > add(new Value("second", "text two", false)); > add(new Value("third", "text three", false)); > }}; > public List retrieve() { > return values; > } > public void update(List values) { > // in this case, the Value instances in the static list > have already been modified in place > // if this were a DB backed repo, we might loop through > the values and persist 'em here > } > } > } > > > On Wed, 05 Sep 2007, Marcus Schmidke wrote: > > > > ... > > > > I'm trying to edit a list of values: > > ... > > > > The page is rendered perfectly. On Submit, the new values are passed > > into some Value objects. > > > > But: those Value objects are serialized/deserialized instances of the > > original Value objects. While the List still holds the original Value > > objects, only copies of them get modified. Result is that my program > > code (which works on the list) never sees the modified versions, and > > on re-rendering, the old values are displayed again. > > > > What am I doing wrong?? > > > > > > Marcus. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
Re: [5.0.6-SNAPSHOT] Bug? isTraceEnabled missing when I switch to slf4j
> followup. Strange thing is - looking at the actuall log4j.Logger - it > has an isTraceEnabled, so I'm really unclear as to why this would > happen. The problem is the log4j lib in the Jetty ext directory - replace it with the newer log4j (1.2.12 or higher) version. -- Chris
T5: Troubles editing a list of objects
Marcus, you mentioned offline you'd gotten this to work by setting the Loop component's 'volatile' parameter to true. I've scanned the source and must admit i don't quite understand how the component is designed to work when _not_ volatile. If anyone's had any success updating state within a non-volatile loop, please chime in. I do have a couple of related suggestions: 1. If you don't use an encoder, tapestry will try to serialize the whole list (forcing the contained type to implement Serializable). This might be ok - particularly if you use a client storage strategy - but i think its cleaner to use a primary key encoder and allow it to look up the list values from your backend on every hit. This also ensures you don't run the risk of having two sets of objects floating around. I've modified your example to use an encoder and appended the code below. You might also want to check out the ToDoList example in the tapestry-core test source: https://svn.apache.org/repos/asf/tapestry/tapestry5/trunk/tapestry-core/src/test Look for: org.apache.tapestry.integration.app1.pages.ToDoList.java and the corresponding ToDoList.html (There's also a ToDoListVolatile variation, but its essentially your solution with volatile="true"). 2. Perhaps a Grid component is a more natural (albeit heavier) fit for this kind of scenario? It may not be worth it if your example doesn't get any more complicated, but throw in some validation, add/delete use cases and the simple list may not hold up. I haven't used a Grid myself, but i hear good things :) Cheers, lasitha public class TestList { private DefaultPrimaryKeyEncoder encoder; private Value value;// current loop variable private ValueRepository valueRepository = new ValueRepository(); // would be @Inject-ed instead public void onPrepare() { encoder = new DefaultPrimaryKeyEncoder(); for(Value value: valueRepository.retrieve()) { encoder.add(value.getName(), value); } } public void onSuccess() { repository.update(encoder.getValues()); } public List getValues () { return encoder.getValues(); } public PrimaryKeyEncoder getEncoder() { return encoder; } public Value getValue () { return this.value; } public void setValue (Value value) { this.value = value; } public static class Value { private String name; private String text; private boolean used; public Value(String name, String text, boolean used) { this.name = name; this.text = text; this.used = used; } public String getName () { return this.name; } public void setName (String name) { this.name = name; } public String getText () { return this.text; } public void setText (String text) { this.text = text; } public boolean isUsed () { return this.used; } public void setUsed (boolean used) { this.used = used; } } public static class ValueRepository { private static List values = new ArrayList() {{ add(new Value("first", "text one", false)); add(new Value("second", "text two", false)); add(new Value("third", "text three", false)); }}; public List retrieve() { return values; } public void update(List values) { // in this case, the Value instances in the static list have already been modified in place // if this were a DB backed repo, we might loop through the values and persist 'em here } } } On Wed, 05 Sep 2007, Marcus Schmidke wrote: > > ... > > I'm trying to edit a list of values: > ... > > The page is rendered perfectly. On Submit, the new values are passed > into some Value objects. > > But: those Value objects are serialized/deserialized instances of the > original Value objects. While the List still holds the original Value > objects, only copies of them get modified. Result is that my program > code (which works on the list) never sees the modified versions, and > on re-rendering, the old values are displayed again. > > What am I doing wrong?? > > > Marcus. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: replacing the ComponentInstantiatorSource service
On 13/09/2007, at 12:00 AM, Howard Lewis Ship wrote: I'd love to know why you want to do this ... it indicates to me that there needs to be some additional configuration available to CIS to support your needs. I don't know if I have a valid use-case, but what I'm doing is experimenting with integrating Business Object's CAL language with Java, so a page class from the tutorial app becomes: @Cal(workspace = "myworkspace.cws", module = "TDavies.Start") public class Guess { @Persist private int _target; void setup(int target) { _target = target; } public int getTarget() { return _target; } private int _guess; public int getGuess() { return _guess; } public void setGuess(int guess) { _guess = guess; } @Persist private String _message; public String getMessage() { return _message; } String onActionFromLink(int guess) { _message = getNewMessage(guess, _target); MaybeValue nextPage = getNextPage(guess,_target); return nextPage.getValueField(); } @Cal String getNewMessage(int guess, int target) { return null; } @Cal MaybeValue getNextPage(int guess, int target) { return null; } } Where the methods with the @Cal annotations are replaced by Javassist with calls to CAL functions. I'm not even sure this is useful yet -- I'm just exploring. To do this I needed to be able to apply a Javassist Translator to the page classes as they were loaded (and javassist.Loader.addTranslator should be named *setTranslator*!) Perhaps there is a better way? In any case, ComponentInstantiatorSourceImpl is quite monolithic -- perhaps some of its components should be injected, e.g. a seperate Translator, rather than having ComponentInstantiatorSourceImpl implement Translator. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [5.0.6-SNAPSHOT] Bug? isTraceEnabled missing when I switch to slf4j
followup. Strange thing is - looking at the actuall log4j.Logger - it has an isTraceEnabled, so I'm really unclear as to why this would happen. Christian. On 12-Sep-07, at 10:01 AM, Christian Gruber wrote: Hi, I just started using Tapestry, and was working a little past the tutorial. I pulled in the snapshot code and my app broke, particularly around commons-logging no longer being imported as a transative dependency. I declared public RequestFilter buildTimingFilter(final Logger log) using the slf4j version. I tried the latter, and I ended up with: HTTP ERROR: 500 org.apache.log4j.Logger.isTraceEnabled()Z RequestURI=/person/create Powered by Jetty:// at org .slf4j .impl.Log4jLoggerAdapter.isTraceEnabled(Log4jLoggerAdapter.java:81) which is defined by: public boolean isTraceEnabled() { return logger.isTraceEnabled(); } It seems that Log4J's Logger/Category at version 1.2.9 doesn't include an isTraceEnabled() method. I upped the version to 1.2.12 and it's the same. My setup is the exact same as the svn trunk version of the tutorial. What am I missing here? Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[5.0.6-SNAPSHOT] Bug? isTraceEnabled missing when I switch to slf4j
Hi, I just started using Tapestry, and was working a little past the tutorial. I pulled in the snapshot code and my app broke, particularly around commons-logging no longer being imported as a transative dependency. I declared public RequestFilter buildTimingFilter(final Logger log) using the slf4j version. I tried the latter, and I ended up with: HTTP ERROR: 500 org.apache.log4j.Logger.isTraceEnabled()Z RequestURI=/person/create Powered by Jetty:// at org .slf4j.impl.Log4jLoggerAdapter.isTraceEnabled(Log4jLoggerAdapter.java: 81) which is defined by: public boolean isTraceEnabled() { return logger.isTraceEnabled(); } It seems that Log4J's Logger/Category at version 1.2.9 doesn't include an isTraceEnabled() method. I upped the version to 1.2.12 and it's the same. My setup is the exact same as the svn trunk version of the tutorial. What am I missing here? Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: replacing the ComponentInstantiatorSource service
I'd love to know why you want to do this ... it indicates to me that there needs to be some additional configuration available to CIS to support your needs. On 9/12/07, Tom Davies <[EMAIL PROTECTED]> wrote: > > Hi, > > I want to override the ComponentInstantiatorSource service with my > own implementation (so that I can add another Translator to the > Javassist ClassPool). > > It seems that I can't simply define a duplicate of the service in my > own module, which is fair enough. What's the approach to use? > > Thanks, >Tom > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
Re: [T4.1.2] Using tapestry app behind a proxy server
That's good news. Thanks. Anyone behind a Micro$oft proxy? (don't ask me why I ask this, pure speculation...) 2007/9/12, Johan Maasing <[EMAIL PROTECTED]>: > > > And since you do use such a proxy, could you try one of my pages : > > http://www.hyperassur.com/assurance-auto-recherche.html and then click > on > > the sponsored link labelled "ASSURANCE RESILIEE" and see if it works for > > you. The link is supposed to open a dojo dialog with a short form > (please do > > Works for me and I'm behind a squid proxy. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: [T4.1.2] Using tapestry app behind a proxy server
> And since you do use such a proxy, could you try one of my pages : > http://www.hyperassur.com/assurance-auto-recherche.html and then click on > the sponsored link labelled "ASSURANCE RESILIEE" and see if it works for > you. The link is supposed to open a dojo dialog with a short form (please do Works for me and I'm behind a squid proxy. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: T5: FCKEditor Component
This is a fabulous component, indeed. I wonder if a few more toolbar sets could be added to it? The default one is too big, the Basic is, well, a bit basic:) I can suggest this one, it works well for my project: FCKConfig.ToolbarSets["Medium"] = [ ['Bold','Italic','Underline','-','OrderedList','UnorderedList','-','Text Color','BGColor','-','Outdent','Indent'], ['JustifyLeft','JustifyCenter','JustifyRight','-','Cut','Copy','Paste',' -','Link'] ] ; Thanks for the great work! I am describing this component (as well as the DatePicker) in the coming Tapestry 5 book. Alexander -Original Message- From: Ted Steen [mailto:[EMAIL PROTECTED] Sent: 30 March 2007 02:19 To: Tapestry users; Tapestry development Subject: T5: FCKEditor Component Hi! We made a FCKEditor component for a project and it is available on Google Code for anyone who is interested. http://code.google.com/p/tapestry5-fckeditor/ Please do give some feedback. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4.1.2] Using tapestry app behind a proxy server
I agree with you about those web anonymizers, but I do have some users behind real HTTP proxies for whom my application js/ajax stuff do not work. I'm sure there are some proxies for which it does work, but I know for sure there are some for which it doesn't, and the symptoms are very similar as those I'm facing using a web proxy. I'm really not an expert on proxying technology, but is there any proxy product out there that might actually rewrite URLs or something alike? And since you do use such a proxy, could you try one of my pages : http://www.hyperassur.com/assurance-auto-recherche.html and then click on the sponsored link labelled "ASSURANCE RESILIEE" and see if it works for you. The link is supposed to open a dojo dialog with a short form (please do not submit the form, unless you need to subscribe a french insurance contract ;-). I'd be very grateful if you could do that. Thx Ch. 2007/9/11, Renat Zubairov <[EMAIL PROTECTED]>: > > Hello Christian, > > I understand your concern, but to express it correctly, you have the > problems with Tapestry applications when you are trying to use online > proxies that are trying to protect your internet experience via active > redirection and URL modification. > > These kind of proxies are not the real HTTP proxies that are widely > used all over the world, these are working transparently for any > application and I'm quite sure Tapestry 4.1.X application will work > without any problems under these (I'm sure because I'm behind such > proxy). > > The problem with web proxies of internet anonymizers is general and > not only related to Tap 4.1, try to launch any AJAX enabled and/or > Javasciript powered application that require some network > communication from AJAX/JS tier, and you will see that such kind of > anonymizers fail to do their job. > > Renat > > On 10/09/2007, Christian Dutaret <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > I have many complaints from users using my T4.1.2 application from > behind > > some proxy servers. Basically, all JS/Ajax stuff gets broken. > > Unfortunately I don't have any proxied environment available here, and > no > > way to build one (our web access is shared across several companies, and > > they wouldn't let me modify it for my tests). > > > > So what I found closest to a proxy server for my tests is to use a web > proxy > > (you know, one of those web sites that hide your IP and allow you to > visit > > any site "anonymously"). I get the exact same broken behavior when I use > one > > of those (I used http://www.webproxy.fr which is a french one, but I > guess > > anyone would do). > > From what I understand from the js errors, the problem relates to > relative > > URLs used in some js calls. I think the web proxy replaces any URL that > > begins with my domain name by a proxied URL. It can't guess that the > > relative URL inside a js call is also to be proxied, resulting in > attempts > > to retrieve js at the web proxy server root, which obviously do not > work. > > This happens e.g. with the baseRelativePath parameter in djConfig or the > > registerModulePath call for tapestry dojo-related stuff. > > > > Just for you guys to be able to see it for yourself, I tried to access > the > > time tracker demo app through the web proxy, and it also results in > broken > > js. > > > > I'm not sure the problem is the same with proxy servers, so if there are > any > > proxy expert around, I'd be very happy to hear from them ;-) > > > > Is there any way to work around this problem (like generating absolute > URLs > > instead of those relative ones, but again, I don't know dojo enough to > tell > > if this is feasable). > > > > Thx for any inputs > > > > Ch. > > > > > -- > Best regards, > Renat Zubairov > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: T5: replacing the ComponentInstantiatorSource service
To quote HLS: "You supply a new implementation with a new id, and contribute to the Alias service configuration. This will allow injections based on type to prefer your implementation over the built-in one." See Alias/AliasOverrrides: http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html Cheers, Nick. Tom Davies wrote: Hi, I want to override the ComponentInstantiatorSource service with my own implementation (so that I can add another Translator to the Javassist ClassPool). It seems that I can't simply define a duplicate of the service in my own module, which is fair enough. What's the approach to use? Thanks, Tom - 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: replacing the ComponentInstantiatorSource service
Hi, I want to override the ComponentInstantiatorSource service with my own implementation (so that I can add another Translator to the Javassist ClassPool). It seems that I can't simply define a duplicate of the service in my own module, which is fair enough. What's the approach to use? Thanks, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]