Re: ITemplateSourceDelegate

2006-10-31 Thread andyhot
I recently did the exact same thing and just saw your implementation...

Actually, I got a slightly better solution ;)

After finding the page class, you have to create a 'virtual' page spec.

The trick is to set its specificationLocation to be in the classpath,
right in
the package of the class you've found... Something like this:

String fullPath = pageClass.getName().replace('.', '/');
ClasspathResource virtualPage = new ClasspathResource(new
DefaultClassResolver(), fullPath + ".page");

and then

spec.setSpecificationLocation(virtualPage);

No need to create that asset




Pablo Ruggia wrote:
> Thank you very much, you save me many hours of work.
> I've modified your class so it try to find templates in the packages you
> define in "org.apache.tapestry.page-class-packages" configuration, and
> look
> it into classpath, so it has not have to be only in WEB-INF/classes.
> Here is the code and the hivemind configuration i've used to make it
> work:
>
> 
> 
>   service-id="tapestry.page.SpecificationResolverDelegate">
>  
>  
>   value="infrastructure:classFinder"/>
>  
>  
>  
> 
>
> package ar.com.example;
>
> import org.apache.hivemind.Location;
> import org.apache.hivemind.Resource;
> import org.apache.hivemind.impl.LocationImpl;
> import org.apache.tapestry.INamespace;
> import org.apache.tapestry.IRequestCycle;
> import org.apache.tapestry.resolver.ISpecificationResolverDelegate;
> import org.apache.tapestry.services.ClassFinder;
> import org.apache.tapestry.spec.AssetSpecification;
> import org.apache.tapestry.spec.ComponentSpecification;
> import org.apache.tapestry.spec.IComponentSpecification;
> import org.apache.tapestry.util.DescribedLocation;
>
> public class SpecificationResolverDelegate implements
>ISpecificationResolverDelegate {
>
>private ClassFinder clazzFinder;
>
>public ClassFinder getClazzFinder() {
>return clazzFinder;
>}
>
>public void setClazzFinder(ClassFinder clazzFinder) {
>this.clazzFinder = clazzFinder;
>}
>
>public IComponentSpecification findPageSpecification(IRequestCycle
> cycle,
>INamespace namespace, String simplePageName) {
>
>//first I try to find the page class
>String packages = namespace
>.getPropertyValue("org.apache.tapestry.page-class-packages
> ");
>
>String className = simplePageName.replace('/', '.');
>Class pageClass = getClazzFinder().findClass(packages, className);
>
>if (pageClass == null)
>return null;
>
>//very good, I've found the page class, so I have to create the
> specification
>IComponentSpecification spec = new ComponentSpecification();
>Resource namespaceResource = namespace.getSpecificationLocation();
>Resource componentResource = namespaceResource
>.getRelativeResource(simplePageName + ".page");
>Location location = new LocationImpl(componentResource);
>spec.setLocation(location);
>spec.setSpecificationLocation(componentResource);
>spec.setComponentClassName(pageClass.getName());
>
>//add the $template asset telling the framework where to look for
> the template
>AssetSpecification aspec = new AssetSpecification();
>aspec.setPath("classpath:/"
>+ pageClass.getPackage().getName().replace(".", "/") + "/"
>+ className + ".html");
>aspec.setLocation(new DescribedLocation(
>spec.getSpecificationLocation(), ""));
>spec.addAsset("$template", aspec);
>
>//return the specification
>return spec;
>
>}
>
>public IComponentSpecification findComponentSpecification(
>IRequestCycle cycle, INamespace namespace, String type) {
>return null;
>}
>
> }
>
>
>
>
> On 10/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> > Has someone a working example of an ITemplateSourceDelegate
>> > or or a PageSpecificationResolverImpl ? I can't find any.
>> > I only want to have a .class for each page and in the same
>> > package the html template. All .page configuration will be
>> > set using annotations.
>> > Thanks !!
>> >
>>
>> Here is ISpecificationResolverDelegate which I use in my project. It
>> allows
>> me to
>> 1. get rid of *.page files. Ionly need MyPage.html and MyPage.class
>> 2. store both MyPage.html and MyPage.class in the same location ( in my
>> case
>> it's WEB_INF\classes\com\Mycompany\page\ )
>> 3. use getPage( "com.mycompany.MyPage" )
>> 4. get rid of 
>> in my
>> .application file
>>
>> Hope this helps.
>>
>> import org.apache.hivemind.Resource;
>> import org.apache.hivemind.impl.LocationImpl;
>> import org.apache.tapestry.INamespace;
>> import org.apache.tapestry.IRequestCycle;
>> import org.apache.tapestry.resolver.ISpecificationResolverDelegate;
>> import org.apache.tapestry.spec.ComponentSpecification;
>> import org.apache.tapestry.spec.IComponentSpecification;
>>
>> pub

Re: How to custom the script event.

2006-10-31 Thread Jesse Kuhnert

dojo.event.connect("after", dojo, "onload",function(){}) ?

On 10/31/06, Jun Tsai <[EMAIL PROTECTED]> wrote:


I want to do something after "dojo.onload".
not in dojo.onload.


2006/11/1, Jesse Kuhnert <[EMAIL PROTECTED]>:
>
> Either ;
>
> dojo.addOnLoad(function(){
> // your script
> });
>
> Or use the  block of a @Script template.
>
> On 10/31/06, Jun Tsai <[EMAIL PROTECTED]> wrote:
> >
> > How  to execute some script after "dojo.onload"?
> > Thanks.
> >
> > 2006/10/27, Jesse Kuhnert <[EMAIL PROTECTED]>:
> > >
> > > You can override portions of
> > > org.apache.tapestry.services.impl.DefaultResponseBuilder to bind
> window
> > > loading things they way you want.
> > >
> > > Really the window loading stuff happens with dojo.addOnLoad() in the
> > > current
> > > repo though.
> > >
> > > On 10/26/06, Jun Tsai <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I find tapestry produce the script
> > > >
> > > > dojo.event.connect(window, 'onload', function(e) {
> > > >   dojo.require("tapestry.form
");tapestry.form.registerForm("AForm");
> > > > 
> > > > });
> > > >
> > > >
> > > > I want to do something after onload.but I find
> > > > dojo.event.connect("after",window,'onload',this,"testFun"));
> > > >
> > > > I find my testFun function called before tapestry onload function.
> > > >
> > > > If I change tapestry onload as
> > > > dojo.event.connect("before",window, 'onload', function(e) {
> > > >
> > > >dojo.require("tapestry.form
> ");tapestry.form.registerForm("AForm");
> > > > 
> > > > });
> > > >
> > > > works fine.
> > > >
> > > > How to custome this?
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Welcome to China Java Users Group(CNJUG).
> > > > http://cnjug.dev.java.net
> > > >
> > > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > >
> > >
> >
> >
> > --
> > Welcome to China Java Users Group(CNJUG).
> > http://cnjug.dev.java.net
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>


--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net





--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com


Re: How to custom the script event.

2006-10-31 Thread Jun Tsai

I want to do something after "dojo.onload".
not in dojo.onload.


2006/11/1, Jesse Kuhnert <[EMAIL PROTECTED]>:


Either ;

dojo.addOnLoad(function(){
// your script
});

Or use the  block of a @Script template.

On 10/31/06, Jun Tsai <[EMAIL PROTECTED]> wrote:
>
> How  to execute some script after "dojo.onload"?
> Thanks.
>
> 2006/10/27, Jesse Kuhnert <[EMAIL PROTECTED]>:
> >
> > You can override portions of
> > org.apache.tapestry.services.impl.DefaultResponseBuilder to bind
window
> > loading things they way you want.
> >
> > Really the window loading stuff happens with dojo.addOnLoad() in the
> > current
> > repo though.
> >
> > On 10/26/06, Jun Tsai <[EMAIL PROTECTED]> wrote:
> > >
> > > I find tapestry produce the script
> > >
> > > dojo.event.connect(window, 'onload', function(e) {
> > >   dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
> > > 
> > > });
> > >
> > >
> > > I want to do something after onload.but I find
> > > dojo.event.connect("after",window,'onload',this,"testFun"));
> > >
> > > I find my testFun function called before tapestry onload function.
> > >
> > > If I change tapestry onload as
> > > dojo.event.connect("before",window, 'onload', function(e) {
> > >
> > >dojo.require("tapestry.form
");tapestry.form.registerForm("AForm");
> > > 
> > > });
> > >
> > > works fine.
> > >
> > > How to custome this?
> > >
> > >
> > >
> > >
> > > --
> > > Welcome to China Java Users Group(CNJUG).
> > > http://cnjug.dev.java.net
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
>
>
> --
> Welcome to China Java Users Group(CNJUG).
> http://cnjug.dev.java.net
>
>


--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com





--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net


Re: Line precise error reporting redirecting

2006-10-31 Thread Howard Lewis Ship

This should work in Tapestry 3.  In Tapestry 4, the correct way is to
provide an override of the ExceptionPresenter service (or to provide an
override of the Exception page).

http://tapestry.apache.org/tapestry4/tapestry/hivedocs/service/tapestry.error.ExceptionPresenter.html

On 10/31/06, Mark Stang <[EMAIL PROTECTED]> wrote:


Is this done the same in 3.x or different, if different, how is it
done?  We would like to display a simple page and then log the stack
trace...

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-Original Message-
From: Jabbar [mailto:[EMAIL PROTECTED]
Sent: Tue 10/31/2006 12:51 PM
To: Tapestry users
Subject: Re: Line precise error reporting redirecting

Used the source ..

Added the following to MyExceptionPage

 public abstract void setExceptions(ExceptionDescription[]
exceptions);


public void setException(Throwable value)
{
ExceptionAnalyzer analyzer = new ExceptionAnalyzer();

ExceptionDescription[] exceptions = analyzer.analyze(value);

setExceptions(exceptions);
}

On 31/10/06, Jabbar <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I want to catch the line precise exception page and redirect to one of
> my own pages.
>
> To do this all I need to add is
> 
> to .application
>
> Once I've gone to my own exception page how do I get hold of the stack
trace ?
>
> --
> Thanks
>
>  A Jabbar Azam
>


--
Thanks

A Jabbar Azam

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







--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com


Re: How to custom the script event.

2006-10-31 Thread Jesse Kuhnert

Either ;

dojo.addOnLoad(function(){
// your script
});

Or use the  block of a @Script template.

On 10/31/06, Jun Tsai <[EMAIL PROTECTED]> wrote:


How  to execute some script after "dojo.onload"?
Thanks.

2006/10/27, Jesse Kuhnert <[EMAIL PROTECTED]>:
>
> You can override portions of
> org.apache.tapestry.services.impl.DefaultResponseBuilder to bind window
> loading things they way you want.
>
> Really the window loading stuff happens with dojo.addOnLoad() in the
> current
> repo though.
>
> On 10/26/06, Jun Tsai <[EMAIL PROTECTED]> wrote:
> >
> > I find tapestry produce the script
> >
> > dojo.event.connect(window, 'onload', function(e) {
> >   dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
> > 
> > });
> >
> >
> > I want to do something after onload.but I find
> > dojo.event.connect("after",window,'onload',this,"testFun"));
> >
> > I find my testFun function called before tapestry onload function.
> >
> > If I change tapestry onload as
> > dojo.event.connect("before",window, 'onload', function(e) {
> >
> >dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
> > 
> > });
> >
> > works fine.
> >
> > How to custome this?
> >
> >
> >
> >
> > --
> > Welcome to China Java Users Group(CNJUG).
> > http://cnjug.dev.java.net
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>


--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net





--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com


Re: How to custom the script event.

2006-10-31 Thread Jun Tsai

How  to execute some script after "dojo.onload"?
Thanks.

2006/10/27, Jesse Kuhnert <[EMAIL PROTECTED]>:


You can override portions of
org.apache.tapestry.services.impl.DefaultResponseBuilder to bind window
loading things they way you want.

Really the window loading stuff happens with dojo.addOnLoad() in the
current
repo though.

On 10/26/06, Jun Tsai <[EMAIL PROTECTED]> wrote:
>
> I find tapestry produce the script
>
> dojo.event.connect(window, 'onload', function(e) {
>   dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
> 
> });
>
>
> I want to do something after onload.but I find
> dojo.event.connect("after",window,'onload',this,"testFun"));
>
> I find my testFun function called before tapestry onload function.
>
> If I change tapestry onload as
> dojo.event.connect("before",window, 'onload', function(e) {
>
>dojo.require("tapestry.form");tapestry.form.registerForm("AForm");
> 
> });
>
> works fine.
>
> How to custome this?
>
>
>
>
> --
> Welcome to China Java Users Group(CNJUG).
> http://cnjug.dev.java.net
>
>


--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com





--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net


Problem on Nested Body component

2006-10-31 Thread wong wayne
Hello all

I'm developing a system which using tapestry v3.03. I
have some problem on Rollover & directLink component.
When I using directLink to redirect a page - a static
html page(actually is render the page in a page
border), it works fine but when i added Rollover
component, it need include into Body component and
caused "Body components may not be nested". More than
one Body component added, is any convenient way to
remove the Body component when it exist more than one
time? Please comment, thanks.

regards

wayne


 

Access over 1 million songs - Yahoo! Music Unlimited 
(http://music.yahoo.com/unlimited)


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



Re: links in a table

2006-10-31 Thread ra



Daniel Jue wrote:
> 
> Hi,
> 
> Perhaps I am not understanding your situation or perhaps my example
> failed to stimulate your creativity. ;-)
> 
> If you don't know the class, at the minumum the class should implement
> something that will spit out the column names, and the way to get the
> elements of each row.
> 
> For instance, if your model classes all implemented a method that gave
> the Contrib table the column metadata it was looking for, it could
> return a runtime generated string that looks like this:
> 
> "data0:ID:getUserDetails('USERGUID'),data1:Email:getUserDetails('EMAIL'),data2:First
>  Name:getUserDetails('FIRSTNAME'),data3:Last
> Name:getUserDetails('LASTNAME')";
> 
> 

My English is not perfect can be I don't understand your ideas well.
The above string I can generate ok. But in the html template I have to use
data0, data1 to override the column body but I don't know number of columns
It's kind of generic search component. Lets say the class name is a
parameter here. Based on additional class's properties attributies criteria
form is generated (not all properties are shown). Next after search button
is clicked page with results is shown as links (again not all columns are
shown). If you click on a link you are redirected to the requsted page. If
somebody knows peoplesoft it's more or less copied idea. I write except
result page. Eventually I can render results in the for loop

-- 
View this message in context: 
http://www.nabble.com/links-in-a-table-tf2548557.html#a7105296
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: links in a table

2006-10-31 Thread Daniel Jue

I would recommend Kent Tong's book.  It's more of an advanced tutorial
than a book.  If I didn't have it, I would not be programming in
Tapestry at all.  And it was like $20US for the PDF.  BTW, the pdf is
better since you can copy and paste the code, and search for examples
much quicker.  Plus I can keep it on my thumb drive to use where-ever.

Are you using the Contrib Table?  Or are you trying to roll your own?
The book covers both, but I really like taking advantage of the
Contrib Table's features.

I am still a Tapestry novice myself, and I reference that book everyday.

Dan

On 10/31/06, ra <[EMAIL PROTECTED]> wrote:



Ok. and how can I construct the url to a page ? The page name is known.
Sorry I'm a novice

Regards,
Arek



andyhot wrote:
>
> ok, so generate the String returned by getTableColumns()
> at runtime...
>
>
>
> ra wrote:
>>
>> Daniel Jue wrote:
>>
>>> I recently found a solution due to some help on this mailing list.
>>>
>>> Here's what we came up with.  It displays a table of people, and the
>>> extent of people details are not known until runtime (i.e. should we
>>> display the first name, last name, email, etc)
>>>
>>> In the page file:
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> In your class for that page have this method:
>>>
>>> public String getTableColumns()
>>> {
>>>//For reference
>>>//Column id:Column Title:ognl expression
>>>//value="literal:id, firstName:First name:name.firstName,
>>>//  lastName:name.lastName, telNo"/>
>>>
>>>return
>>> 
"data0:ID:getUserDetails('USERGUID'),data1:Email:getUserDetails('EMAIL'),data2:First
>>> Name:getUserDetails('FIRSTNAME'),data3:Last
>>> Name:getUserDetails('LASTNAME')";
>>>
>>>
>>
>> Sorry it doesn't help. As I wrote I don't know column names at
>> development
>> time. I don't know even the class name because model is created during
>> runtime. I can give more details if it's not clear
>>
>>
>>
>
>
> --
> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
View this message in context: 
http://www.nabble.com/links-in-a-table-tf2548557.html#a7104908
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]



Re: links in a table

2006-10-31 Thread Daniel Jue

Hi,

Perhaps I am not understanding your situation or perhaps my example
failed to stimulate your creativity. ;-)

If you don't know the class, at the minumum the class should implement
something that will spit out the column names, and the way to get the
elements of each row.

For instance, if your model classes all implemented a method that gave
the Contrib table the column metadata it was looking for, it could
return a runtime generated string that looks like this:

"data0:ID:getUserDetails('USERGUID'),data1:Email:getUserDetails('EMAIL'),data2:First
Name:getUserDetails('FIRSTNAME'),data3:Last
Name:getUserDetails('LASTNAME')";

Or more abstractly, the string above is 3 of these, one for each column of data:

"RowIdentifierForTheLoopToReference" + ":"+
"commonMethodForGettingColumnDisplayName()" +":" +
"commonMethodForGettingDataValue()"

The "RowIdentifierForTheLoopToReference" can be anything string, like "cat".
The table will increment the name for each row (row 8 would be "cat8")



So your data model class might have something like this?

Public Abstract Class DataModelBaseClass
{
public String GetStringForContribTableColNames();
public Object GetData(String ColName);
}

I am out of coffee, so I'm going home now.  Good luck!

Dan

On 10/31/06, ra <[EMAIL PROTECTED]> wrote:




Daniel Jue wrote:
>
> I recently found a solution due to some help on this mailing list.
>
> Here's what we came up with.  It displays a table of people, and the
> extent of people details are not known until runtime (i.e. should we
> display the first name, last name, email, etc)
>
> In the page file:
>
> 
> 
> 
> 
> 
> 
>
> In your class for that page have this method:
>
> public String getTableColumns()
> {
>//For reference
>//Column id:Column Title:ognl expression
>//value="literal:id, firstName:First name:name.firstName,
>//  lastName:name.lastName, telNo"/>
>
>return
> 
"data0:ID:getUserDetails('USERGUID'),data1:Email:getUserDetails('EMAIL'),data2:First
> Name:getUserDetails('FIRSTNAME'),data3:Last
> Name:getUserDetails('LASTNAME')";
>

Sorry it doesn't help. As I wrote I don't know column names at development
time. I don't know even the class name because model is created during
runtime. I can give more details if it's not clear


--
View this message in context: 
http://www.nabble.com/links-in-a-table-tf2548557.html#a7104516
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]



Re: links in a table

2006-10-31 Thread ra


Ok. and how can I construct the url to a page ? The page name is known.
Sorry I'm a novice

Regards,
Arek



andyhot wrote:
> 
> ok, so generate the String returned by getTableColumns()
> at runtime...
> 
> 
> 
> ra wrote:
>>
>> Daniel Jue wrote:
>>   
>>> I recently found a solution due to some help on this mailing list.
>>>
>>> Here's what we came up with.  It displays a table of people, and the
>>> extent of people details are not known until runtime (i.e. should we
>>> display the first name, last name, email, etc)
>>>
>>> In the page file:
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> In your class for that page have this method:
>>>
>>> public String getTableColumns()
>>> {   
>>>//For reference
>>>//Column id:Column Title:ognl expression
>>>//value="literal:id, firstName:First name:name.firstName,
>>>//  lastName:name.lastName, telNo"/>
>>>
>>>return
>>> "data0:ID:getUserDetails('USERGUID'),data1:Email:getUserDetails('EMAIL'),data2:First
>>> Name:getUserDetails('FIRSTNAME'),data3:Last
>>> Name:getUserDetails('LASTNAME')";
>>>
>>> 
>>
>> Sorry it doesn't help. As I wrote I don't know column names at
>> development
>> time. I don't know even the class name because model is created during
>> runtime. I can give more details if it's not clear
>>
>>
>>   
> 
> 
> -- 
> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/links-in-a-table-tf2548557.html#a7104908
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: links in a table

2006-10-31 Thread andyhot
ok, so generate the String returned by getTableColumns()
at runtime...



ra wrote:
>
> Daniel Jue wrote:
>   
>> I recently found a solution due to some help on this mailing list.
>>
>> Here's what we came up with.  It displays a table of people, and the
>> extent of people details are not known until runtime (i.e. should we
>> display the first name, last name, email, etc)
>>
>> In the page file:
>>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> In your class for that page have this method:
>>
>> public String getTableColumns()
>> {
>>//For reference
>>//Column id:Column Title:ognl expression
>>//value="literal:id, firstName:First name:name.firstName,
>>//  lastName:name.lastName, telNo"/>
>>
>>return
>> "data0:ID:getUserDetails('USERGUID'),data1:Email:getUserDetails('EMAIL'),data2:First
>> Name:getUserDetails('FIRSTNAME'),data3:Last
>> Name:getUserDetails('LASTNAME')";
>>
>> 
>
> Sorry it doesn't help. As I wrote I don't know column names at development
> time. I don't know even the class name because model is created during
> runtime. I can give more details if it's not clear
>
>
>   


-- 
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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



Re: links in a table

2006-10-31 Thread ra



Daniel Jue wrote:
> 
> I recently found a solution due to some help on this mailing list.
> 
> Here's what we came up with.  It displays a table of people, and the
> extent of people details are not known until runtime (i.e. should we
> display the first name, last name, email, etc)
> 
> In the page file:
> 
> 
> 
> 
> 
> 
> 
> 
> In your class for that page have this method:
> 
> public String getTableColumns()
> { 
>//For reference
>//Column id:Column Title:ognl expression
>//value="literal:id, firstName:First name:name.firstName,
>//  lastName:name.lastName, telNo"/>
> 
>return
> "data0:ID:getUserDetails('USERGUID'),data1:Email:getUserDetails('EMAIL'),data2:First
> Name:getUserDetails('FIRSTNAME'),data3:Last
> Name:getUserDetails('LASTNAME')";
> 

Sorry it doesn't help. As I wrote I don't know column names at development
time. I don't know even the class name because model is created during
runtime. I can give more details if it's not clear


-- 
View this message in context: 
http://www.nabble.com/links-in-a-table-tf2548557.html#a7104516
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: ANN: tacos 4.0.1 released

2006-10-31 Thread andyhot
andyhot wrote:
> edward pedersson wrote:
>   
>>  Well done on the new release. Thanks for keeping tacos up and running
>> and
>> providing very useful components.
>>
>> Just one question, is this below documented? I would like to define my
>> own
>> exception and stale-session pages.
>> 

see
http://tacos.sourceforge.net/faq.html#faq-N100BE




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



Re: links in a table

2006-10-31 Thread Daniel Jue

I recently found a solution due to some help on this mailing list.

Here's what we came up with.  It displays a table of people, and the
extent of people details are not known until runtime (i.e. should we
display the first name, last name, email, etc)

In the page file:

   
   
   
   
   
   

In your class for that page have this method:

public String getTableColumns()
{   
  //For reference
  //Column id:Column Title:ognl expression
  //value="literal:id, firstName:First name:name.firstName,
  //  lastName:name.lastName, telNo"/>

  return 
"data0:ID:getUserDetails('USERGUID'),data1:Email:getUserDetails('EMAIL'),data2:First
Name:getUserDetails('FIRSTNAME'),data3:Last
Name:getUserDetails('LASTNAME')";
}

As you can see, the string that defines the columns, along this their
display names and "ID"s for the loop, can be generated at runtime.  I
thought that was really nifty.

As for the links, lets say you wanted the links to be on the user's email.


Add this to the page file:


   
   
   



   


Note that getUserDetails() is my own function that a User object
posesses.  It just provides a way to look up details stored in a Map
object.  I'm using the db column names as the keys for the data.

Now my html looks like this:


idemail
1
 

[EMAIL PROTECTED]

 




Back in the page Class, you'll need a listener and the page you want to return:

@InjectPage("ShowDetails")
public abstract ShowDetails getUserDetailsPage();

public ShowUserDetails onShowDetails(String email) {
  System.out.println("Showing details for " + email);
  getUserDetailsPage().setViewUserWithEmail(email);
  return getUserDetailsPage();
}



Hope this helps.

Dan

On 10/31/06, ra <[EMAIL PROTECTED]> wrote:


I'd like display links in a table, but ... column names are unknown at the
development time

I'm new to tapestry and don't what is the best solution.
What I found is I can override method getValueRender in i.e.
SimpleTableRenderer and return somehow PageLink instance but it's abstract
class and have no idea how to do it
--
View this message in context: 
http://www.nabble.com/links-in-a-table-tf2548557.html#a7103183
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]



links in a table

2006-10-31 Thread ra

I'd like display links in a table, but ... column names are unknown at the
development time

I'm new to tapestry and don't what is the best solution.
What I found is I can override method getValueRender in i.e.
SimpleTableRenderer and return somehow PageLink instance but it's abstract
class and have no idea how to do it
-- 
View this message in context: 
http://www.nabble.com/links-in-a-table-tf2548557.html#a7103183
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: Line precise error reporting redirecting

2006-10-31 Thread Mark Stang
Is this done the same in 3.x or different, if different, how is it done?  We 
would like to display a simple page and then log the stack trace...

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-Original Message-
From: Jabbar [mailto:[EMAIL PROTECTED]
Sent: Tue 10/31/2006 12:51 PM
To: Tapestry users
Subject: Re: Line precise error reporting redirecting
 
Used the source ..

Added the following to MyExceptionPage

 public abstract void setExceptions(ExceptionDescription[] exceptions);


public void setException(Throwable value)
{
ExceptionAnalyzer analyzer = new ExceptionAnalyzer();

ExceptionDescription[] exceptions = analyzer.analyze(value);

setExceptions(exceptions);
}

On 31/10/06, Jabbar <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I want to catch the line precise exception page and redirect to one of
> my own pages.
>
> To do this all I need to add is
> 
> to .application
>
> Once I've gone to my own exception page how do I get hold of the stack trace ?
>
> --
> Thanks
>
>  A Jabbar Azam
>


-- 
Thanks

 A Jabbar Azam

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




Re: Line precise error reporting redirecting

2006-10-31 Thread Jabbar

Used the source ..

Added the following to MyExceptionPage

 public abstract void setExceptions(ExceptionDescription[] exceptions);


   public void setException(Throwable value)
   {
   ExceptionAnalyzer analyzer = new ExceptionAnalyzer();

   ExceptionDescription[] exceptions = analyzer.analyze(value);

   setExceptions(exceptions);
   }

On 31/10/06, Jabbar <[EMAIL PROTECTED]> wrote:

Hello all,

I want to catch the line precise exception page and redirect to one of
my own pages.

To do this all I need to add is

to .application

Once I've gone to my own exception page how do I get hold of the stack trace ?

--
Thanks

 A Jabbar Azam




--
Thanks

A Jabbar Azam

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



Re: Optimizing dojo and the tapestry js source code

2006-10-31 Thread Josh Long

Sounds good so far! Thatll good to know.. what would building/baking the
tapestry files into dojo.js or some file where its compressed look  like?

That is, i have the tapestry head on disk and im in /js/ and i see tapestry,
dojo, and a few other directories. i also see a tapestry profile .js -- how
would i use that setup to get a build with tapestry.namespace, and
tapestry.* etc... I know what to do to get a dojo build from head to produce
a custom profile... what's it look like iwth the tapestry js files baked in?
What do i modify? What's the equivalent of ant -Dprofile=foo release
compress in the tapestry tree with the tapestry packages baked in?

Thanks,

Josh

On 10/31/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:


Oh..And don't forget the "intern-strings" ant build option. That will
embed
the templates/css into the main dojo.js file as well.

On 10/31/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
>
> The dojo build system can compress its own and your (or tapestry) js
> packages all into one file. You'll probably have to dig around in
> manual.dojotoolkit.org to find more.
>
> When you are really getting serious about optimizations though I would
> check out the jslinker provided with dojo as well. It will condense your
js
> into ~exactly~ only the functions/code your app uses. I haven't actually
run
> it myself but I know Andy has.
>
>
>
> On 10/31/06, Josh Long <[EMAIL PROTECTED]> wrote:
> >
> > I'm experiencing a ridiculous slow down in speed on a front page
because
> > the
> > initial page uses a few widgets whcih themselves use other dojo
> > packages,
> > few of which are included in the default dojo.js that comes bundled
with
> >
> > tapestry. So, i built a dojo.js equivalent to te kitchen sink build
with
> > a
> > few extra packages (dojo.dom, dojo.regexp, and more are a few packages
i
> > added for good measure.. anyway, this has worked out pretty well thus
> > far:
> > the front page loads all  of the code from dojo/* in one js file
(well,
> > i do
> > see two xmlhttp requests for the templates of a few widgets, of
course,
> > but
> > everything else is readily available.) instead of in 40 seperate, non
> > compressed, header-incurring requests.
> >
> > I have the tapestry source code checked out and have one more thing i
> > want
> > to do but im not sure what the right mechanism is: how do i get all
the
> > tapestry packages to be in one fle that i can load manually like i do
> > dojo.js? that way id have only two files that i could tune
individually
> > that
> > load the code specific to my app and theyd all be cacheable (ie, not
> > paged
> > trough xmlhttp, which is a problem fr example in FF pre 1.5 . .) .js
> > files and
> > theyd all require only one round trip and no headers.. we have pretty
> > bad
> > latency are really looking to streamline individual requests to the
> > server.
> >
> > Any help would definitely be appreciated...
> >
> > thanks,
> >
> > Josh
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com




--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com




Tree and Table Component

2006-10-31 Thread tux4ever

Dear users!

I hope you can give me some hints to realize the following requirement. We
want to implement a tree table including custom components. Please have a
look a the screenshot to see what I mean;-)
The header should include some fields and if you click on the "+" symbol a
detailed overview is shown. All fields in the list should be editable.

Please give me some advice to develop this feature or can explain a design
pattern to implement the desired feature.

Best regards,

Gerry http://www.nabble.com/file/3931/ScreenShot.jpg 
-- 
View this message in context: 
http://www.nabble.com/Tree-and-Table-Component-tf2547715.html#a7100515
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Line precise error reporting redirecting

2006-10-31 Thread Jabbar

Hello all,

I want to catch the line precise exception page and redirect to one of
my own pages.

To do this all I need to add is

to .application

Once I've gone to my own exception page how do I get hold of the stack trace ?

--
Thanks

A Jabbar Azam

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



Component won't remember value

2006-10-31 Thread Gurps

I have 2 pages. A Home.html and a Result.html.
I have 1 component (SearchComponent) which is to be SHARED across both
pages. The component is a simple textfield.

When submitting a value in the first page, it then goes to the result page.
However the component don't remember it's value the first time. On
subsequent submits it remembers it (probably because you stay on the reult
page behind the scenes).

Does anyone have any idea what to do? Much appreciated. Here is the simple
code:

Home.java
---
package uk.co.gd.dao;

import org.apache.tapestry.html.BasePage;

public abstract class Home extends BasePage {
}


Home.page
---

http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>






Home.html








Result.java

package uk.co.gd.dao;

import org.apache.tapestry.html.BasePage;

public abstract class Result extends BasePage {
public abstract void setSearchText(String searchText);
}



Result.page
--

http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>






Result.html



you entered: 




SearchComponent.java
-
package uk.co.gd.dao;

import org.apache.tapestry.BaseComponent;
import org.apache.tapestry.IPage;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.annotations.InitialValue;
import org.apache.tapestry.annotations.InjectPage;

public abstract class SearchComponent extends BaseComponent {

@InjectPage("Result")
public abstract Result getResultPage();

@InitialValue("literal:")
public abstract String getSearchText();

public IPage onOk(IRequestCycle cycle) {
System.out.println(new java.util.Date() + ": over here 
SearchComponent: "
+ getSearchText());

if (cycle.isRewinding())
System.out.println(new java.util.Date() + ": over here 
SearchComponent:
rewinding");
else
System.out.println(new java.util.Date() + ": over here 
SearchComponent:
not rewinding");

Result resultPage = getResultPage();
resultPage.setSearchText(getSearchText());
return resultPage;
}
}


SearchComponent.jwc


http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>














SearchComponent.html










-- 
View this message in context: 
http://www.nabble.com/Component-won%27t-remember-value-tf2547494.html#a7099616
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: ANN: tacos 4.0.1 released

2006-10-31 Thread andyhot
edward pedersson wrote:
>  Well done on the new release. Thanks for keeping tacos up and running
> and
> providing very useful components.
>
> Just one question, is this below documented? I would like to define my
> own
> exception and stale-session pages.


I planned to document this in the FAQ
http://tacos.sourceforge.net/faq.html

it'll be up in a few moments, thx for reminding...


>
>>> Easier way for defining ajax exception and stale-session pages.
>
>
>
> On 31/10/06, Peter Beshai <[EMAIL PROTECTED]> wrote:
>>
>> Tacos looks delicious. I noticed on the main page it says, "Most
>> development
>> efforts will now be shifted to converting the Ant-based build system to
>> Maven2. A version compatible with Tapestry 4.1.x will then follow." Is
>> there
>> any update you can give us on how the work is coming for Tapestry 4.1
>> (if
>> any at all)? Maybe an estimation of when it will be available?
>>
>> That would be great! I'd love to use the Tacos library, but I'm
>> running a
>> 4.1.1 app.
>>
>> Anyway, I'm very glad to see work is being done on tacos :-)!
>>
>> Peter Beshai
>>
>>
>> >From: andyhot <[EMAIL PROTECTED]>
>> >Reply-To: "Tapestry users" 
>> >To: Tapestry users 
>> >Subject: ANN: tacos 4.0.1 released
>> >Date: Mon, 30 Oct 2006 18:56:05 +0200
>> >
>> >*Tacos 4.0.1 was released a few hours ago.
>> >
>> >It's mainly a stability release fixing 2 subtle bugs and
>> >enhancing the ajax encoder (for very pretty and short ajax urls).
>> >
>> >Make sure to also check out the previously undocumented but powerful
>> >ajax-enabled Table component.
>> >
>> >Thanks to all that contributed...
>> >
>> >Changes:*
>> > * Docs for tacos:Table component.
>> > * Load external js synchronously. Fixes Bug127.
>> > * AjaxSubmit posts all the AjaxLinkSubmits before it. Fixes
>> Bug130.
>> > * Do not clear current document after error (a failed ajax-post).
>> > * Jdk1.4 compatible class format for maven generated artifacts.
>> > * Add StringToListConverter. Allows updateComponents parameter
>> to be
>> >specified as a comma-delimited String.
>> > * Add uniqueNames parameter in AjaxForm - forces the html name of
>> each
>> >input control to stem from the component's idPath (instead of the
>> >component's id).
>> > * Support validators and translator in HtmlArea. Fixes Bug128.
>> > * Make buttons in tacos:Palette work. Fixes Bug129.
>> > * Remove hardcoded class attribute from tacos:Table.
>> > * Easier way for defining ajax exception and stale-session pages.
>> > * Enhance AjaxDirectServiceEncoder for ever prettier ajax urls.
>> > * Corrected links to tapestry's component docs.
>> >
>> >--
>> >Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
>> >Tapestry / Tacos developer
>> >Open Source / J2EE Consulting
>> >
>> >
>> >-
>> >To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>>
>> _
>> Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger
>> http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>


-- 
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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



Re: Optimizing dojo and the tapestry js source code

2006-10-31 Thread Jesse Kuhnert

The dojo build system can compress its own and your (or tapestry) js
packages all into one file. You'll probably have to dig around in
manual.dojotoolkit.org to find more.

When you are really getting serious about optimizations though I would check
out the jslinker provided with dojo as well. It will condense your js into
~exactly~ only the functions/code your app uses. I haven't actually run it
myself but I know Andy has.



On 10/31/06, Josh Long <[EMAIL PROTECTED]> wrote:


I'm experiencing a ridiculous slow down in speed on a front page because
the
initial page uses a few widgets whcih themselves use other dojo packages,
few of which are included in the default dojo.js that comes bundled with
tapestry. So, i built a dojo.js equivalent to te kitchen sink build with a
few extra packages (dojo.dom, dojo.regexp, and more are a few packages i
added for good measure.. anyway, this has worked out pretty well thus far:

the front page loads all  of the code from dojo/* in one js file (well, i
do
see two xmlhttp requests for the templates of a few widgets, of course,
but
everything else is readily available.) instead of in 40 seperate, non
compressed, header-incurring requests.

I have the tapestry source code checked out and have one more thing i want
to do but im not sure what the right mechanism is: how do i get all the
tapestry packages to be in one fle that i can load manually like i do
dojo.js? that way id have only two files that i could tune individually
that
load the code specific to my app and theyd all be cacheable (ie, not paged
trough xmlhttp, which is a problem fr example in FF pre 1.5. .) .js files
and
theyd all require only one round trip and no headers.. we have pretty bad
latency are really looking to streamline individual requests to the
server.

Any help would definitely be appreciated...

thanks,

Josh





--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com


Re: Optimizing dojo and the tapestry js source code

2006-10-31 Thread Jesse Kuhnert

Oh..And don't forget the "intern-strings" ant build option. That will embed
the templates/css into the main dojo.js file as well.

On 10/31/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:


The dojo build system can compress its own and your (or tapestry) js
packages all into one file. You'll probably have to dig around in
manual.dojotoolkit.org to find more.

When you are really getting serious about optimizations though I would
check out the jslinker provided with dojo as well. It will condense your js
into ~exactly~ only the functions/code your app uses. I haven't actually run
it myself but I know Andy has.



On 10/31/06, Josh Long <[EMAIL PROTECTED]> wrote:
>
> I'm experiencing a ridiculous slow down in speed on a front page because
> the
> initial page uses a few widgets whcih themselves use other dojo
> packages,
> few of which are included in the default dojo.js that comes bundled with
>
> tapestry. So, i built a dojo.js equivalent to te kitchen sink build with
> a
> few extra packages (dojo.dom, dojo.regexp, and more are a few packages i
> added for good measure.. anyway, this has worked out pretty well thus
> far:
> the front page loads all  of the code from dojo/* in one js file (well,
> i do
> see two xmlhttp requests for the templates of a few widgets, of course,
> but
> everything else is readily available.) instead of in 40 seperate, non
> compressed, header-incurring requests.
>
> I have the tapestry source code checked out and have one more thing i
> want
> to do but im not sure what the right mechanism is: how do i get all the
> tapestry packages to be in one fle that i can load manually like i do
> dojo.js? that way id have only two files that i could tune individually
> that
> load the code specific to my app and theyd all be cacheable (ie, not
> paged
> trough xmlhttp, which is a problem fr example in FF pre 1.5 . .) .js
> files and
> theyd all require only one round trip and no headers.. we have pretty
> bad
> latency are really looking to streamline individual requests to the
> server.
>
> Any help would definitely be appreciated...
>
> thanks,
>
> Josh
>
>


--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com





--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com


Re: One component, multiple templates?

2006-10-31 Thread Shaun

Thanks Jesse, this is precisely the pattern that I was looking for. It works
a treat.

Shaun


Jessek wrote:
> 
> For something like this I would do it this way:
> 
> -) Write out your html as you would normally...
> 
> -) For all messages define one basic css class name and set it on all of
> them.
> 
> -) Create a more specific css class name for each message type.
> 
> -) Create a simple method that returns a String of the css classes to
> apply
> to your html element , depending on the type of message... IE :
> 
> [snip]
> 
> 

-- 
View this message in context: 
http://www.nabble.com/One-component%2C-multiple-templates--tf2541643.html#a7096740
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: ThreadLocals for Hibernate in Tapestry 4.1

2006-10-31 Thread James Carman

You can use Tapernate (www.carmanconsulting.com/tapernate) if you
want, but I'd recommend against the persistence strategies as I think
I have a better idea how to do it and it'll be changing soon.  The
hibernate configuration, open-session-in-view, data squeezer, and POJO
rollback features are worth using it though.

On 10/30/06, Bill Holloway <[EMAIL PROTECTED]> wrote:

The Hibernate in Action book talks about using a servlet filter to
handle their thread-localized HibernateUtil commitTransaction and
closeSession calls.  But Howard has talked about thread locals being
handled deep inside hivemind.

I've got Tapestry 4.1 and am using Hibernate but am not using Spring.
So what's the best strategy here?  Should my HibernateUtil be a
hivemind service?  Should I just commit transactions in my page
listener methods?  Enquiring minds

Thanks,
Bill

-
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: ANN: tacos 4.0.1 released

2006-10-31 Thread edward pedersson

 Well done on the new release. Thanks for keeping tacos up and running and
providing very useful components.

Just one question, is this below documented? I would like to define my own
exception and stale-session pages.


Easier way for defining ajax exception and stale-session pages.




On 31/10/06, Peter Beshai <[EMAIL PROTECTED]> wrote:


Tacos looks delicious. I noticed on the main page it says, "Most
development
efforts will now be shifted to converting the Ant-based build system to
Maven2. A version compatible with Tapestry 4.1.x will then follow." Is
there
any update you can give us on how the work is coming for Tapestry 4.1 (if
any at all)? Maybe an estimation of when it will be available?

That would be great! I'd love to use the Tacos library, but I'm running a
4.1.1 app.

Anyway, I'm very glad to see work is being done on tacos :-)!

Peter Beshai


>From: andyhot <[EMAIL PROTECTED]>
>Reply-To: "Tapestry users" 
>To: Tapestry users 
>Subject: ANN: tacos 4.0.1 released
>Date: Mon, 30 Oct 2006 18:56:05 +0200
>
>*Tacos 4.0.1 was released a few hours ago.
>
>It's mainly a stability release fixing 2 subtle bugs and
>enhancing the ajax encoder (for very pretty and short ajax urls).
>
>Make sure to also check out the previously undocumented but powerful
>ajax-enabled Table component.
>
>Thanks to all that contributed...
>
>Changes:*
> * Docs for tacos:Table component.
> * Load external js synchronously. Fixes Bug127.
> * AjaxSubmit posts all the AjaxLinkSubmits before it. Fixes Bug130.
> * Do not clear current document after error (a failed ajax-post).
> * Jdk1.4 compatible class format for maven generated artifacts.
> * Add StringToListConverter. Allows updateComponents parameter to be
>specified as a comma-delimited String.
> * Add uniqueNames parameter in AjaxForm - forces the html name of
each
>input control to stem from the component's idPath (instead of the
>component's id).
> * Support validators and translator in HtmlArea. Fixes Bug128.
> * Make buttons in tacos:Palette work. Fixes Bug129.
> * Remove hardcoded class attribute from tacos:Table.
> * Easier way for defining ajax exception and stale-session pages.
> * Enhance AjaxDirectServiceEncoder for ever prettier ajax urls.
> * Corrected links to tapestry's component docs.
>
>--
>Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
>Tapestry / Tacos developer
>Open Source / J2EE Consulting
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
Voyez vos amis en faisant un appel vidèo dans Windows Live Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=fr-ca


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





--


-- e


Re: Getting a reference to Hivemind registry

2006-10-31 Thread Shing Hing Man
The Hivemind registry is stored in the servlet
context.
(Please see the source code of  init method in
org.apache.tapestry.ApplicationServlet.)

If you need to reference the HiveMind registry outside

a web page, you might need to create your own
'singleton' 
of HiveMind registry.

Shing



--- "B.S.Navin" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I am adding a custom enhancement worker to my
> application, which  
> enhances the PropertySelection to intialize a
> default model.
> 
> As part of this, I needed to get a reference to the 
> 
> OGNLBindingFactory service (from HiveMind), so that
> I can create an  
> OGNL binding. The normal approach to this is to use
> the @Inject  
> annotation.
> 
> But this code to get the factory and use it, is part
> of the generated  
> code. So, I suppose annotations would not work
> there.
> 
> Hence I was looking at a way to get a reference to
> the HiveMind  
> registry (so that I could programmatically get a
> reference to the  
> factory). Any help guys?
> 
> - Navin
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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



Using the TableView component within a Form

2006-10-31 Thread Gareth
contrary to what you might think, stealing a thread wasn't intended but an 
oversight.

hi,

I'm using the TableView component on what can be visulised as a search page.

The whole page is wrapped in a form (so that the paging buttons etc submit the 
search criteria), and the Form version of TableRow and TablePages are used.  
Everything appears to work except... I have 2 gripes that I can't seem to get 
around.

1. The entire page is wrapped in a form from within my Border component, which 
I didn't want to do because I had a seperate Login form at the top of my page, 
however failure to do so causes a rewind exception on the table because it cant 
create the same table model I guess - any suggestions as to how I can 
essentially prevent the table rewinding in this circumstance (I hide it on the 
next page render).

2. When I click on search, the search crieria are used to populate the table 
with its table model, working just fine, however, if I move to say page 3 of 
the table, then search again, the paging defaults to page 3 of the new search 
results... how do I reset the paging component to page 1 in this scenario?

Many Thanks

Gareth





Send instant messages to your online friends http://uk.messenger.yahoo.com

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



Re: setAttribute() fails.. (Tapestry 4.1)

2006-10-31 Thread Skorpien126

The same problem 
I think he didn´t reference the correct Object. I would try to make the
parameters as properties(default-value then should be the value of the
input-parameter) and in the doSubmitForm() i would save them... but this
doesnt seem to work in tapestry 4.1!



[EMAIL PROTECTED] wrote:
> 
> i had some problems wiht @For
> 
> I used instead @Foreach. Try with @Foreach
> 
> 
> - Original Message - 
> From: "Skorpien126" <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, October 31, 2006 6:27 PM
> Subject: Re: setAttribute() fails.. (Tapestry 4.1)
> 
> 
> 
> I REALLY NEED HELP.
> (last night i thought thats its maybe a problem with accesing because the
> list is build and accessed by two different services
> (page,direct-service...
> ).. so i decide to make the list a porperty of an global/ Visit Object...
> i
> can access the object and i can read the data... but i can´t save...
> HEELLLP)
> 
> 
> 
> Skorpien126 wrote:
>>
>> Hi..
>> I have a problem but i cant find out whats wrong.. (.. i also feel not
>> really good).
>> I have a page defining a table (persist property in page).. for each
>> entry
>> in the table i use the same component to visualize. in the page
>> definition
>> i use a "@For" component to write all. it looks like
>> 
>>  
>> 
>>
>> @MYCOMPONENT implements a form in which try to change the content... when
>> i try to submit the change, Tapestry throw an exception that f.e. the
>> setContent() Method fails... I thought that tapestry 4.1 binds parameters
>> automaticly.. ??? so... what could be the problem???
>>
>>
> 
> -- 
> View this message in context: 
> http://www.nabble.com/setAttribute%28%29-fails..-%28Tapestry-4.1%29-tf2538245.html#a7091665
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/setAttribute%28%29-fails..-%28Tapestry-4.1%29-tf2538245.html#a7092495
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: Using java 1.5 enums as property selection models

2006-10-31 Thread Stephanos Piperoglou
"Martin Strand" <[EMAIL PROTECTED]> wrote on 30/10/2006 17:33:32:

> On Mon, 30 Oct 2006 18:24:27 +0100, Stephanos Piperoglou  [EMAIL PROTECTED]> wrote:
> 
> > I was kind of expecting to be able to use a generic type (T
> > above) as an instance of java.lang.Class. Unsurprisingly, I can't.
> > Surprisingly, I can't find a way to work around it!
> 
> Afaik, the type info isn't available at runtime for generic classes 
> so it can't be done.

You're absolutely right; I was forgetting that generics in 1.5 are nothing 
but glorified syntactic sugar; the compiler does the type checking and 
then throws it all away. You need the class in the constructor for runtime 
availability.

On the other hand, I'm still miffed that I have to use 
java.lang.Class.getEnumConstants() (which I had to dig through the API to 
find, and seems a bit inelegant even though the generic definition for the 
class guarantees type safety) when all the tutorials mention the 
.values() static method, which is defined for every subtype of 
java.lang.Enum but not Enum itself! Of course it's because you can't have 
abstract static methods in Java anyway... it just looks a bit ugly

Still, why am I complaining? It's a hell of a lot better than public 
static final int CITY_NYC = 1... :)

Thanks for the timely response to the initial query and humoring my aside 
guys!

---

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.

Re: setAttribute() fails.. (Tapestry 4.1)

2006-10-31 Thread gant

i had some problems wiht @For

I used instead @Foreach. Try with @Foreach


- Original Message - 
From: "Skorpien126" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, October 31, 2006 6:27 PM
Subject: Re: setAttribute() fails.. (Tapestry 4.1)



I REALLY NEED HELP.
(last night i thought thats its maybe a problem with accesing because the
list is build and accessed by two different services (page,direct-service...
).. so i decide to make the list a porperty of an global/ Visit Object... i
can access the object and i can read the data... but i can´t save...
HEELLLP)



Skorpien126 wrote:


Hi..
I have a problem but i cant find out whats wrong.. (.. i also feel not
really good).
I have a page defining a table (persist property in page).. for each entry
in the table i use the same component to visualize. in the page definition
i use a "@For" component to write all. it looks like

 


@MYCOMPONENT implements a form in which try to change the content... when
i try to submit the change, Tapestry throw an exception that f.e. the
setContent() Method fails... I thought that tapestry 4.1 binds parameters
automaticly.. ??? so... what could be the problem???




--
View this message in context: 
http://www.nabble.com/setAttribute%28%29-fails..-%28Tapestry-4.1%29-tf2538245.html#a7091665

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]



Re: setAttribute() fails.. (Tapestry 4.1)

2006-10-31 Thread Skorpien126

I REALLY NEED HELP.
(last night i thought thats its maybe a problem with accesing because the
list is build and accessed by two different services (page,direct-service...
).. so i decide to make the list a porperty of an global/ Visit Object... i
can access the object and i can read the data... but i can´t save...
HEELLLP)



Skorpien126 wrote:
> 
> Hi..
> I have a problem but i cant find out whats wrong.. (.. i also feel not
> really good).
> I have a page defining a table (persist property in page).. for each entry
> in the table i use the same component to visualize. in the page definition
> i use a "@For" component to write all. it looks like
> 
>  
> 
> 
> @MYCOMPONENT implements a form in which try to change the content... when
> i try to submit the change, Tapestry throw an exception that f.e. the
> setContent() Method fails... I thought that tapestry 4.1 binds parameters
> automaticly.. ??? so... what could be the problem???
> 
> 

-- 
View this message in context: 
http://www.nabble.com/setAttribute%28%29-fails..-%28Tapestry-4.1%29-tf2538245.html#a7091665
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Optimizing dojo and the tapestry js source code

2006-10-31 Thread Josh Long

I'm experiencing a ridiculous slow down in speed on a front page because the
initial page uses a few widgets whcih themselves use other dojo packages,
few of which are included in the default dojo.js that comes bundled with
tapestry. So, i built a dojo.js equivalent to te kitchen sink build with a
few extra packages (dojo.dom, dojo.regexp, and more are a few packages i
added for good measure.. anyway, this has worked out pretty well thus far:
the front page loads all  of the code from dojo/* in one js file (well, i do
see two xmlhttp requests for the templates of a few widgets, of course, but
everything else is readily available.) instead of in 40 seperate, non
compressed, header-incurring requests.

I have the tapestry source code checked out and have one more thing i want
to do but im not sure what the right mechanism is: how do i get all the
tapestry packages to be in one fle that i can load manually like i do
dojo.js? that way id have only two files that i could tune individually that
load the code specific to my app and theyd all be cacheable (ie, not paged
trough xmlhttp, which is a problem fr example in FF pre 1.5..) .js files and
theyd all require only one round trip and no headers.. we have pretty bad
latency are really looking to streamline individual requests to the server.

Any help would definitely be appreciated...

thanks,

Josh