You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michael Echerer <me...@tngtech.com> on 2004/04/15 14:37:17 UTC
How to retrieve a property from .library spec file?
Hi,
maybe a trivial question, but I didn't find the right method yet.
I have put a service & some components into a library. I wrote a
library-specification file .libary where I also have some <property
name="defaultForSomething">something</property> entries.
How can I access this property from within the services service() method?
So far I only tried engine.getSpecification().getProperty(...) for properties in
.application. What's the trick for .library as I get null, if I try it this way?
Thx
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: How to retrieve a property from .library spec file?
Posted by Programozás <pr...@hotmail.com>.
Sorry, this wasn't an answer for your question :)
N.
----- Original Message -----
From: "Programozás" <pr...@hotmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, April 15, 2004 3:41 PM
Subject: Re: How to retrieve a property from .library spec file?
> AbstractEngine.getSpecification().getProperty() is not for this?
>
> Sorry if not, it's just a quick tip :)
> Norbi
>
> ----- Original Message -----
> From: "Michael Echerer" <me...@tngtech.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Thursday, April 15, 2004 3:35 PM
> Subject: Re: How to retrieve a property from .library spec file?
>
>
> > I found a "non-trivial", but working solution myself:
> >
> > String myProperty =
> engine.getSpecificationSource().getLibrarySpecification(new
> >
>
ClasspathResourceLocation(engine.getResourceResolver(),engine.getSpecificati
>
on().getLibrarySpecificationPath("myLibraryID"))).getProperty("myPropertyNam
> e");
> >
> > But is this really the only way to do it? Don't think so, but don't know
> > anything better.
> >
> > Any ideas?
> >
> > Greetings
> > Michael
> >
> > >
> > >
> > > Hi,
> > >
> > > maybe a trivial question, but I didn't find the right method yet.
> > >
> > > I have put a service & some components into a library. I wrote a
> > > library-specification file .libary where I also have some <property
> > > name="defaultForSomething">something</property> entries.
> > >
> > > How can I access this property from within the services service()
> method?
> > >
> > > So far I only tried engine.getSpecification().getProperty(...) for
> properties
> > > in
> > > .application. What's the trick for .library as I get null, if I try it
> this
> > > way?
> > >
> > > Thx
> > > Michael
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Need a "performValidation" flag on Submit and friends
Posted by Ezra Epstein <ee...@prajnait.com>.
How would that affect client-side scripting? That is where my problem lies.
> -----Original Message-----
> From: Bryan Lewis [mailto:bryan@maine.rr.com]
> Sent: Saturday, April 17, 2004 1:10 AM
> To: Tapestry users
> Subject: Re: Need a "performValidation" flag on Submit and friends
>
>
> Or let the Cancel button be a Submit with a listener method. It could
> set a skipValidation flag that could be checked in formSubmit().
>
>
> ----- Original Message -----
> From: "Ezra Epstein" <ee...@prajnait.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Friday, April 16, 2004 10:04 PM
> Subject: Need a "performValidation" flag on Submit and friends
>
>
> > Nice to see/have client-side form validation in Tapestry.
> >
> > Borrowing a page from .NET, it would be helpful if the various buttons
> that
> > currently trigger form validation had an attribute to turn this off:
> > something like triggersValidation="false" that way I can build a
> Cancel
> > button that looks just like the Submit button -- currently the
> work-around
> > is to use a link instead.
> >
> > == Ezra Epstein
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Need a "performValidation" flag on Submit and friends
Posted by Ezra Epstein <ee...@prajnait.com>.
uhhh, i don't think that would turn off client-side scripting though, which
is where the problem lies.
> -----Original Message-----
> From: Bryan Lewis [mailto:bryan@maine.rr.com]
> Sent: Saturday, April 17, 2004 1:10 AM
> To: Tapestry users
> Subject: Re: Need a "performValidation" flag on Submit and friends
>
>
> Or let the Cancel button be a Submit with a listener method. It could
> set a skipValidation flag that could be checked in formSubmit().
>
>
> ----- Original Message -----
> From: "Ezra Epstein" <ee...@prajnait.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Friday, April 16, 2004 10:04 PM
> Subject: Need a "performValidation" flag on Submit and friends
>
>
> > Nice to see/have client-side form validation in Tapestry.
> >
> > Borrowing a page from .NET, it would be helpful if the various buttons
> that
> > currently trigger form validation had an attribute to turn this off:
> > something like triggersValidation="false" that way I can build a
> Cancel
> > button that looks just like the Submit button -- currently the
> work-around
> > is to use a link instead.
> >
> > == Ezra Epstein
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Need a "performValidation" flag on Submit and friends
Posted by Bryan Lewis <br...@maine.rr.com>.
Or let the Cancel button be a Submit with a listener method. It could
set a skipValidation flag that could be checked in formSubmit().
----- Original Message -----
From: "Ezra Epstein" <ee...@prajnait.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, April 16, 2004 10:04 PM
Subject: Need a "performValidation" flag on Submit and friends
> Nice to see/have client-side form validation in Tapestry.
>
> Borrowing a page from .NET, it would be helpful if the various buttons
that
> currently trigger form validation had an attribute to turn this off:
> something like triggersValidation="false" that way I can build a
Cancel
> button that looks just like the Submit button -- currently the
work-around
> is to use a link instead.
>
> == Ezra Epstein
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Need a "performValidation" flag on Submit and friends
Posted by Ezra Epstein <ee...@prajnait.com>.
Nice to see/have client-side form validation in Tapestry.
Borrowing a page from .NET, it would be helpful if the various buttons that
currently trigger form validation had an attribute to turn this off:
something like triggersValidation="false" that way I can build a Cancel
button that looks just like the Submit button -- currently the work-around
is to use a link instead.
== Ezra Epstein
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: How to retrieve a property from .library spec file?
Posted by Programozás <pr...@hotmail.com>.
AbstractEngine.getSpecification().getProperty() is not for this?
Sorry if not, it's just a quick tip :)
Norbi
----- Original Message -----
From: "Michael Echerer" <me...@tngtech.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, April 15, 2004 3:35 PM
Subject: Re: How to retrieve a property from .library spec file?
> I found a "non-trivial", but working solution myself:
>
> String myProperty =
engine.getSpecificationSource().getLibrarySpecification(new
>
ClasspathResourceLocation(engine.getResourceResolver(),engine.getSpecificati
on().getLibrarySpecificationPath("myLibraryID"))).getProperty("myPropertyNam
e");
>
> But is this really the only way to do it? Don't think so, but don't know
> anything better.
>
> Any ideas?
>
> Greetings
> Michael
>
> >
> >
> > Hi,
> >
> > maybe a trivial question, but I didn't find the right method yet.
> >
> > I have put a service & some components into a library. I wrote a
> > library-specification file .libary where I also have some <property
> > name="defaultForSomething">something</property> entries.
> >
> > How can I access this property from within the services service()
method?
> >
> > So far I only tried engine.getSpecification().getProperty(...) for
properties
> > in
> > .application. What's the trick for .library as I get null, if I try it
this
> > way?
> >
> > Thx
> > Michael
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: How to retrieve a property from .library spec file?
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
As OGNL:
ognl:specification.namespace.getProperty("myPropertyName")
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Tapestry: Java Web Components
Creator, HiveMind
http://howardlewisship.com
> -----Original Message-----
> From: Michael Echerer [mailto:mech@tngtech.com]
> Sent: Thursday, April 15, 2004 9:35 AM
> To: Tapestry users
> Subject: Re: How to retrieve a property from .library spec file?
>
>
> I found a "non-trivial", but working solution myself:
>
> String myProperty =
> engine.getSpecificationSource().getLibrarySpecification(new
> ClasspathResourceLocation(engine.getResourceResolver(),engine.
getSpecification().getLibrarySpecificationPath> ("myLibraryID"))).getProperty("myPropertyName");
>
> But is this really the only way to do it? Don't think so, but
> don't know
> anything better.
>
> Any ideas?
>
> Greetings
> Michael
>
> >
> >
> > Hi,
> >
> > maybe a trivial question, but I didn't find the right method yet.
> >
> > I have put a service & some components into a library. I wrote a
> > library-specification file .libary where I also have some <property
> > name="defaultForSomething">something</property> entries.
> >
> > How can I access this property from within the services
> service() method?
> >
> > So far I only tried
> engine.getSpecification().getProperty(...) for properties
> > in
> > .application. What's the trick for .library as I get null,
> if I try it this
> > way?
> >
> > Thx
> > Michael
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: How to retrieve a property from .library spec file?
Posted by Michael Echerer <me...@tngtech.com>.
I found a "non-trivial", but working solution myself:
String myProperty = engine.getSpecificationSource().getLibrarySpecification(new
ClasspathResourceLocation(engine.getResourceResolver(),engine.getSpecification().getLibrarySpecificationPath("myLibraryID"))).getProperty("myPropertyName");
But is this really the only way to do it? Don't think so, but don't know
anything better.
Any ideas?
Greetings
Michael
>
>
> Hi,
>
> maybe a trivial question, but I didn't find the right method yet.
>
> I have put a service & some components into a library. I wrote a
> library-specification file .libary where I also have some <property
> name="defaultForSomething">something</property> entries.
>
> How can I access this property from within the services service() method?
>
> So far I only tried engine.getSpecification().getProperty(...) for properties
> in
> .application. What's the trick for .library as I get null, if I try it this
> way?
>
> Thx
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org