Re: PageCallback and login issue (tapestry weakness?)

2006-05-05 Thread Mike Snare
TED]> wrote: On 5/3/06, Mike Snare <[EMAIL PROTECTED]> wrote: > > Henri, > > This same issue has been discussed before (search the archives for my > name and authentication), but I'll summarize what I've done and how it > works -- and how it doesn't work.

Access ServletContext in an eagerLoad service

2006-05-05 Thread Mike Snare
I have an application initialization service (InitService) that I've contributed to eagerLoad. I have a need to extract true path information to set an application property for use by later services (that should not need to access the servlet context themselves). To do this, I added a setter to

Re: Periodic Execution of Javascript in a Tapestry 4 app

2006-05-04 Thread Mike Snare
Hmm... I use plain old setTimeout in a few places in my app and haven't had any problem. I wouldn't think that the timeout could be eaten, could it? The only way to cancel it is to cancel it by the id. -Mike On 5/4/06, Kevin C. Dorff <[EMAIL PROTECTED]> wrote: I want to periodically execute

Re: List of logged users

2006-05-04 Thread Mike Snare
That's what I do, and it works for me. -Mike On 5/4/06, James Carman <[EMAIL PROTECTED]> wrote: Perhaps you can key your logged in user list (make it a map) by the session id? Wouldn't that work? -Original Message- From: Oscar Picasso [mailto:[EMAIL PROTECTED] Sent: Thursday, May 04,

Re: calling listener in component

2006-05-04 Thread Mike Snare
on the tapestry web site, but thay talk about listenerInvoker ... Thanks for any help! Carl On Thursday 04 May 2006 10:42, Mike Snare wrote: > I've needed to do the same thing, but usually the listener is > specified by the page as a parameter of the component. If you can do > th

Re: calling listener in component

2006-05-04 Thread Mike Snare
I've needed to do the same thing, but usually the listener is specified by the page as a parameter of the component. If you can do that, it's transparent. -Mike On 5/4/06, Carl Pelletier <[EMAIL PROTECTED]> wrote: Hi everyone, I looking for help on component. I have a component in a page. Tha

Re: List of logged users

2006-05-04 Thread Mike Snare
The service implementation is a cover for the singleton. Imagine: /** * A simple HiveMind service */ public interface ISomeService { void doSomething(); } /** * The implementation of the hivemind service, delegates to the singleton. */ public class SomeServiceImpl implements ISomeService {

Re: List of logged users

2006-05-04 Thread Mike Snare
I do a similar thing, and I have a standard, plain vanilla singleton that is accessed via a service wrapper by pages/services (purely for injection's sake) but is accessed via standard java by the listener. -Mike On 5/4/06, Haldane, Sam <[EMAIL PROTECTED]> wrote: How would one access tapestry

Re: HTML tables

2006-05-03 Thread Mike Snare
Seriously, you need to buy kent's book. Or maybe look at the documentation for the TableView component and/or the For component. -Mike On 5/3/06, Rui Pacheco <[EMAIL PROTECTED]> wrote: But how do you iterate through a recordset to create those tables and keep Tapestry's model of separation of

Re: PageCallback and login issue (tapestry weakness?)

2006-05-03 Thread Mike Snare
Henri, This same issue has been discussed before (search the archives for my name and authentication), but I'll summarize what I've done and how it works -- and how it doesn't work. I've created an authentication interceptor that I attach to all the major engines. It simply checks for an authen

Re: Date component

2006-04-18 Thread Mike Snare
No problem. Anyway, you might take a look at some of the links on the wiki. http://wiki.apache.org/jakarta-tapestry/ExtraComponents -Mike On 4/18/06, Oscar Picasso <[EMAIL PROTECTED]> wrote: > I am sorry. > > Not removing the old text was a mistake.

Re: Date component

2006-04-18 Thread Mike Snare
Don't know about the date component, but if you are going to respond to old emails to start new threads, could you at least do us the favor of removing the old text first? Thanks, -Mike - To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Sharing data accross pages..

2006-04-17 Thread Mike Snare
Page2.java and > > > > > .page on WEB-INF/clients/Page2.html > > > > > > > > > > This directory structure is working correctly on every other page > > > > > except for this one. Here's how inject looks like > > > > > > >

Re: Sharing data accross pages..

2006-04-17 Thread Mike Snare
inject looks like > > > > > > > > @InjectPage("clients/Page2") > > > > > > > > -- Mário > > > > > > > > On 4/17/06, James Carman <[EMAIL PROTECTED]> wrote: > > > > > I do this sort of stuff all the t

Re: Sharing data accross pages..

2006-04-17 Thread Mike Snare
/17/06, James Carman <[EMAIL PROTECTED]> wrote: > > > > I do this sort of stuff all the time. So, it must be that your HTML > > isn't > > > > being found. Where do you have Page2.html? > > > > > > > > -Original Message- >

Re: Sharing data accross pages..

2006-04-17 Thread Mike Snare
> > Sent: Monday, April 17, 2006 2:36 PM > > > To: Tapestry users > > > Subject: Re: Sharing data accross pages.. > > > > > > Precisely what I'm doing. Problem is that I have html inside Page2 > > > that's not showing off. Where do link th

Re: Sharing data accross pages..

2006-04-17 Thread Mike Snare
Problem is that I have html inside Page2 > > that's not showing off. Where do link the Page2.java with Page2.html? > > Maybe it's not rendering anything because it can't find the .html! > > > > Regards, > > > > -- Mário > > > > On 4/17

Re: Sharing data accross pages..

2006-04-17 Thread Mike Snare
d rendering happens there. If Page2 has a border, it will get rendered. If it doesn't, it won't. Same for anything else on the page. Page1 is now 'gone' and will no longer affect Page2. -Mike On 4/17/06, Mário Lopes <[EMAIL PROTECTED]> wrote: > On 4/17/06, Mike Snare &l

Re: Sharing data accross pages..

2006-04-17 Thread Mike Snare
Inject page doesn't inject the page into the page you are looking at from a view standpoint, rather it makes an instance of that page a member of the page. In the form submission of page 1, get the instance of page 2 via the accessor and set the appropriate attributes. The layout of page 2 (inclu

Re: Page injection question

2006-04-14 Thread Mike Snare
That's essentially what I've done (I'm injecting the page name into a property, but the effect is the same). It's a perfectly fine work-around, and maybe it's the 'solution'. If you do decide to work on it, I agree that none of the binding prefixes (prefices?) make sense other than ognl and liter

Re: Page injection question

2006-04-13 Thread Mike Snare
Would it work to first 'try' to assume it's an ognl expression, or would that just puke since no method exists? Worse yet, what if the method *does* exist but has nothing to do with the desired page? That's a subtle bug that would throw some people against the wall for a bit. In the event the me

Re: Contrib:Table with form submit in Tapestry 4?

2006-04-13 Thread Mike Snare
The docs also say this (at least for 4.0, not sure for 3.x) with regard to the column binding. "The full description string may be prefixed by the * character, which means that the table is to be rendered within a form, and the column headers must submit the form if they are clickable (i.e. if the

Re: Page injection question

2006-04-13 Thread Mike Snare
Ok. Now I see it. Thanks for the pointer. I read the code and understand my problem. I definitely think this should be fixed. The question is how? It seems that since everyone is already assuming that they need to specify a literal string for the name, it would be fine to simply make literal:

Re: preventing multiple form submittions

2006-04-12 Thread Mike Snare
Indeed I did misunderstand your intent, then. -Mike On 4/12/06, Bryan Lewis <[EMAIL PROTECTED]> wrote: > I'm not sure it helps him either, except maybe in understanding why > three clicks turned into two method calls. The tweak on the client > machine was only a debuggi

Re: preventing multiple form submittions

2006-04-12 Thread Mike Snare
Not sure that helps him. It's not feasible to expect people to tweak their OS settings to fit your app, so we have to fix it on our side. Unless I misunderstood your intent... -Mike On 4/12/06, Bryan Lewis <[EMAIL PROTECTED]> wrote: > The operating system will combine fast double clicks into a

Re: Page injection question

2006-04-12 Thread Mike Snare
nice for my app. > Few pages I recall off the top of my head do injections: > RegistrationPage, PostalCodeHelpPage1, and RegistrationCaptchaPage. > > You may have solved your problem already since this hasn't been > answered for a while, but good luck to you anyway. > > Adam > > On

Re: preventing multiple form submittions

2006-04-12 Thread Mike Snare
When I want to cancel the submission of a form in tapestry via javascript I set the event's abort and cancel_handlers properties appropriately. tapesty passes your ${checkSubmit} method an event 'object' that has the above mentioned properties. returning false from a handler like this won't have

Re: preventing multiple form submittions

2006-04-12 Thread Mike Snare
Seems like a race condition. Why not just disable the button in the onClick? You could start a timer to re-enable it if you needed to, but if the page redisplays then just leave it alone. -Mike On 4/12/06, Dan Adams <[EMAIL PROTECTED]> wrote: > Okay, I've got the common problem where I want to p

Re: Using Tapestry.onsubmit(...) in Tapestry 4.0.1 from my Home.script

2006-04-12 Thread Mike Snare
Are you adding the script before adding the form to which you wish to add behavior? Can you add it after? I use scripts to add behavior to the onSubmit and have never had this issue. The only thing I can think of to explain it is that I add the script after the form. May not have anything to do

Re: Tapestry 5

2006-04-10 Thread Mike Snare
I hope not. That would be horrible. There's a good segment of us still using java 1.4 who would be significantly annoyed at that, and for good reason. I know that the tap developers don't tend to concern themselves with backward compatibility, but it seems you should try to *build* a user base -

Re: Injecting common properties for multiple pages

2006-04-10 Thread Mike Snare
There would certainly need to be some filtering. As to the issue of objects in pages, it's really a matter of logic in pages, since the objects aren't really stored in the pages anyway. Shouldn't be an issue. There are many issues that would need to be addressed, but it should be do-able. On 4/

Re: Injecting common properties for multiple pages

2006-04-10 Thread Mike Snare
Not ideal, for sure. I think part B of my proposal is much better -- an application.page file that has normal page-file semantics to inject/add whatever is needed across all pages: application.page file: Then any page that wanted the FooService could just do: public abstract MyPage exten

Re: [OT] test case for pages that email

2006-04-10 Thread Mike Snare
if your mail server is available and configured properly. > > > > > > > > -Original Message- > > > > From: Dan Adams [mailto:[EMAIL PROTECTED] > > > > Sent: Monday, April 10, 2006 10:50 AM > > > > To: Tapestry users > > > >

Re: Another question concerning the For component

2006-04-10 Thread Mike Snare
Hmm.. Maybe a problem with the doctor class? Is it possible that the doctor class doesn't really compile? What about ActivatePage? Does it have any reference to a doctor property that could (grabbing at straws here) cause some sort of collision? -Mike On 4/10/06, Andreas Bulling <[EMAIL PROTEC

Re: [OT] test case for pages that email

2006-04-10 Thread Mike Snare
lay a message to the user letting them > > > know but that doesn't ACTUALLY mean that the email was sent or the > > > service was called. The way I have to do it right now is by having the > > > email sent to me and checking my email manually. I would love to

Re: Another question concerning the For component

2006-04-10 Thread Mike Snare
You showed that for the EditPatient page, but not in the ShowPatient page where the exception is occurring. Does some part (probably in ShowPatient.page) of the page attempt to access a 'doctor' property? If so, prove to yourself that getDoctor should exist in either ShowPatient or the enhanced s

Re: [OT] test case for pages that email

2006-04-10 Thread Mike Snare
ed. The way I have to do it right now is by having the > > email sent to me and checking my email manually. I would love to have it > > all automated though. > > > > On Mon, 2006-04-10 at 10:45 -0400, Mike Snare wrote: > > > Well, wouldn't you want to indicate to th

Page injection question

2006-04-10 Thread Mike Snare
I have a central repository (PageConstants.java) for page names. I need to inject a page into another. The problem is that It doesn't seem to work to inject the actual name of the page. Let's say I have a page named Foo. I would therefore have the following in PageConstants.java: public stati

Re: [OT] test case for pages that email

2006-04-10 Thread Mike Snare
Well, wouldn't you want to indicate to the user that the send was successful or not? If so, you could just look for that. I know you said that the submission doesn't affect the page but don't you want to let the user know it worked? -Mike On 4/10/06, Dan Adams <[EMAIL PROTECTED]> wrote: > Okay,

Re: component-writing question

2006-04-10 Thread Mike Snare
Clearly, some object used as an expression prefix on line 106 of ShowAdminPanel is null. Put a breakpoint there and see what it is. -Mike On 4/10/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: > On 10. Apr 2006 - 10:15:16, Mike Snare wrote: > | Whenever you are asking for help with

Re: component-writing question

2006-04-10 Thread Mike Snare
Whenever you are asking for help with an exception, it helps to automatically post the exception with stack trace (there are often more than one, post all of them). All you have said is that you are getting an ApplicationRuntimeException. Without more info, that's next to meaningless. -Mike On

Re: Injecting common properties for multiple pages

2006-04-10 Thread Mike Snare
Mike. Please think about his suggestions. > Please. (I am using the 'subclassing'-method now, but although it works, > are not all that happy with it). > > I'll vote for the Jira if you want. ;-) > > Regards, > Martijn > > Mike Snare wrote: > > >I

Re: Injecting common properties for multiple pages

2006-04-10 Thread Mike Snare
I must say that this notion of inserting common ASOs and services into all pages has come up several times on this list in just the last month I've been subscribing. @Tap Team: How difficult would it be to add the ability to either: A) declare services/aso's as 'global' (or some better label),

Re: component-writing question

2006-04-09 Thread Mike Snare
t;[EMAIL PROTECTED]> wrote: > On 09. Apr 2006 - 12:40:47, Mike Snare wrote: > | Nope. The user can just pass in classes for the borders, etc as they > | see fit. You just use the value of the parameter as you need to. > > Sorry, thanks for your answer b

Re: component-writing question

2006-04-09 Thread Mike Snare
Nope. The user can just pass in classes for the borders, etc as they see fit. You just use the value of the parameter as you need to. On 4/9/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: > On 09. Apr 2006 - 12:11:40, James Carman wrote: > | Well, the question needs to be asked. Why exactly do

Re: Best practice: Security Layer

2006-04-09 Thread Mike Snare
Andreas, I went back and forth with another developer on this list less than a month ago about some of the pros and cons of subclasses, pageValidate, and interceptors for authentication. You might want to take a look at that thread. http://mail-archives.apache.org/mod_mbox/jakarta-tapestry-user/

Re: Best practice: Security Layer

2006-04-09 Thread Mike Snare
Andreas, I'm using a custom hivemind interceptor on the major service-points' 'service' method that checks for authentication and redirects to the login page if none exists. The only problem (and it's a big one) is that the page isn't set up when the interceptor runs. I can get to the page name

Re: Another question concerning the For component

2006-04-09 Thread Mike Snare
Sorry, I'm stumped. Could you post more code? The page and class files for this might help. -Mike On 4/8/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: > On 07. Apr 2006 - 20:52:08, Andreas Bulling wrote: > | On 07. Apr 2006 - 14:44:12, Mike Snare wrote: > | | Hmm... Not

Re: Another question concerning the For component

2006-04-07 Thread Mike Snare
Hmm... Not sure, but I suppose that it *could* be something screwy where your server recognizes the new class file, but tapestry is trying to re-use the enhanced page class it created before the change was made? Have you stopped/started your server? Just a guess though... -Mike On 4/7/06, Andr

Re: Another question concerning the For component

2006-04-07 Thread Mike Snare
You need to tell tapestry that you want it to enhance the class in this way. For my part, I prefer to keep any properties not needed by the class in the page/jwc file to help keep the code size down -- but you're free to do it via getters/setters if you prefer. -Mike On 4/7/06, Andreas Bulling <

Re: External assets in seperate file?

2006-04-07 Thread Mike Snare
Definitely interested. -Mike On 4/7/06, Filip S. Adamsen <[EMAIL PROTECTED]> wrote: > Right. So what I had in mind to begin with wasn't really feasible - and > there is a far easier way to do it: > > I ended up creating a GlobalAssetFactory instead. It uses a > GlobalAssetManager backed by a Glob

Re: AW: https

2006-04-05 Thread Mike Snare
Would it make sense to have a default allowed in a meta tag for the application? Then if the link user specified only the scheme but not the port tap could just use the default. This would allow for easy switching from development (8080/8443) to production (80/443). Seems reasonable to me... -M

Re: Tap 3: Conditional component type in .jwc?

2006-04-05 Thread Mike Snare
with lots of fields ;) > Hence my question :) > > > -Original Message- > From: Mike Snare [mailto:[EMAIL PROTECTED] > Sent: woensdag 5 april 2006 15:24 > To: Tapestry users > Subject: Re: Tap 3: Conditional component type in .jwc? > > I think you want to provide

Re: Tap 3: Conditional component type in .jwc?

2006-04-05 Thread Mike Snare
I think you want to provide both in your template, and wrap them with appropriate Conditional components: Then in your template: -Mike On 4/5/06, Bode, Bianca <[EMAIL PROTECTED]> wrote: > Hi all, > > I have created a component, that renders some plain html, wi

Re: Simple property Hivemind service.

2006-04-03 Thread Mike Snare
to move > all that boilder plate code onto the framework, in this case let > Hivemind configure my properties.. > > Adam > > On 4/3/06, Mike Snare <[EMAIL PROTECTED]> wrote: > > I don't think so, but why are you using a service for this? Seems > > like it c

Re: Simple property Hivemind service.

2006-04-03 Thread Mike Snare
I don't think so, but why are you using a service for this? Seems like it could be done in a static class or just an interface full of constants. -Mike On 4/3/06, Adam Zimowski <[EMAIL PROTECTED]> wrote: > I have an interface ISettings with a bunch of getters all returning > String which are sim

Re: pass informal params to component contained by component?

2006-04-03 Thread Mike Snare
there's an inherit-formal-parameters attribute on the component tag. That should do it. -Mike On 4/3/06, Sam Gendler <[EMAIL PROTECTED]> wrote: > I have a component which includes a FieldLabel and a Select component > which is prepopulated with a list of valid currencies. I'd like to be > able

Re: [Announce] Release Tapestry 3.0.4 / Tapestry 4.0.1

2006-04-03 Thread Mike Snare
It's a bit easier to read on the website: http://jakarta.apache.org/tapestry/changes.html -Mike On 4/3/06, Bryan Lewis <[EMAIL PROTECTED]> wrote: > I found a list of changes in the distribution in the file status.xml. > > > Vincent wrote: > > >Hi Jesse, > > > >Stupid question , where can I find

Re: that act as a DirectLink?

2006-04-03 Thread Mike Snare
Does it work to just have your listener declare a String parameter? If not, try getting it from the listener parameters (page.getRequestCycle.getListenerParameters)? -Mike On 4/3/06, Fabio Bondioli <[EMAIL PROTECTED]> wrote: > Hi, > > I'm extending the contrib:TablePages component (tapestry 4) a

Re: RUNTIME EXCEPTION HANDLERS IN TAPESTRY...

2006-03-31 Thread Mike Snare
There's a property attribute for components, so when you add it in the page file, you can assign it a property then add an abstract getter in your page class. .page file: ... bindings ... .java file: public abstract Border getBorder(); -Mike On 3/31/06, Angelo Luis <[EMAIL PROTECTED]> wrote

Re: Contrib table layout

2006-03-31 Thread Mike Snare
Can you use css? Look at the html for the table, it provides classes to all the TDs in the rows. If your column id is name, the class for TDs in that row will be nameColumnValue. You can just use a css class with that name. Alternatively, you could override the rendering using a Block component

Re: Creating array of Validators with String

2006-03-30 Thread Mike Snare
If the validation is specified in your xml, parse the data into data structures that make sense to you, then use them to create one or more of the validators in the org.apache.tapestry.valid package. Will that work? -Mike On 3/30/06, Eric Schneider <[EMAIL PROTECTED]> wrote: > Hi, > > I have a g

Re: inserting unicode characters?

2006-03-30 Thread Mike Snare
Will an Insert with raw="true" work? -Mike On 3/30/06, Dan Adams <[EMAIL PROTECTED]> wrote: > What component should I use to insert a raw block of text that is UTF8 > and has some unicode characters in it? I see that markupwriter says it > translates unicode into html entities but @Insert convert

Re: Informal parameters in component html template

2006-03-30 Thread Mike Snare
All an informal parameter is is a parameter that's not declared as a component parameter. It's like the class attribute of the input element. The form element components (TextField, PropertySelection, etc) don't use a class parameter so you are free to use it on the component. It will be passed

Re: ZipValidator that worked in 3.0.3 doesn't work in 4.0

2006-03-30 Thread Mike Snare
ctxPath + "/images/iconWarning.gif"); > > writer.attribute("class", "validationWarning"); > > writer.attribute("alt", > > cycle.getPage().getMessages().getMessage("icon.warning")); > > writer.end(); > > > >

Re: ZipValidator that worked in 3.0.3 doesn't work in 4.0

2006-03-30 Thread Mike Snare
try replacing value="\\d{5}(-\\d{4})?" with value="literal:\\d{5}(-\\d{4})?" See if that works. -Mike On 3/30/06, Matt Raible <[EMAIL PROTECTED]> wrote: > This worked in 3.0.3: > > class="org.apache.tapestry.valid.PatternValidator"> > > > > > > > But th

Re: Accessing a Session from a Service?

2006-03-30 Thread Mike Snare
That's what I've had to do when I wanted to inject an ASO into another service. Seems like a good enhancement request... -Mike On 3/30/06, James Carman <[EMAIL PROTECTED]> wrote: > I couldn't find a way to do it, but I guess it'd be somewhat trivial to > actually write a provider. > > -Origi

Re: Newbie editing object values in a simple form...

2006-03-29 Thread Mike Snare
create one? I would be > interested in something like this because my app avoids creating a > session under "guest" user at all possible costs. If flashing object > to session leaves the session alive, I'm afraid I could not use it. > > Adam > > On 3/29/06, Mike

Re: Newbie editing object values in a simple form...

2006-03-29 Thread Mike Snare
m > > Isn't it possible to do something similar to WebObjects component > > based things... passing the object directly? > > > > Il giorno 29/mar/06, alle ore 16:00, Mike Snare ha scritto: > > > >> The problem with just making it persistent is that you now

Re: Newbie editing object values in a simple form...

2006-03-29 Thread Mike Snare
The problem with just making it persistent is that you now have to handle the case where the user gets to the edit page via a path other than the intended one (probably clicking on an article title or something). Normally, you could just check to whether the article or id was null or empty in the

Re: Newbie editing object values in a simple form...

2006-03-29 Thread Mike Snare
return getArticleListPage(); > } > > I tried also putting some debug text in the doSubmit method but > nothing is displayed... so I assume the method gets never called! > Obviously I'm injecting the session state and the ArticleListPage... > it seems a simple page... &g

Re: Setting a component property in another page

2006-03-28 Thread Mike Snare
e cycle) { >Item itemPage = >(Item) cycle.getPage("Item"); > >} > > Any further suggestions or do's or don't's? > > Thanks! > > Mike Snare wrote: > > >Doesn't it make more sense to set the value on t

Re: Doclet for Tapestry components & hivmind ?

2006-03-28 Thread Mike Snare
Not sure how he documents the components, but for the hivemodules he has an ant task to take all the hivemodule files and convert them to a single registry file which (I believe) he then converts using xsl. The ant task is available on the hivemind site and you can look at the maven.xml file to us

Re: Newbie editing object values in a simple form...

2006-03-28 Thread Mike Snare
Assuming that you are injecting the ArticleEditPage, try: ArticleEdit ap = getArticleEditPage(); ap.setArticle(a); return ap; I don't think the call to getArticleEditPage() is guaranteed to return the same instance every time if it's injected. Thus your 2 calls to it return 2 different objects.

Re: Condition to handle null in forms

2006-03-28 Thread Mike Snare
of a form, let's say additional information paragraphs. But if the > user had no additional information the array would have null elements. I am > suggesting it should have had one element representing "none". This is a bit > of a detour to the original question, but related

Re: Setting a component property in another page

2006-03-28 Thread Mike Snare
Doesn't it make more sense to set the value on the page and have the page deal with it however it needs to -- in this case by setting the id on the component in the page. It seems that the components used by a particular page are implementation details for that page that should not be exposed when

Re: Setting a component property in another page

2006-03-28 Thread Mike Snare
Are you trying to set a property of component that is contained within a page? How do you have any idea that the instance of ConversationInfoJwc you are getting is the one used by the ItemPage you are getting? I think you have to assume that it isn't. I think you need an ID setter on the ItemPag

Re: Condition to handle null in forms

2006-03-28 Thread Mike Snare
erUsefullName() > or getObjectUsefullName().getPropertyOtherUsefullName() as only one would > ensure the parent was instantiated correctly and non null for the property > call. With a large object graph this, of course, bearing in mind differences > between testing and production, was

Re: Condition to handle null in forms

2006-03-28 Thread Mike Snare
Another way is to use an accessor method in the container, e.g. getFOTitle(). Implementation as follows: public String getFOTitle() { FirstObject fo = getFirstObject(); if (fo != null) { return fo.getTitle(); } return ""; } It has the benefits of not needing to use the pageBeginRende

Re: Best Practice: Controlling Page Names

2006-03-27 Thread Mike Snare
It's probably six of one and half a dozen of the other, but I prefer to keep those type of String constants external to the 'thing' to which they refer -- vis a vis the page itself. The Page shouldn't necessarily know it's path, besides which what you're really trying to describe is the path to th

Re: Getting URL to Service?

2006-03-27 Thread Mike Snare
2&service=FileDownloadService > > but the editor keeps changing it to: > > ../?com.collegevitae.fileid=2&service=FileDownloadService > > I'm guessing friendly urls would fix this, but what's the best way to > create one? Or is there another method, I'm usi

Re: Getting URL to Service?

2006-03-27 Thread Mike Snare
Inject the service into your page from the page file: Then in your page class: ILink link = getMyService().getLink(true, someParameterObject). True == post, false = get. For the second argument, that's a contract between the caller of the service and the service itsself. You're free to defin

Re: configuring an IEngineService in Tap4

2006-03-26 Thread Mike Snare
, I guess I can relax and > know the answer is comming whenever I get it in the mail or something > . > > Thanks for your input on this > > Cosmin > > On 3/26/06, Mike Snare <[EMAIL PROTECTED]> wrote: > > I think you would serve yourself well to buy Kent's book

Re: configuring an IEngineService in Tap4

2006-03-26 Thread Mike Snare
r <[EMAIL PROTECTED]> wrote: > > > > Somehow that error dissapeared now , but I am getting something at the > > > > injection line . > > > > > > > > > > > > > > > > Error at context:/WEB-INF/tests/ServiceTest.page, line 20,

Re: Protected scope for OGNL calls ?

2006-03-26 Thread Mike Snare
@Tapestry Developers: The larger issue remains. Shouldn't tapestry be generating public accessors for protected members when it enhances a class? Seems natural. -Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Application State Objects and Hivemind...

2006-03-26 Thread Mike Snare
ttern=%p %t %c - %m%n > log4j.logger.org.apache.catalina=DEBUG, R > log4j.logger.org.apache.hivemind=DEBUG > > but in the module load section of hivemind I don't see com.mypackage > at all. > > > > Il giorno 26/mar/06, alle ore 18:23, Mike Snare ha scritto: > > > E

Re: configuring an IEngineService in Tap4

2006-03-26 Thread Mike Snare
> > > I think you want to use a literal: binding prefix on the value for service. What's happening is your expression 'pdfService' is an ognl expression that resolves to a call to getPdfService() on the class. It takes the resulting service and calls toString to generate t

Re: Protected scope for OGNL calls ?

2006-03-26 Thread Mike Snare
On 3/26/06, Adam Zimowski <[EMAIL PROTECTED]> wrote: > Well, maybe I'm wrong on this because this is only my first Tapestry > app (although large one), but from what I'm noticing is a common > generic patten. > > Most page methods are really specific to a given page. Seldom when you > inject one pa

Re: Application State Objects and Hivemind...

2006-03-26 Thread Mike Snare
Exactly. You need to set up log4j by placing an appropriate log4j.properties file in the classpath for the server. Since all you are trying to do is check to make sure the module is being loaded, I again propose contributing a simple primitive service to EagerLoad whose constructor contains a pri

Re: Protected scope for OGNL calls ?

2006-03-26 Thread Mike Snare
Sounds kind of like a design issue. If you really need to access it so badly from a non-subclass/non-package class, should it really be protected? -Mike On 3/26/06, Adam Zimowski <[EMAIL PROTECTED]> wrote: > Yeah, thanks, that's a valid workaround but... In fact the method > which I have is alr

Re: Application State Objects and Hivemind...

2006-03-26 Thread Mike Snare
ivemind... > > Yes it's in the classes directory... I don't understand what could be > wrong... my Home.html is: > > > > > value="ognl:currentMenu" element="li"> > value="ognl:

Re: Application State Objects and Hivemind...

2006-03-26 Thread Mike Snare
Hmm. Looks ok (but I don't use annotations, either). Are you sure that the hivemodule.xml file is being copied over to the classes directory? Check that. I find it easier (for webapps) to just drop it directly in the WEB-INF directory. Since you're typically running tomcat with the docBase poi

Re: Component Parameters

2006-03-26 Thread Mike Snare
Your addrline1 TextField is in your html, so you need to prefix the address.addrLine1 with an ognl: prefix. What seems odd though is that I would think it would display originally with the string literal "address.addrLine1" in the TextField, which you didn't mention. -Mike On 3/26/06, Ed Ross <[

Re: Once again OGNL in Tapestry *sigh*

2006-03-25 Thread Mike Snare
Yes, it means that tableRow is null. Where is title being used? it only makes sense to access the table row during iteration over the source collection. If it's not being used in a Block for the table I'm not sure you can do this. -Mike On 3/25/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: >

Re: configuring session paging with Table View

2006-03-25 Thread Mike Snare
x27;t think this would work for me if it's not > > On 3/24/06, Mike Snare <[EMAIL PROTECTED]> wrote: > > > > What does getEntries look like? If it goes to the database than it > > makes perfect sense. > > > > why not: > > > > public abstract C

Re: configuring session paging with Table View

2006-03-24 Thread Mike Snare
What does getEntries look like? If it goes to the database than it makes perfect sense. why not: public abstract Collection getCachedEntries(); public abstract void setCachedEntries(Collection col); public Collection getEntries { Collection cache = getCachedEntries(); if (cache == null) {

Re: Dynamic private assets

2006-03-24 Thread Mike Snare
ld inject a component in the same package and do the same. > > In fact, if you used an absolute path in getRelativeResource you could > inject *any* component in the classpath. > > Geoff > > On 3/24/06, Mike Snare <[EMAIL PROTECTED]> wrote: > > Yep. I'm using t

Re: Dynamic private assets

2006-03-24 Thread Mike Snare
Yep. I'm using the DefaultClassResolver in the current implementation (see the OP). The images folder is relative to the location of the component. If the component is in /com/components/MyComponent, then the images are all in /com/components/images. It seems that the ideal solution would be a

Re: Dynamic private assets

2006-03-24 Thread Mike Snare
We're all painfully aware of that, Spindle Guy... Sorry, couldn't resist! On 3/24/06, Geoff Longman <[EMAIL PROTECTED]> wrote: > Bad me. I'm still on T3. > > Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

Re: Show component inside an AbstractComponent

2006-03-24 Thread Mike Snare
It's probably easiest just to add it to the jwc file, but to be honest i don't know the answer... On 3/24/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: > On 24. Mär 2006 - 14:07:56, Mike Snare wrote: > | Not sure, but have you tried calling render on the component after you

  1   2   >