list + search

View: New views
17 Messages — Rating Filter:   Alert me  

list + search

by Pablo Gra\~na :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there.

I want the search form at the top of the list of entities. Is there an easy way?
I put the search component in the DefaultList.html, but it works partially: when
the form is recreated, the status of the search page fields are correctly
restored, neither cleaned: some values are overwriten with the values in other
forms.

I know close to nothing about tapestry, but I imagine that the problem is in the
way the value for the input tag is handled: instead of storing the value in the
page, the search component is used to create a new criterion and reused for the
next input tag.

I am now hacking a bit (with trails 1.1.1, unfortunately), but I will probably
spend some time to get this working for other projects using a 1.2-SNAPSHOT. Any
hints?

thanks a lot.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: list + search

by Alejandro Scandroli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Pablo

I'm sorry but I'm not following. Did you mean that your search form
it's always being cleared; it's never being cleared, or it's
"randomly" being cleared.
Can you show me your code?

Saludos.
Alejandro.

On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na <pablo.grana@...> wrote:

> Hi there.
>
> I want the search form at the top of the list of entities. Is there an easy
> way? I put the search component in the DefaultList.html, but it works
> partially: when the form is recreated, the status of the search page fields
> are correctly restored, neither cleaned: some values are overwriten with the
> values in other forms.
>
> I know close to nothing about tapestry, but I imagine that the problem is in
> the way the value for the input tag is handled: instead of storing the value
> in the page, the search component is used to create a new criterion and
> reused for the next input tag.
>
> I am now hacking a bit (with trails 1.1.1, unfortunately), but I will
> probably spend some time to get this working for other projects using a
> 1.2-SNAPSHOT. Any hints?
>
> thanks a lot.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



RE: list + search

by nhhockeyplayer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Wuold it be nice if Trails released a FilteredObjectTable... which lays out a filter form at the top of the table in order to present optional toggled search criteria based on the properties of the objects being populated and associated search text ? In order to render subsets of the table?

You can always request a feature.

Best regards
Ken in nashua



> Date: Tue, 1 Jul 2008 15:22:12 +0200
> From: alejandroscandroli@...
> To: users@...
> Subject: Re: [trails-users] list + search
>
> Hi Pablo
>
> I'm sorry but I'm not following. Did you mean that your search form
> it's always being cleared; it's never being cleared, or it's
> "randomly" being cleared.
> Can you show me your code?
>
> Saludos.
> Alejandro.
>
> On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na <pablo.grana@...> wrote:
> > Hi there.
> >
> > I want the search form at the top of the list of entities. Is there an easy
> > way? I put the search component in the DefaultList.html, but it works
> > partially: when the form is recreated, the status of the search page fields
> > are correctly restored, neither cleaned: some values are overwriten with the
> > values in other forms.
> >
> > I know close to nothing about tapestry, but I imagine that the problem is in
> > the way the value for the input tag is handled: instead of storing the value
> > in the page, the search component is used to create a new criterion and
> > reused for the next input tag.
> >
> > I am now hacking a bit (with trails 1.1.1, unfortunately), but I will
> > probably spend some time to get this working for other projects using a
> > 1.2-SNAPSHOT. Any hints?
> >
> > thanks a lot.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> > http://xircles.codehaus.org/manage_email
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>


Making the world a better place one message at a time. Check out the i'm Talkathon.
Best regards
Ken in nashua

Re: list + search

by Pablo Gra\~na :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

this is what happens:

(remember that I put the search form at the top of the DefaultList.html)

suppose you have 2 text fields to search for.

a= '___"
b= "___"

If you post a value in a, then the two fields are cleared. If you post a value
in b, then both field take the same value. It looks like both fields take
whatever value was in b when it was posted.

Whats more, I suppose that all the fields of the same type are set to the value
of the last field of that type.

The result list is apparently correct.

I'll try te send a diff for the roster demo with an example and some screenshots.

regards.

Alejandro Scandroli wrote:

> Hi Pablo
>
> I'm sorry but I'm not following. Did you mean that your search form
> it's always being cleared; it's never being cleared, or it's
> "randomly" being cleared.
> Can you show me your code?
>
> Saludos.
> Alejandro.
>
> On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na <pablo.grana@...> wrote:
>> Hi there.
>>
>> I want the search form at the top of the list of entities. Is there an easy
>> way? I put the search component in the DefaultList.html, but it works
>> partially: when the form is recreated, the status of the search page fields
>> are correctly restored, neither cleaned: some values are overwriten with the
>> values in other forms.
>>
>> I know close to nothing about tapestry, but I imagine that the problem is in
>> the way the value for the input tag is handled: instead of storing the value
>> in the page, the search component is used to create a new criterion and
>> reused for the next input tag.
>>
>> I am now hacking a bit (with trails 1.1.1, unfortunately), but I will
>> probably spend some time to get this working for other projects using a
>> 1.2-SNAPSHOT. Any hints?
>>
>> thanks a lot.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

--
Pablo Gra\~na
Chief Architect
Globant
Arg Office: +54 (11) 4109 1743
UK  Office: +44 (20) 7043 8269 int 8043
US  Office: +1 (212) 400 7686 int 8043


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



RE: list + search

by nhhockeyplayer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Sounds like something is mis-wired... maybe an ognl property... I'd hate to think it is under the hood in the property descriptor logic.It would help to see your source code for the HTML template.If you can pass on the whole module, I will try to see if it runs on my 1.2-SNAPSHOT app. It just might. But then again... it might not   :)The latest stuff is fresh and runnable. Alejandro did a fleet job on completing the latest code.  I had though another JUNE run would come from these guys ... but there really isn't much left to do... TRAILS has it all except for a few decorations and cosmetics.I'd encourage you to bump up to the latest binaries if possible. Will save you alot of headache. At least if your trying to customize... you will get better results from trails-core.Best regards
Ken in nashua> Date: Tue, 1 Jul 2008 17:03:16 -0300> From: pablo.grana@...> To: users@...> Subject: Re: [trails-users] list + search> > this is what happens:> > (remember that I put the search form at the top of the DefaultList.html)> > suppose you have 2 text fields to search for.> > a= '___"> b= "___"> > If you post a value in a, then the two fields are cleared. If you post a value > in b, then both field take the same value. It looks like both fields take > whatever value was in b when it was posted.> > Whats more, I suppose that all the fields of the same type are set to the value > of the last field of that type.> > The result list is apparently correct.> > I'll try te send a diff for the roster demo with an example and some screenshots.> > regards.> > Alejandro Scandroli wrote:> > Hi Pablo> > > > I'm sorry but I'm not following. Did you mean that your search form> > it's always being cleared; it's never being cleared, or it's> > "randomly" being cleared.> > Can you show me your code?> > > > Saludos.> > Alejandro.> > > > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na <pablo.grana@...> wrote:> >> Hi there.> >>> >> I want the search form at the top of the list of entities. Is there an easy> >> way? I put the search component in the DefaultList.html, but it works> >> partially: when the form is recreated, the status of the search page fields> >> are correctly restored, neither cleaned: some values are overwriten with the> >> values in other forms.> >>> >> I know close to nothing about tapestry, but I imagine that the problem is in> >> the way the value for the input tag is handled: instead of storing the value> >> in the page, the search component is used to create a new criterion and> >> reused for the next input tag.> >>> >> I am now hacking a bit (with trails 1.1.1, unfortunately), but I will> >> probably spend some time to get this working for other projects using a> >> 1.2-SNAPSHOT. Any hints?> >>> >> thanks a lot.> >>> >>> >> ---------------------------------------------------------------------> >> To unsubscribe from this list, please visit:> >>> >>   http://xircles.codehaus.org/manage_email> >>> >>> >>> > > > ---------------------------------------------------------------------> > To unsubscribe from this list, please visit:> > > >     http://xircles.codehaus.org/manage_email> > > > > > -- > Pablo Gra\~na> Chief Architect> Globant> Arg Office: +54 (11) 4109 1743> UK  Office: +44 (20) 7043 8269 int 8043> US  Office: +1 (212) 400 7686 int 8043> > > ---------------------------------------------------------------------> To unsubscribe from this list, please visit:> >     http://xircles.codehaus.org/manage_email> >
_________________________________________________________________
Making the world a better place one message at a time.
http://www.imtalkathon.com/?source=EML_WLH_Talkathon_BetterPlace
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Best regards
Ken in nashua

Re: list + search

by Pablo Gra\~na :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is a way to reproduce it. Attached is a diff that simply adds the search
trails:SearchForm component to the list page.

To see the problem, log in and go to the 'List Team Years' menu link. In the
Year Start field enter a number. You will see that the list is correctly
filtered after 'search', but the form is cleared.

If you now enter a value in the 'Year End' field and click search, both 'Year
Start' and 'Year End' are filled with the same value. The result of the search
is correct.

IFAIK, the implementation of the SearchForm does not store what the user
entered. it just uses the data to create a criterion and then stores it in the
component 'value' field. Once the second form field (ie: 'Year End') is
processed (in a rewind), trails picks the same block object and sets the value
to the value entered in that field. Then, (when not rewinding but rendering),
trails draws the 'Year Start' field, using the same block that now contains the
value of the 'Year End' field.

Note: this is against trails svn trunk (1.2-SNAPSHOT).

Hope this helps ...

regards.

Alejandro Scandroli wrote:

> Hi Pablo
>
> I'm sorry but I'm not following. Did you mean that your search form
> it's always being cleared; it's never being cleared, or it's
> "randomly" being cleared.
> Can you show me your code?
>
> Saludos.
> Alejandro.
>
> On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na <pablo.grana@...> wrote:
>> Hi there.
>>
>> I want the search form at the top of the list of entities. Is there an easy
>> way? I put the search component in the DefaultList.html, but it works
>> partially: when the form is recreated, the status of the search page fields
>> are correctly restored, neither cleaned: some values are overwriten with the
>> values in other forms.
>>
>> I know close to nothing about tapestry, but I imagine that the problem is in
>> the way the value for the input tag is handled: instead of storing the value
>> in the page, the search component is used to create a new criterion and
>> reused for the next input tag.
>>
>> I am now hacking a bit (with trails 1.1.1, unfortunately), but I will
>> probably spend some time to get this working for other projects using a
>> 1.2-SNAPSHOT. Any hints?
>>
>> thanks a lot.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
--
Pablo Gra\~na
Chief Architect
Globant
Arg Office: +54 (11) 4109 1743
UK  Office: +44 (20) 7043 8269 int 8043
US  Office: +1 (212) 400 7686 int 8043


Index: src/main/webapp/WEB-INF/DefaultList.html
===================================================================
--- src/main/webapp/WEB-INF/DefaultList.html (revision 944)
+++ src/main/webapp/WEB-INF/DefaultList.html (working copy)
@@ -12,6 +12,9 @@
  </ul>
  </span>
 
+ <form jwcid="@trails:SearchForm">
+ </form>
+
  <h1><span jwcid="@Insert" value="message:org.trails.i18n.list">
  List</span> <span jwcid="@Insert" value="ognl:classDescriptor.pluralDisplayName"/>
  </h1>
@@ -23,4 +26,4 @@
  column="ognl:column"
   />
 
-</span>
\ No newline at end of file
+</span>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

RE: list + search

by nhhockeyplayer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My runtime produces this...

I am working on getting it running

An exception has occurred. You may continue by restarting the session.
[ +/- ] Exception: java.lang.NullPointerException [ +/- ] Exception: java.lang.NullPointerException

Best regards
Ken in nashua



> Date: Tue, 1 Jul 2008 19:55:43 -0300
> From: pablo.grana@...
> To: users@...
> Subject: Re: [trails-users] list + search
>
> Here is a way to reproduce it. Attached is a diff that simply adds the search
> trails:SearchForm component to the list page.
>
> To see the problem, log in and go to the 'List Team Years' menu link. In the
> Year Start field enter a number. You will see that the list is correctly
> filtered after 'search', but the form is cleared.
>
> If you now enter a value in the 'Year End' field and click search, both 'Year
> Start' and 'Year End' are filled with the same value. The result of the search
> is correct.
>
> IFAIK, the implementation of the SearchForm does not store what the user
> entered. it just uses the data to create a criterion and then stores it in the
> component 'value' field. Once the second form field (ie: 'Year End') is
> processed (in a rewind), trails picks the same block object and sets the value
> to the value entered in that field. Then, (when not rewinding but rendering),
> trails draws the 'Year Start' field, using the same block that now contains the
> value of the 'Year End' field.
>
> Note: this is against trails svn trunk (1.2-SNAPSHOT).
>
> Hope this helps ...
>
> regards.
>
> Alejandro Scandroli wrote:
> > Hi Pablo
> >
> > I'm sorry but I'm not following. Did you mean that your search form
> > it's always being cleared; it's never being cleared, or it's
> > "randomly" being cleared.
> > Can you show me your code?
> >
> > Saludos.
> > Alejandro.
> >
> > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na <pablo.grana@...> wrote:
> >> Hi there.
> >>
> >> I want the search form at the top of the list of entities. Is there an easy
> >> way? I put the search component in the DefaultList.html, but it works
> >> partially: when the form is recreated, the status of the search page fields
> >> are correctly restored, neither cleaned: some values are overwriten with the
> >> values in other forms.
> >>
> >> I know close to nothing about tapestry, but I imagine that the problem is in
> >> the way the value for the input tag is handled: instead of storing the value
> >> in the page, the search component is used to create a new criterion and
> >> reused for the next input tag.
> >>
> >> I am now hacking a bit (with trails 1.1.1, unfortunately), but I will
> >> probably spend some time to get this working for other projects using a
> >> 1.2-SNAPSHOT. Any hints?
> >>
> >> thanks a lot.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >> http://xircles.codehaus.org/manage_email
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> > http://xircles.codehaus.org/manage_email
> >
> >
>
> --
> Pablo Gra\~na
> Chief Architect
> Globant
> Arg Office: +54 (11) 4109 1743
> UK Office: +44 (20) 7043 8269 int 8043
> US Office: +1 (212) 400 7686 int 8043
>


Do more with your photos with Windows Live Photo Gallery. Get Windows Live-Free
Best regards
Ken in nashua

RE: list + search

by nhhockeyplayer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

did you make modifications to the *.page file?
If so what are they.

Best regards
Ken in nashua




From: nhhockeyplayer@...
To: users@...
Date: Wed, 2 Jul 2008 12:02:27 -0400
Subject: RE: [trails-users] list + search

My runtime produces this...

I am working on getting it running

An exception has occurred. You may continue by restarting the session.
[ +/- ] Exception: java.lang.NullPointerException [ +/- ] Exception: java.lang.NullPointerException

Best regards
Ken in nashua



> Date: Tue, 1 Jul 2008 19:55:43 -0300
> From: pablo.grana@...
> To: users@...
> Subject: Re: [trails-users] list + search
>
> Here is a way to reproduce it. Attached is a diff that simply adds the search
> trails:SearchForm component to the list page.
>
> To see the problem, log in and go to the 'List Team Years' menu link. In the
> Year Start field enter a number. You will see that the list is correctly
> filtered after 'search', but the form is cleared.
>
> If you now enter a value in the 'Year End' field and click search, both 'Year
> Start' and 'Year End' are filled with the same value. The result of the search
> is correct.
>
> IFAIK, the implementation of the SearchForm does not store what the user
> entered. it just uses the data to create a criterion and then stores it in the
> component 'value' field. Once the second form field (ie: 'Year End') is
> processed (in a rewind), trails picks the same block object and sets the value
> to the value entered in that field. Then, (when not rewinding but rendering),
> trails draws the 'Year Start' field, using the same block that now contains the
> value of the 'Year End' field.
>
> Note: this is against trails svn trunk (1.2-SNAPSHOT).
>
> Hope this helps ...
>
> regards.
>
> Alejandro Scandroli wrote:
> > Hi Pablo
> >
> > I'm sorry but I'm not following. Did you mean that your search form
> > it's always being cleared; it's never being cleared, or it's
> > "randomly" being cleared.
> > Can you show me your code?
> >
> > Saludos.
> > Alejandro.
> >
> > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na <pablo.grana@...> wrote:
> >> Hi there.
> >>
> >> I want the search form at the top of the list of entities. Is there an easy
> >> way? I put the search component in the DefaultList.html, but it works
> >> partially: when the form is recreated, the status of the search page fields
> >> are correctly restored, neither cleaned: some values are overwriten with the
> >> values in other forms.
> >>
> >> I know close to nothing about tapestry, but I imagine that the problem is in
> >> the way the value for the input tag is handled: instead of storing the value
> >> in the page, the search component is used to create a new criterion and
> >> reused for the next input tag.
> >>
> >> I am now hacking a bit (with trails 1.1.1, unfortunately), but I will
> >> probably spend some time to get this working for other projects using a
> >> 1.2-SNAPSHOT. Any hints?
> >>
> >> thanks a lot.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >> http://xircles.codehaus.org/manage_email
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> > http://xircles.codehaus.org/manage_email
> >
> >
>
> --
> Pablo Gra\~na
> Chief Architect
> Globant
> Arg Office: +54 (11) 4109 1743
> UK Office: +44 (20) 7043 8269 int 8043
> US Office: +1 (212) 400 7686 int 8043
>


Do more with your photos with Windows Live Photo Gallery. Get Windows Live-Free

Do more with your photos with Windows Live Photo Gallery. Get Windows Live-Free
Best regards
Ken in nashua

Re: list + search

by Pablo Gra\~na :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

no, just what I posted. Just to be sure, I deleted my local maven repository,
checked out the head from scratch, applied the patch and rebuilt. It gave the
same result I posted earlier: the search form gets populated with the wrong values.

thank a lot.

Ken in nashua wrote:

> did you make modifications to the *.page file?
> If so what are they.
>
> Best regards
> Ken in nashua
>
>
>
> ------------------------------------------------------------------------
> From: nhhockeyplayer@...
> To: users@...
> Date: Wed, 2 Jul 2008 12:02:27 -0400
> Subject: RE: [trails-users] list + search
>
> My runtime produces this...
>
> I am working on getting it running
>
> An exception has occurred. You may continue by *restarting
> <http://localhost:8080/restart.svc>* the session.
> [ +/- ] Exception: java.lang.NullPointerException
> <http://localhost:8080/trails/list/League#>
> org.apache.hivemind.ApplicationRuntimeException
>
> component:
>
> $HibernateListPage_15@3c1[LeagueList]
>
> location:
>
> context:/WEB-INF/DefaultList.page, line 3, column 63
> 1
>
> <!DOCTYPE page-specification PUBLIC "-//Apache Software
> Foundation//Tapestry Specification 4.1//EN"
>
> 2
>
>   "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd">
>
> 3
>
> <page-specification class="org.trails.page.HibernateListPage">
>
> 4
>
>
>
> 5
>
>  <property name="instances" persist="session"/>
>
> 6
>
>  <property name="criteria" persist="session"/>
>
> 7
>
>  <property name="classDescriptor" persist="session"/>
>
> 8
>
>
>
>
>
>  
>
> [ +/- ] Exception: java.lang.NullPointerException
> <http://localhost:8080/trails/list/League#>
> org.trails.exception.TrailsRuntimeException
> Stack Trace:
>
>     * org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:92)
>
>     * org.apache.tapestry.form.DefaultOptionRenderer.renderOptions(DefaultOptionRenderer.java:60)
>
>     * org.apache.tapestry.form.PropertySelection.renderFormComponent(PropertySelection.java:75)
>
>     * org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:104)
>
>     * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>
>     * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>
>     * org.trails.component.search.SimpleSearchField.renderComponent(SimpleSearchField.java:44)
>
>     * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>
>     * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>
>     * org.apache.tapestry.components.Block.renderForComponent(Block.java:65)
>
>     * org.apache.tapestry.components.RenderBlock.renderComponent(RenderBlock.java:65)
>
>     * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>
>     * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>
>     * org.apache.tapestry.components.ForBean.renderComponent(ForBean.java:181)
>
>     * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>
>     * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>
>     * org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:503)
>
>     * org.apache.tapestry.form.Form.renderComponent(Form.java:217)
>     * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>
>     * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>
>     * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>
>     * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>
>     * org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
>
>     * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>
>     * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>
>     * org.apache.tapestry.html.Body.renderComponent(Body.java:38)
>     * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>
>     * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>
>     * org.apache.tapestry.html.Shell.renderComponent(Shell.java:125)
>     * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>
>     * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>
>     * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>
>     * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>
>     * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:185)
>
>     * org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:249)
>     * org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:400)
>
>     * org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:159)
>
>     * org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)
>
>     * $ResponseRenderer_11ae45b759a.renderResponse($ResponseRenderer_11ae45b759a.java)
>
>     * org.trails.engine.TrailsPagesService.service(TrailsPagesService.java:111)
>
>     * $IEngineService_11ae45b760b.service($IEngineService_11ae45b760b.java)
>     * org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
>
>     * org.apache.tapestry.engi`ne.AbstractEngine.service(AbstractEngine.java:241)
>

>     * org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
>
>     * $WebRequestServicer_11ae45b75e4.service($WebRequestServicer_11ae45b75e4.java)
>
>     * $WebRequestServicer_11ae45b75e0.service($WebRequestServicer_11ae45b75e0.java)
>
>     * org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
>
>     * $ServletRequestServicer_11ae45b75c6.service($ServletRequestServicer_11ae45b75c6.java)
>
>     * org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
>
>     * $ServletRequestServicerFilter_11ae45b75c2.service($ServletRequestServicerFilter_11ae45b75c2.java)
>
>     * $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>
>     * org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
>
>     * $ServletRequestServicerFilter_11ae45b75c0.service($ServletRequestServicerFilter_11ae45b75c0.java)
>
>     * $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>
>     * org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
>
>     * $ServletRequestServicerFilter_11ae45b75c4.service($ServletRequestServicerFilter_11ae45b75c4.java)
>
>     * $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>
>     * $ServletRequestServicer_11ae45b75ba.service($ServletRequestServicer_11ae45b75ba.java)
>
>     * org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
>
>     * org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
>
>     * javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>     * javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>     * org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
>
>     * org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
>
>     * org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>
>     * org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>
>     * org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>
>     * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>
>     * org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
>
>     * org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
>
>     * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>
>     * org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
>
>     * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>
>     * org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
>
>     * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>
>     * org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
>
>     * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>
>     * org.trails.security.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:152)
>
>     * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>
>     * org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
>
>     * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>
>     * org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
>
>     * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>
>     * org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
>
>     * org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
>
>     * org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>
>     * org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
>
>     * org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
>
>     * org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>
>     * org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
>
>     * org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
>     * org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
>
>     * org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>
>     * org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>
>     * org.mortbay.jetty.Server.handle(Server.java:285)
>     * org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
>
>     * org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
>
>     * org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
>     * org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
>     * org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
>     * org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
>
>     * org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
>
>     * Caused by: java.lang.NullPointerException
>     * org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:89)
>
>     * ... 112 more
>
>
>
> Best regards
> Ken in nashua
>
>
>
>  > Date: Tue, 1 Jul 2008 19:55:43 -0300
>  > From: pablo.grana@...
>  > To: users@...
>  > Subject: Re: [trails-users] list + search
>  >
>  > Here is a way to reproduce it. Attached is a diff that simply adds
> the search
>  > trails:SearchForm component to the list page.
>  >
>  > To see the problem, log in and go to the 'List Team Years' menu link.
> In the
>  > Year Start field enter a number. You will see that the list is correctly
>  > filtered after 'search', but the form is cleared.
>  >
>  > If you now enter a value in the 'Year End' field and click search,
> both 'Year
>  > Start' and 'Year End' are filled with the same value. The result of
> the search
>  > is correct.
>  >
>  > IFAIK, the implementation of the SearchForm does not store what the user
>  > entered. it just uses the data to create a criterion and then stores
> it in the
>  > component 'value' field. Once the second form field (ie: 'Year End') is
>  > processed (in a rewind), trails picks the same block object and sets
> the value
>  > to the value entered in that field. Then, (when not rewinding but
> rendering),
>  > trails draws the 'Year Start' field, using the same block that now
> contains the
>  > value of the 'Year End' field.
>  >
>  > Note: this is against trails svn trunk (1.2-SNAPSHOT).
>  >
>  > Hope this helps ...
>  >
>  > regards.
>  >
>  > Alejandro Scandroli wrote:
>  > > Hi Pablo
>  > >
>  > > I'm sorry but I'm not following. Did you mean that your search form
>  > > it's always being cleared; it's never being cleared, or it's
>  > > "randomly" being cleared.
>  > > Can you show me your code?
>  > >
>  > > Saludos.
>  > > Alejandro.
>  > >
>  > > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na
> <pablo.grana@...> wrote:
>  > >> Hi there.
>  > >>
>  > >> I want the search form at the top of the list of entities. Is
> there an easy
>  > >> way? I put the search component in the DefaultList.html, but it works
>  > >> partially: when the form is recreated, the status of the search
> page fields
>  > >> are correctly restored, neither cleaned: some values are
> overwriten with the
>  > >> values in other forms.
>  > >>
>  > >> I know close to nothing about tapestry, but I imagine that the
> problem is in
>  > >> the way the value for the input tag is handled: instead of storing
> the value
>  > >> in the page, the search component is used to create a new
> criterion and
>  > >> reused for the next input tag.
>  > >>
>  > >> I am now hacking a bit (with trails 1.1.1, unfortunately), but I will
>  > >> probably spend some time to get this working for other projects
> using a
>  > >> 1.2-SNAPSHOT. Any hints?
>  > >>
>  > >> thanks a lot.
>  > >>
>  > >>
>  > >> ---------------------------------------------------------------------
>  > >> To unsubscribe from this list, please visit:
>  > >>
>  > >> http://xircles.codehaus.org/manage_email
>  > >>
>  > >>
>  > >>
>  > >
>  > > ---------------------------------------------------------------------
>  > > To unsubscribe from this list, please visit:
>  > >
>  > > http://xircles.codehaus.org/manage_email
>  > >
>  > >
>  >
>  > --
>  > Pablo Gra\~na
>  > Chief Architect
>  > Globant
>  > Arg Office: +54 (11) 4109 1743
>  > UK Office: +44 (20) 7043 8269 int 8043
>  > US Office: +1 (212) 400 7686 int 8043
>  >
>
> ------------------------------------------------------------------------
> Do more with your photos with Windows Live Photo Gallery. Get Windows
> Live-Free
> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
> ------------------------------------------------------------------------
> Do more with your photos with Windows Live Photo Gallery. Get Windows
> Live-Free
> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>

--
Pablo Gra\~na
Chief Architect
Globant
Arg Office: +54 (11) 4109 1743
UK  Office: +44 (20) 7043 8269 int 8043
US  Office: +1 (212) 400 7686 int 8043


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



RE: list + search

by nhhockeyplayer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry I have been prempted with workplace issues.

Hope to find sometime near future to look closer at my implementation.

Best regards
Ken in nashua



> Date: Wed, 2 Jul 2008 23:00:22 -0300
> From: pablo.grana@...
> To: users@...
> Subject: Re: [trails-users] list + search
>
> no, just what I posted. Just to be sure, I deleted my local maven repository,
> checked out the head from scratch, applied the patch and rebuilt. It gave the
> same result I posted earlier: the search form gets populated with the wrong values.
>
> thank a lot.
>
> Ken in nashua wrote:
> > did you make modifications to the *.page file?
> > If so what are they.
> >
> > Best regards
> > Ken in nashua
> >
> >
> >
> > ------------------------------------------------------------------------
> > From: nhhockeyplayer@...
> > To: users@...
> > Date: Wed, 2 Jul 2008 12:02:27 -0400
> > Subject: RE: [trails-users] list + search
> >
> > My runtime produces this...
> >
> > I am working on getting it running
> >
> > An exception has occurred. You may continue by *restarting
> > <http://localhost:8080/restart.svc>* the session.
> > [ +/- ] Exception: java.lang.NullPointerException
> > <http://localhost:8080/trails/list/League#>
> > org.apache.hivemind.ApplicationRuntimeException
> >
> > component:
> >
> > $HibernateListPage_15@3c1[LeagueList]
> >
> > location:
> >
> > context:/WEB-INF/DefaultList.page, line 3, column 63
> > 1
> >
> > <!DOCTYPE page-specification PUBLIC "-//Apache Software
> > Foundation//Tapestry Specification 4.1//EN"
> >
> > 2
> >
> > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd">
> >
> > 3
> >
> > <page-specification class="org.trails.page.HibernateListPage">
> >
> > 4
> >
> >
> >
> > 5
> >
> > <property name="instances" persist="session"/>
> >
> > 6
> >
> > <property name="criteria" persist="session"/>
> >
> > 7
> >
> > <property name="classDescriptor" persist="session"/>
> >
> > 8
> >
> >
> >
> >
> >
> >
> >
> > [ +/- ] Exception: java.lang.NullPointerException
> > <http://localhost:8080/trails/list/League#>
> > org.trails.exception.TrailsRuntimeException
> > Stack Trace:
> >
> > * org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:92)
> >
> > * org.apache.tapestry.form.DefaultOptionRenderer.renderOptions(DefaultOptionRenderer.java:60)
> >
> > * org.apache.tapestry.form.PropertySelection.renderFormComponent(PropertySelection.java:75)
> >
> > * org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:104)
> >
> > * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >
> > * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >
> > * org.trails.component.search.SimpleSearchField.renderComponent(SimpleSearchField.java:44)
> >
> > * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >
> > * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >
> > * org.apache.tapestry.components.Block.renderForComponent(Block.java:65)
> >
> > * org.apache.tapestry.components.RenderBlock.renderComponent(RenderBlock.java:65)
> >
> > * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >
> > * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >
> > * org.apache.tapestry.components.ForBean.renderComponent(ForBean.java:181)
> >
> > * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >
> > * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >
> > * org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:503)
> >
> > * org.apache.tapestry.form.Form.renderComponent(Form.java:217)
> > * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >
> > * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >
> > * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >
> > * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >
> > * org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
> >
> > * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >
> > * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >
> > * org.apache.tapestry.html.Body.renderComponent(Body.java:38)
> > * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >
> > * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >
> > * org.apache.tapestry.html.Shell.renderComponent(Shell.java:125)
> > * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >
> > * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >
> > * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >
> > * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >
> > * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:185)
> >
> > * org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:249)
> > * org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:400)
> >
> > * org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:159)
> >
> > * org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)
> >
> > * $ResponseRenderer_11ae45b759a.renderResponse($ResponseRenderer_11ae45b759a.java)
> >
> > * org.trails.engine.TrailsPagesService.service(TrailsPagesService.java:111)
> >
> > * $IEngineService_11ae45b760b.service($IEngineService_11ae45b760b.java)
> > * org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
> >
> > * org.apache.tapestry.engi`ne.AbstractEngine.service(AbstractEngine.java:241)
> >
>
> > * org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
> >
> > * $WebRequestServicer_11ae45b75e4.service($WebRequestServicer_11ae45b75e4.java)
> >
> > * $WebRequestServicer_11ae45b75e0.service($WebRequestServicer_11ae45b75e0.java)
> >
> > * org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
> >
> > * $ServletRequestServicer_11ae45b75c6.service($ServletRequestServicer_11ae45b75c6.java)
> >
> > * org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
> >
> > * $ServletRequestServicerFilter_11ae45b75c2.service($ServletRequestServicerFilter_11ae45b75c2.java)
> >
> > * $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
> >
> > * org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
> >
> > * $ServletRequestServicerFilter_11ae45b75c0.service($ServletRequestServicerFilter_11ae45b75c0.java)
> >
> > * $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
> >
> > * org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
> >
> > * $ServletRequestServicerFilter_11ae45b75c4.service($ServletRequestServicerFilter_11ae45b75c4.java)
> >
> > * $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
> >
> > * $ServletRequestServicer_11ae45b75ba.service($ServletRequestServicer_11ae45b75ba.java)
> >
> > * org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
> >
> > * org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
> >
> > * javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > * javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > * org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
> >
> > * org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
> >
> > * org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> >
> > * org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
> >
> > * org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
> >
> > * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
> >
> > * org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
> >
> > * org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
> >
> > * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >
> > * org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
> >
> > * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >
> > * org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
> >
> > * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >
> > * org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
> >
> > * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >
> > * org.trails.security.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:152)
> >
> > * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >
> > * org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
> >
> > * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >
> > * org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
> >
> > * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >
> > * org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
> >
> > * org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
> >
> > * org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
> >
> > * org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
> >
> > * org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
> >
> > * org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> >
> > * org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
> >
> > * org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
> > * org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
> >
> > * org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> >
> > * org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> >
> > * org.mortbay.jetty.Server.handle(Server.java:285)
> > * org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
> >
> > * org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
> >
> > * org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
> > * org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
> > * org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
> > * org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
> >
> > * org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
> >
> > * Caused by: java.lang.NullPointerException
> > * org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:89)
> >
> > * ... 112 more
> >
> >
> >
> > Best regards
> > Ken in nashua
> >
> >
> >
> > > Date: Tue, 1 Jul 2008 19:55:43 -0300
> > > From: pablo.grana@...
> > > To: users@...
> > > Subject: Re: [trails-users] list + search
> > >
> > > Here is a way to reproduce it. Attached is a diff that simply adds
> > the search
> > > trails:SearchForm component to the list page.
> > >
> > > To see the problem, log in and go to the 'List Team Years' menu link.
> > In the
> > > Year Start field enter a number. You will see that the list is correctly
> > > filtered after 'search', but the form is cleared.
> > >
> > > If you now enter a value in the 'Year End' field and click search,
> > both 'Year
> > > Start' and 'Year End' are filled with the same value. The result of
> > the search
> > > is correct.
> > >
> > > IFAIK, the implementation of the SearchForm does not store what the user
> > > entered. it just uses the data to create a criterion and then stores
> > it in the
> > > component 'value' field. Once the second form field (ie: 'Year End') is
> > > processed (in a rewind), trails picks the same block object and sets
> > the value
> > > to the value entered in that field. Then, (when not rewinding but
> > rendering),
> > > trails draws the 'Year Start' field, using the same block that now
> > contains the
> > > value of the 'Year End' field.
> > >
> > > Note: this is against trails svn trunk (1.2-SNAPSHOT).
> > >
> > > Hope this helps ...
> > >
> > > regards.
> > >
> > > Alejandro Scandroli wrote:
> > > > Hi Pablo
> > > >
> > > > I'm sorry but I'm not following. Did you mean that your search form
> > > > it's always being cleared; it's never being cleared, or it's
> > > > "randomly" being cleared.
> > > > Can you show me your code?
> > > >
> > > > Saludos.
> > > > Alejandro.
> > > >
> > > > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na
> > <pablo.grana@...> wrote:
> > > >> Hi there.
> > > >>
> > > >> I want the search form at the top of the list of entities. Is
> > there an easy
> > > >> way? I put the search component in the DefaultList.html, but it works
> > > >> partially: when the form is recreated, the status of the search
> > page fields
> > > >> are correctly restored, neither cleaned: some values are
> > overwriten with the
> > > >> values in other forms.
> > > >>
> > > >> I know close to nothing about tapestry, but I imagine that the
> > problem is in
> > > >> the way the value for the input tag is handled: instead of storing
> > the value
> > > >> in the page, the search component is used to create a new
> > criterion and
> > > >> reused for the next input tag.
> > > >>
> > > >> I am now hacking a bit (with trails 1.1.1, unfortunately), but I will
> > > >> probably spend some time to get this working for other projects
> > using a
> > > >> 1.2-SNAPSHOT. Any hints?
> > > >>
> > > >> thanks a lot.
> > > >>
> > > >>
> > > >> ---------------------------------------------------------------------
> > > >> To unsubscribe from this list, please visit:
> > > >>
> > > >> http://xircles.codehaus.org/manage_email
> > > >>
> > > >>
> > > >>
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe from this list, please visit:
> > > >
> > > > http://xircles.codehaus.org/manage_email
> > > >
> > > >
> > >
> > > --
> > > Pablo Gra\~na
> > > Chief Architect
> > > Globant
> > > Arg Office: +54 (11) 4109 1743
> > > UK Office: +44 (20) 7043 8269 int 8043
> > > US Office: +1 (212) 400 7686 int 8043
> > >
> >
> > ------------------------------------------------------------------------
> > Do more with your photos with Windows Live Photo Gallery. Get Windows
> > Live-Free
> > <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
> > ------------------------------------------------------------------------
> > Do more with your photos with Windows Live Photo Gallery. Get Windows
> > Live-Free
> > <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
>
> --
> Pablo Gra\~na
> Chief Architect
> Globant
> Arg Office: +54 (11) 4109 1743
> UK Office: +44 (20) 7043 8269 int 8043
> US Office: +1 (212) 400 7686 int 8043
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>


Do more with your photos with Windows Live Photo Gallery. Get Windows Live-Free
Best regards
Ken in nashua

Re: list + search

by Alejandro Scandroli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Pablo

I see your issue now.
First of all I didn't expect it to work at all, so I'm quite surprised.
The "criteria" is created on the SearchForm.pageBeginRender method, so
it's not being shared across requests.
The search field values aren't persisted in either client or session.
They neither are binded to anything so I would asume they should be
NULL every time we take the component out of the editors page.
It looks like my asumtions were wrong, the values ARE shared across
all the instances of the same component in the same request cycle.

I think this fixes it:

+++ modules/trails-hibernate/src/main/java/org/trails/component/search/SimpleSearchField.java Thu
Jul 03 12:28:55 CEST 2008
+ protected void cleanupAfterRender(IRequestCycle cycle)
+ {
+ setValue(null);
+ }

But I have to do a deeper test to confirm.
Please test the attached patch and then let me know how it goes.


Saludos.
Alejandro.

--
Alejandro Scandroli - http://weblog.amneris.es/
Amneris: We build process-driven web applications.
http://www.amneris.es



On Thu, Jul 3, 2008 at 4:00 AM, Pablo Gra~na <pablo.grana@...> wrote:

> no, just what I posted. Just to be sure, I deleted my local maven
> repository, checked out the head from scratch, applied the patch and
> rebuilt. It gave the same result I posted earlier: the search form gets
> populated with the wrong values.
>
> thank a lot.
>
> Ken in nashua wrote:
>>
>> did you make modifications to the *.page file?
>> If so what are they.
>>
>> Best regards
>> Ken in nashua
>>
>>
>>
>> ------------------------------------------------------------------------
>> From: nhhockeyplayer@...
>> To: users@...
>> Date: Wed, 2 Jul 2008 12:02:27 -0400
>> Subject: RE: [trails-users] list + search
>>
>> My runtime produces this...
>>
>> I am working on getting it running
>>
>> An exception has occurred. You may continue by *restarting
>> <http://localhost:8080/restart.svc>* the session.
>> [ +/- ] Exception: java.lang.NullPointerException
>> <http://localhost:8080/trails/list/League#>
>> org.apache.hivemind.ApplicationRuntimeException
>>
>> component:
>>
>>        $HibernateListPage_15@3c1[LeagueList]
>>
>> location:
>>
>>        context:/WEB-INF/DefaultList.page, line 3, column 63
>> 1
>>
>>        <!DOCTYPE page-specification PUBLIC "-//Apache Software
>> Foundation//Tapestry Specification 4.1//EN"
>>
>> 2
>>
>>           "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd">
>>
>> 3
>>
>>        <page-specification class="org.trails.page.HibernateListPage">
>>
>> 4
>>
>>
>>
>> 5
>>
>>          <property name="instances" persist="session"/>
>>
>> 6
>>
>>          <property name="criteria" persist="session"/>
>>
>> 7
>>
>>          <property name="classDescriptor" persist="session"/>
>>
>> 8
>>
>>
>>
>>
>>
>>
>> [ +/- ] Exception: java.lang.NullPointerException
>> <http://localhost:8080/trails/list/League#>
>> org.trails.exception.TrailsRuntimeException
>> Stack Trace:
>>
>>    *
>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:92)
>>
>>    *
>> org.apache.tapestry.form.DefaultOptionRenderer.renderOptions(DefaultOptionRenderer.java:60)
>>
>>    *
>> org.apache.tapestry.form.PropertySelection.renderFormComponent(PropertySelection.java:75)
>>
>>    *
>> org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:104)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>
>>    *
>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>
>>    *
>> org.trails.component.search.SimpleSearchField.renderComponent(SimpleSearchField.java:44)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>
>>    *
>> org.apache.tapestry.components.Block.renderForComponent(Block.java:65)
>>
>>    *
>> org.apache.tapestry.components.RenderBlock.renderComponent(RenderBlock.java:65)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>
>>    *
>> org.apache.tapestry.components.ForBean.renderComponent(ForBean.java:181)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>
>>    *
>> org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:503)
>>
>>    * org.apache.tapestry.form.Form.renderComponent(Form.java:217)
>>    *
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>
>>    *
>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>
>>    *
>> org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>
>>    * org.apache.tapestry.html.Body.renderComponent(Body.java:38)
>>    *
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>
>>    * org.apache.tapestry.html.Shell.renderComponent(Shell.java:125)
>>    *
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>
>>    *
>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>
>>    *
>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>
>>    *
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:185)
>>
>>    * org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:249)
>>    *
>> org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:400)
>>
>>    *
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:159)
>>
>>    *
>> org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)
>>
>>    *
>> $ResponseRenderer_11ae45b759a.renderResponse($ResponseRenderer_11ae45b759a.java)
>>
>>    *
>> org.trails.engine.TrailsPagesService.service(TrailsPagesService.java:111)
>>
>>    * $IEngineService_11ae45b760b.service($IEngineService_11ae45b760b.java)
>>    *
>> org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
>>
>>    *
>> org.apache.tapestry.engi`ne.AbstractEngine.service(AbstractEngine.java:241)
>>
>
>>    *
>> org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
>>
>>    *
>> $WebRequestServicer_11ae45b75e4.service($WebRequestServicer_11ae45b75e4.java)
>>
>>    *
>> $WebRequestServicer_11ae45b75e0.service($WebRequestServicer_11ae45b75e0.java)
>>
>>    *
>> org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
>>
>>    *
>> $ServletRequestServicer_11ae45b75c6.service($ServletRequestServicer_11ae45b75c6.java)
>>
>>    *
>> org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
>>
>>    *
>> $ServletRequestServicerFilter_11ae45b75c2.service($ServletRequestServicerFilter_11ae45b75c2.java)
>>
>>    *
>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>
>>    *
>> org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
>>
>>    *
>> $ServletRequestServicerFilter_11ae45b75c0.service($ServletRequestServicerFilter_11ae45b75c0.java)
>>
>>    *
>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>
>>    *
>> org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
>>
>>    *
>> $ServletRequestServicerFilter_11ae45b75c4.service($ServletRequestServicerFilter_11ae45b75c4.java)
>>
>>    *
>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>
>>    *
>> $ServletRequestServicer_11ae45b75ba.service($ServletRequestServicer_11ae45b75ba.java)
>>
>>    *
>> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
>>
>>    *
>> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
>>
>>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>    *
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
>>
>>    *
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
>>
>>    *
>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>>
>>    *
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>>
>>    *
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>>
>>    *
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>>
>>    *
>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
>>
>>    *
>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
>>
>>    *
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>
>>    *
>> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
>>
>>    *
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>
>>    *
>> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
>>
>>    *
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>
>>    *
>> org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
>>
>>    *
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>
>>    *
>> org.trails.security.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:152)
>>
>>    *
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>
>>    *
>> org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
>>
>>    *
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>
>>    *
>> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
>>
>>    *
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>
>>    *
>> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
>>
>>    *
>> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
>>
>>    *
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>>
>>    *
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
>>
>>    *
>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
>>
>>    *
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>>
>>    *
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
>>
>>    * org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
>>    *
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
>>
>>    *
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>
>>    *
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>>
>>    * org.mortbay.jetty.Server.handle(Server.java:285)
>>    *
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
>>
>>    *
>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
>>
>>    * org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
>>    * org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
>>    * org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
>>    *
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
>>
>>    *
>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
>>
>>    * Caused by: java.lang.NullPointerException
>>    *
>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:89)
>>
>>    * ... 112 more
>>
>>
>> Best regards
>> Ken in nashua
>>
>>
>>
>>  > Date: Tue, 1 Jul 2008 19:55:43 -0300
>>  > From: pablo.grana@...
>>  > To: users@...
>>  > Subject: Re: [trails-users] list + search
>>  >
>>  > Here is a way to reproduce it. Attached is a diff that simply adds the
>> search
>>  > trails:SearchForm component to the list page.
>>  >
>>  > To see the problem, log in and go to the 'List Team Years' menu link.
>> In the
>>  > Year Start field enter a number. You will see that the list is
>> correctly
>>  > filtered after 'search', but the form is cleared.
>>  >
>>  > If you now enter a value in the 'Year End' field and click search, both
>> 'Year
>>  > Start' and 'Year End' are filled with the same value. The result of the
>> search
>>  > is correct.
>>  >
>>  > IFAIK, the implementation of the SearchForm does not store what the
>> user
>>  > entered. it just uses the data to create a criterion and then stores it
>> in the
>>  > component 'value' field. Once the second form field (ie: 'Year End') is
>>  > processed (in a rewind), trails picks the same block object and sets
>> the value
>>  > to the value entered in that field. Then, (when not rewinding but
>> rendering),
>>  > trails draws the 'Year Start' field, using the same block that now
>> contains the
>>  > value of the 'Year End' field.
>>  >
>>  > Note: this is against trails svn trunk (1.2-SNAPSHOT).
>>  >
>>  > Hope this helps ...
>>  >
>>  > regards.
>>  >
>>  > Alejandro Scandroli wrote:
>>  > > Hi Pablo
>>  > >
>>  > > I'm sorry but I'm not following. Did you mean that your search form
>>  > > it's always being cleared; it's never being cleared, or it's
>>  > > "randomly" being cleared.
>>  > > Can you show me your code?
>>  > >
>>  > > Saludos.
>>  > > Alejandro.
>>  > >
>>  > > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na
>> <pablo.grana@...> wrote:
>>  > >> Hi there.
>>  > >>
>>  > >> I want the search form at the top of the list of entities. Is there
>> an easy
>>  > >> way? I put the search component in the DefaultList.html, but it
>> works
>>  > >> partially: when the form is recreated, the status of the search page
>> fields
>>  > >> are correctly restored, neither cleaned: some values are overwriten
>> with the
>>  > >> values in other forms.
>>  > >>
>>  > >> I know close to nothing about tapestry, but I imagine that the
>> problem is in
>>  > >> the way the value for the input tag is handled: instead of storing
>> the value
>>  > >> in the page, the search component is used to create a new criterion
>> and
>>  > >> reused for the next input tag.
>>  > >>
>>  > >> I am now hacking a bit (with trails 1.1.1, unfortunately), but I
>> will
>>  > >> probably spend some time to get this working for other projects
>> using a
>>  > >> 1.2-SNAPSHOT. Any hints?
>>  > >>
>>  > >> thanks a lot.
>>  > >>
>>  > >>
>>  > >>
>> ---------------------------------------------------------------------
>>  > >> To unsubscribe from this list, please visit:
>>  > >>
>>  > >> http://xircles.codehaus.org/manage_email
>>  > >>
>>  > >>
>>  > >>
>>  > >
>>  > > ---------------------------------------------------------------------
>>  > > To unsubscribe from this list, please visit:
>>  > >
>>  > > http://xircles.codehaus.org/manage_email
>>  > >
>>  > >
>>  >
>>  > --
>>  > Pablo Gra\~na
>>  > Chief Architect
>>  > Globant
>>  > Arg Office: +54 (11) 4109 1743
>>  > UK Office: +44 (20) 7043 8269 int 8043
>>  > US Office: +1 (212) 400 7686 int 8043
>>  >
>>
>> ------------------------------------------------------------------------
>> Do more with your photos with Windows Live Photo Gallery. Get Windows
>> Live-Free
>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
>> ------------------------------------------------------------------------
>> Do more with your photos with Windows Live Photo Gallery. Get Windows
>> Live-Free
>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
>
> --
> Pablo Gra\~na
> Chief Architect
> Globant
> Arg Office: +54 (11) 4109 1743
> UK  Office: +44 (20) 7043 8269 int 8043
> US  Office: +1 (212) 400 7686 int 8043
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

SimpleSearchField.patch (1K) Download Attachment

Re: list + search

by Pablo Gra\~na :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I imagine that this will work, but the search form will be cleared. I managed to
implement a workaround that keeps the form values after search. It is really
nasty, but works (in trails 1.1.1). I overrode the getBlock method.

When getBlock is called, I stores in a map the block (as a key) and the name of
the property that the block will edit. This map will have as many blocks as
'type of properties', generally less than the number of properties in the search
form. So this map holds the name of the last property edited by that block.

The other thing is to keep a map of property names to values. Each key in this
map is obtained from the previous map. This gives us the name of the property
previously edited by the current block, so the current block should contain the
value of such property.

I went through this stuff because I don't know how to reimplement the search
components to bind the values directly to a map. I'll study this a little bit
more to see if I can find a better way.

Here is the code:

   /** Maps a block to the name of the property last edited by the block.
    *
    * This is used to support search in the list page. It is a hack until we
    * find a proper way.
    *
    * It is never null.
    */
   private Map<Block, String> searchBlocks = new HashMap<Block, String>();

   /** Maps a property name to the vaue of that property.
    *
    * This is used to support search in the list page. It is a hack until we
    * find a proper way.
    *
    * It is never null.
    */
   public abstract Map<String, Object> getSearchValues();
   public abstract void setSearchValues(final Map<String, Object> values);

   public Block getBlock() {
     String propertyName = getPropertyDescriptor().getName();

     Block searchBlock = getBlockFinder().findBlock(getRequestCycle(),
         getPropertyDescriptor());

     /* Saves the value of the block in the search map.
      */
     if (searchBlocks.get(searchBlock) != null) {
       Object value = null;
       for (IRender render : searchBlock.getBody()) {
         if (render instanceof SimpleSearchField) {
           value = ((SimpleSearchField) render).getValue();
           break;
         }
       }
       getSearchValues().put(searchBlocks.get(searchBlock), value);
     }
     searchBlocks.put(searchBlock, propertyName);

     PropertyUtils.write(searchBlock.getPage(), "criteria", getCriteria());

     if (getSearchValues().containsKey(propertyName)) {
       for (IRender render : searchBlock.getBody()) {
         if (render instanceof SimpleSearchField) {
           Object value = getSearchValues().get(propertyName);
           ((SimpleSearchField) render).setValue(value);
         }
       }
     }
     return searchBlock;
   }

Alejandro Scandroli wrote:

> Hi Pablo
>
> I see your issue now.
> First of all I didn't expect it to work at all, so I'm quite surprised.
> The "criteria" is created on the SearchForm.pageBeginRender method, so
> it's not being shared across requests.
> The search field values aren't persisted in either client or session.
> They neither are binded to anything so I would asume they should be
> NULL every time we take the component out of the editors page.
> It looks like my asumtions were wrong, the values ARE shared across
> all the instances of the same component in the same request cycle.
>
> I think this fixes it:
>
> +++ modules/trails-hibernate/src/main/java/org/trails/component/search/SimpleSearchField.java Thu
> Jul 03 12:28:55 CEST 2008
> + protected void cleanupAfterRender(IRequestCycle cycle)
> + {
> + setValue(null);
> + }
>
> But I have to do a deeper test to confirm.
> Please test the attached patch and then let me know how it goes.
>
>
> Saludos.
> Alejandro.
>
> --
> Alejandro Scandroli - http://weblog.amneris.es/
> Amneris: We build process-driven web applications.
> http://www.amneris.es
>
>
>
> On Thu, Jul 3, 2008 at 4:00 AM, Pablo Gra~na <pablo.grana@...> wrote:
>> no, just what I posted. Just to be sure, I deleted my local maven
>> repository, checked out the head from scratch, applied the patch and
>> rebuilt. It gave the same result I posted earlier: the search form gets
>> populated with the wrong values.
>>
>> thank a lot.
>>
>> Ken in nashua wrote:
>>> did you make modifications to the *.page file?
>>> If so what are they.
>>>
>>> Best regards
>>> Ken in nashua
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>> From: nhhockeyplayer@...
>>> To: users@...
>>> Date: Wed, 2 Jul 2008 12:02:27 -0400
>>> Subject: RE: [trails-users] list + search
>>>
>>> My runtime produces this...
>>>
>>> I am working on getting it running
>>>
>>> An exception has occurred. You may continue by *restarting
>>> <http://localhost:8080/restart.svc>* the session.
>>> [ +/- ] Exception: java.lang.NullPointerException
>>> <http://localhost:8080/trails/list/League#>
>>> org.apache.hivemind.ApplicationRuntimeException
>>>
>>> component:
>>>
>>>        $HibernateListPage_15@3c1[LeagueList]
>>>
>>> location:
>>>
>>>        context:/WEB-INF/DefaultList.page, line 3, column 63
>>> 1
>>>
>>>        <!DOCTYPE page-specification PUBLIC "-//Apache Software
>>> Foundation//Tapestry Specification 4.1//EN"
>>>
>>> 2
>>>
>>>           "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd">
>>>
>>> 3
>>>
>>>        <page-specification class="org.trails.page.HibernateListPage">
>>>
>>> 4
>>>
>>>
>>>
>>> 5
>>>
>>>          <property name="instances" persist="session"/>
>>>
>>> 6
>>>
>>>          <property name="criteria" persist="session"/>
>>>
>>> 7
>>>
>>>          <property name="classDescriptor" persist="session"/>
>>>
>>> 8
>>>
>>>
>>>
>>>
>>>
>>>
>>> [ +/- ] Exception: java.lang.NullPointerException
>>> <http://localhost:8080/trails/list/League#>
>>> org.trails.exception.TrailsRuntimeException
>>> Stack Trace:
>>>
>>>    *
>>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:92)
>>>
>>>    *
>>> org.apache.tapestry.form.DefaultOptionRenderer.renderOptions(DefaultOptionRenderer.java:60)
>>>
>>>    *
>>> org.apache.tapestry.form.PropertySelection.renderFormComponent(PropertySelection.java:75)
>>>
>>>    *
>>> org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:104)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>
>>>    *
>>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>>
>>>    *
>>> org.trails.component.search.SimpleSearchField.renderComponent(SimpleSearchField.java:44)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>
>>>    *
>>> org.apache.tapestry.components.Block.renderForComponent(Block.java:65)
>>>
>>>    *
>>> org.apache.tapestry.components.RenderBlock.renderComponent(RenderBlock.java:65)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>
>>>    *
>>> org.apache.tapestry.components.ForBean.renderComponent(ForBean.java:181)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>
>>>    *
>>> org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:503)
>>>
>>>    * org.apache.tapestry.form.Form.renderComponent(Form.java:217)
>>>    *
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>
>>>    *
>>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>
>>>    *
>>> org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>
>>>    * org.apache.tapestry.html.Body.renderComponent(Body.java:38)
>>>    *
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>
>>>    * org.apache.tapestry.html.Shell.renderComponent(Shell.java:125)
>>>    *
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>
>>>    *
>>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>
>>>    *
>>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>>
>>>    *
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:185)
>>>
>>>    * org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:249)
>>>    *
>>> org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:400)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:159)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)
>>>
>>>    *
>>> $ResponseRenderer_11ae45b759a.renderResponse($ResponseRenderer_11ae45b759a.java)
>>>
>>>    *
>>> org.trails.engine.TrailsPagesService.service(TrailsPagesService.java:111)
>>>
>>>    * $IEngineService_11ae45b760b.service($IEngineService_11ae45b760b.java)
>>>    *
>>> org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
>>>
>>>    *
>>> org.apache.tapestry.engi`ne.AbstractEngine.service(AbstractEngine.java:241)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
>>>
>>>    *
>>> $WebRequestServicer_11ae45b75e4.service($WebRequestServicer_11ae45b75e4.java)
>>>
>>>    *
>>> $WebRequestServicer_11ae45b75e0.service($WebRequestServicer_11ae45b75e0.java)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
>>>
>>>    *
>>> $ServletRequestServicer_11ae45b75c6.service($ServletRequestServicer_11ae45b75c6.java)
>>>
>>>    *
>>> org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
>>>
>>>    *
>>> $ServletRequestServicerFilter_11ae45b75c2.service($ServletRequestServicerFilter_11ae45b75c2.java)
>>>
>>>    *
>>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>>
>>>    *
>>> org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
>>>
>>>    *
>>> $ServletRequestServicerFilter_11ae45b75c0.service($ServletRequestServicerFilter_11ae45b75c0.java)
>>>
>>>    *
>>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>>
>>>    *
>>> org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
>>>
>>>    *
>>> $ServletRequestServicerFilter_11ae45b75c4.service($ServletRequestServicerFilter_11ae45b75c4.java)
>>>
>>>    *
>>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>>
>>>    *
>>> $ServletRequestServicer_11ae45b75ba.service($ServletRequestServicer_11ae45b75ba.java)
>>>
>>>    *
>>> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
>>>
>>>    *
>>> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
>>>
>>>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>>>    * javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>    *
>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
>>>
>>>    *
>>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
>>>
>>>    *
>>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>>>
>>>    *
>>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>>>
>>>    *
>>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>>>
>>>    *
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>>>
>>>    *
>>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
>>>
>>>    *
>>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
>>>
>>>    *
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>
>>>    *
>>> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
>>>
>>>    *
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>
>>>    *
>>> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
>>>
>>>    *
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>
>>>    *
>>> org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
>>>
>>>    *
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>
>>>    *
>>> org.trails.security.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:152)
>>>
>>>    *
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>
>>>    *
>>> org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
>>>
>>>    *
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>
>>>    *
>>> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
>>>
>>>    *
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>
>>>    *
>>> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
>>>
>>>    *
>>> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
>>>
>>>    *
>>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>>>
>>>    *
>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
>>>
>>>    *
>>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
>>>
>>>    *
>>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>>>
>>>    *
>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
>>>
>>>    * org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
>>>    *
>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
>>>
>>>    *
>>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>
>>>    *
>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>>>
>>>    * org.mortbay.jetty.Server.handle(Server.java:285)
>>>    *
>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
>>>
>>>    *
>>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
>>>
>>>    * org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
>>>    * org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
>>>    * org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
>>>    *
>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
>>>
>>>    *
>>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
>>>
>>>    * Caused by: java.lang.NullPointerException
>>>    *
>>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:89)
>>>
>>>    * ... 112 more
>>>
>>>
>>> Best regards
>>> Ken in nashua
>>>
>>>
>>>
>>>  > Date: Tue, 1 Jul 2008 19:55:43 -0300
>>>  > From: pablo.grana@...
>>>  > To: users@...
>>>  > Subject: Re: [trails-users] list + search
>>>  >
>>>  > Here is a way to reproduce it. Attached is a diff that simply adds the
>>> search
>>>  > trails:SearchForm component to the list page.
>>>  >
>>>  > To see the problem, log in and go to the 'List Team Years' menu link.
>>> In the
>>>  > Year Start field enter a number. You will see that the list is
>>> correctly
>>>  > filtered after 'search', but the form is cleared.
>>>  >
>>>  > If you now enter a value in the 'Year End' field and click search, both
>>> 'Year
>>>  > Start' and 'Year End' are filled with the same value. The result of the
>>> search
>>>  > is correct.
>>>  >
>>>  > IFAIK, the implementation of the SearchForm does not store what the
>>> user
>>>  > entered. it just uses the data to create a criterion and then stores it
>>> in the
>>>  > component 'value' field. Once the second form field (ie: 'Year End') is
>>>  > processed (in a rewind), trails picks the same block object and sets
>>> the value
>>>  > to the value entered in that field. Then, (when not rewinding but
>>> rendering),
>>>  > trails draws the 'Year Start' field, using the same block that now
>>> contains the
>>>  > value of the 'Year End' field.
>>>  >
>>>  > Note: this is against trails svn trunk (1.2-SNAPSHOT).
>>>  >
>>>  > Hope this helps ...
>>>  >
>>>  > regards.
>>>  >
>>>  > Alejandro Scandroli wrote:
>>>  > > Hi Pablo
>>>  > >
>>>  > > I'm sorry but I'm not following. Did you mean that your search form
>>>  > > it's always being cleared; it's never being cleared, or it's
>>>  > > "randomly" being cleared.
>>>  > > Can you show me your code?
>>>  > >
>>>  > > Saludos.
>>>  > > Alejandro.
>>>  > >
>>>  > > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na
>>> <pablo.grana@...> wrote:
>>>  > >> Hi there.
>>>  > >>
>>>  > >> I want the search form at the top of the list of entities. Is there
>>> an easy
>>>  > >> way? I put the search component in the DefaultList.html, but it
>>> works
>>>  > >> partially: when the form is recreated, the status of the search page
>>> fields
>>>  > >> are correctly restored, neither cleaned: some values are overwriten
>>> with the
>>>  > >> values in other forms.
>>>  > >>
>>>  > >> I know close to nothing about tapestry, but I imagine that the
>>> problem is in
>>>  > >> the way the value for the input tag is handled: instead of storing
>>> the value
>>>  > >> in the page, the search component is used to create a new criterion
>>> and
>>>  > >> reused for the next input tag.
>>>  > >>
>>>  > >> I am now hacking a bit (with trails 1.1.1, unfortunately), but I
>>> will
>>>  > >> probably spend some time to get this working for other projects
>>> using a
>>>  > >> 1.2-SNAPSHOT. Any hints?
>>>  > >>
>>>  > >> thanks a lot.
>>>  > >>
>>>  > >>
>>>  > >>
>>> ---------------------------------------------------------------------
>>>  > >> To unsubscribe from this list, please visit:
>>>  > >>
>>>  > >> http://xircles.codehaus.org/manage_email
>>>  > >>
>>>  > >>
>>>  > >>
>>>  > >
>>>  > > ---------------------------------------------------------------------
>>>  > > To unsubscribe from this list, please visit:
>>>  > >
>>>  > > http://xircles.codehaus.org/manage_email
>>>  > >
>>>  > >
>>>  >
>>>  > --
>>>  > Pablo Gra\~na
>>>  > Chief Architect
>>>  > Globant
>>>  > Arg Office: +54 (11) 4109 1743
>>>  > UK Office: +44 (20) 7043 8269 int 8043
>>>  > US Office: +1 (212) 400 7686 int 8043
>>>  >
>>>
>>> ------------------------------------------------------------------------
>>> Do more with your photos with Windows Live Photo Gallery. Get Windows
>>> Live-Free
>>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
>>> ------------------------------------------------------------------------
>>> Do more with your photos with Windows Live Photo Gallery. Get Windows
>>> Live-Free
>>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
>> --
>> Pablo Gra\~na
>> Chief Architect
>> Globant
>> Arg Office: +54 (11) 4109 1743
>> UK  Office: +44 (20) 7043 8269 int 8043
>> US  Office: +1 (212) 400 7686 int 8043
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email

--
Pablo Gra\~na
Chief Architect
Globant
Arg Office: +54 (11) 4109 1743
UK  Office: +44 (20) 7043 8269 int 8043
US  Office: +1 (212) 400 7686 int 8043


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



RE: list + search

by nhhockeyplayer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I never thought persisting form fields could ever get so complicated.

Isn't this suppose to be automatically taken care of tapestry and ognl as it renders the objects data to the form... Isn't that what bindings are for?

RIGHT ?

Best regards
Ken in nashua



> Date: Thu, 3 Jul 2008 13:02:26 -0300
> From: pablo.grana@...
> To: users@...
> Subject: Re: [trails-users] list + search
>
> I imagine that this will work, but the search form will be cleared. I managed to
> implement a workaround that keeps the form values after search. It is really
> nasty, but works (in trails 1.1.1). I overrode the getBlock method.
>
> When getBlock is called, I stores in a map the block (as a key) and the name of
> the property that the block will edit. This map will have as many blocks as
> 'type of properties', generally less than the number of properties in the search
> form. So this map holds the name of the last property edited by that block.
>
> The other thing is to keep a map of property names to values. Each key in this
> map is obtained from the previous map. This gives us the name of the property
> previously edited by the current block, so the current block should contain the
> value of such property.
>
> I went through this stuff because I don't know how to reimplement the search
> components to bind the values directly to a map. I'll study this a little bit
> more to see if I can find a better way.
>
> Here is the code:
>
> /** Maps a block to the name of the property last edited by the block.
> *
> * This is used to support search in the list page. It is a hack until we
> * find a proper way.
> *
> * It is never null.
> */
> private Map<Block, String> searchBlocks = new HashMap<Block, String>();
>
> /** Maps a property name to the vaue of that property.
> *
> * This is used to support search in the list page. It is a hack until we
> * find a proper way.
> *
> * It is never null.
> */
> public abstract Map<String, Object> getSearchValues();
> public abstract void setSearchValues(final Map<String, Object> values);
>
> public Block getBlock() {
> String propertyName = getPropertyDescriptor().getName();
>
> Block searchBlock = getBlockFinder().findBlock(getRequestCycle(),
> getPropertyDescriptor());
>
> /* Saves the value of the block in the search map.
> */
> if (searchBlocks.get(searchBlock) != null) {
> Object value = null;
> for (IRender render : searchBlock.getBody()) {
> if (render instanceof SimpleSearchField) {
> value = ((SimpleSearchField) render).getValue();
> break;
> }
> }
> getSearchValues().put(searchBlocks.get(searchBlock), value);
> }
> searchBlocks.put(searchBlock, propertyName);
>
> PropertyUtils.write(searchBlock.getPage(), "criteria", getCriteria());
>
> if (getSearchValues().containsKey(propertyName)) {
> for (IRender render : searchBlock.getBody()) {
> if (render instanceof SimpleSearchField) {
> Object value = getSearchValues().get(propertyName);
> ((SimpleSearchField) render).setValue(value);
> }
> }
> }
> return searchBlock;
> }
>
> Alejandro Scandroli wrote:
> > Hi Pablo
> >
> > I see your issue now.
> > First of all I didn't expect it to work at all, so I'm quite surprised.
> > The "criteria" is created on the SearchForm.pageBeginRender method, so
> > it's not being shared across requests.
> > The search field values aren't persisted in either client or session.
> > They neither are binded to anything so I would asume they should be
> > NULL every time we take the component out of the editors page.
> > It looks like my asumtions were wrong, the values ARE shared across
> > all the instances of the same component in the same request cycle.
> >
> > I think this fixes it:
> >
> > +++ modules/trails-hibernate/src/main/java/org/trails/component/search/SimpleSearchField.java Thu
> > Jul 03 12:28:55 CEST 2008
> > + protected void cleanupAfterRender(IRequestCycle cycle)
> > + {
> > + setValue(null);
> > + }
> >
> > But I have to do a deeper test to confirm.
> > Please test the attached patch and then let me know how it goes.
> >
> >
> > Saludos.
> > Alejandro.
> >
> > --
> > Alejandro Scandroli - http://weblog.amneris.es/
> > Amneris: We build process-driven web applications.
> > http://www.amneris.es
> >
> >
> >
> > On Thu, Jul 3, 2008 at 4:00 AM, Pablo Gra~na <pablo.grana@...> wrote:
> >> no, just what I posted. Just to be sure, I deleted my local maven
> >> repository, checked out the head from scratch, applied the patch and
> >> rebuilt. It gave the same result I posted earlier: the search form gets
> >> populated with the wrong values.
> >>
> >> thank a lot.
> >>
> >> Ken in nashua wrote:
> >>> did you make modifications to the *.page file?
> >>> If so what are they.
> >>>
> >>> Best regards
> >>> Ken in nashua
> >>>
> >>>
> >>>
> >>> ------------------------------------------------------------------------
> >>> From: nhhockeyplayer@...
> >>> To: users@...
> >>> Date: Wed, 2 Jul 2008 12:02:27 -0400
> >>> Subject: RE: [trails-users] list + search
> >>>
> >>> My runtime produces this...
> >>>
> >>> I am working on getting it running
> >>>
> >>> An exception has occurred. You may continue by *restarting
> >>> <http://localhost:8080/restart.svc>* the session.
> >>> [ +/- ] Exception: java.lang.NullPointerException
> >>> <http://localhost:8080/trails/list/League#>
> >>> org.apache.hivemind.ApplicationRuntimeException
> >>>
> >>> component:
> >>>
> >>> $HibernateListPage_15@3c1[LeagueList]
> >>>
> >>> location:
> >>>
> >>> context:/WEB-INF/DefaultList.page, line 3, column 63
> >>> 1
> >>>
> >>> <!DOCTYPE page-specification PUBLIC "-//Apache Software
> >>> Foundation//Tapestry Specification 4.1//EN"
> >>>
> >>> 2
> >>>
> >>> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd">
> >>>
> >>> 3
> >>>
> >>> <page-specification class="org.trails.page.HibernateListPage">
> >>>
> >>> 4
> >>>
> >>>
> >>>
> >>> 5
> >>>
> >>> <property name="instances" persist="session"/>
> >>>
> >>> 6
> >>>
> >>> <property name="criteria" persist="session"/>
> >>>
> >>> 7
> >>>
> >>> <property name="classDescriptor" persist="session"/>
> >>>
> >>> 8
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> [ +/- ] Exception: java.lang.NullPointerException
> >>> <http://localhost:8080/trails/list/League#>
> >>> org.trails.exception.TrailsRuntimeException
> >>> Stack Trace:
> >>>
> >>> *
> >>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:92)
> >>>
> >>> *
> >>> org.apache.tapestry.form.DefaultOptionRenderer.renderOptions(DefaultOptionRenderer.java:60)
> >>>
> >>> *
> >>> org.apache.tapestry.form.PropertySelection.renderFormComponent(PropertySelection.java:75)
> >>>
> >>> *
> >>> org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:104)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>>
> >>> *
> >>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >>>
> >>> *
> >>> org.trails.component.search.SimpleSearchField.renderComponent(SimpleSearchField.java:44)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>>
> >>> *
> >>> org.apache.tapestry.components.Block.renderForComponent(Block.java:65)
> >>>
> >>> *
> >>> org.apache.tapestry.components.RenderBlock.renderComponent(RenderBlock.java:65)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>>
> >>> *
> >>> org.apache.tapestry.components.ForBean.renderComponent(ForBean.java:181)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>>
> >>> *
> >>> org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:503)
> >>>
> >>> * org.apache.tapestry.form.Form.renderComponent(Form.java:217)
> >>> *
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>>
> >>> *
> >>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>>
> >>> *
> >>> org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>>
> >>> * org.apache.tapestry.html.Body.renderComponent(Body.java:38)
> >>> *
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>>
> >>> * org.apache.tapestry.html.Shell.renderComponent(Shell.java:125)
> >>> *
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>>
> >>> *
> >>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>>
> >>> *
> >>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >>>
> >>> *
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:185)
> >>>
> >>> * org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:249)
> >>> *
> >>> org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:400)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:159)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)
> >>>
> >>> *
> >>> $ResponseRenderer_11ae45b759a.renderResponse($ResponseRenderer_11ae45b759a.java)
> >>>
> >>> *
> >>> org.trails.engine.TrailsPagesService.service(TrailsPagesService.java:111)
> >>>
> >>> * $IEngineService_11ae45b760b.service($IEngineService_11ae45b760b.java)
> >>> *
> >>> org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
> >>>
> >>> *
> >>> org.apache.tapestry.engi`ne.AbstractEngine.service(AbstractEngine.java:241)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
> >>>
> >>> *
> >>> $WebRequestServicer_11ae45b75e4.service($WebRequestServicer_11ae45b75e4.java)
> >>>
> >>> *
> >>> $WebRequestServicer_11ae45b75e0.service($WebRequestServicer_11ae45b75e0.java)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
> >>>
> >>> *
> >>> $ServletRequestServicer_11ae45b75c6.service($ServletRequestServicer_11ae45b75c6.java)
> >>>
> >>> *
> >>> org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
> >>>
> >>> *
> >>> $ServletRequestServicerFilter_11ae45b75c2.service($ServletRequestServicerFilter_11ae45b75c2.java)
> >>>
> >>> *
> >>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
> >>>
> >>> *
> >>> org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
> >>>
> >>> *
> >>> $ServletRequestServicerFilter_11ae45b75c0.service($ServletRequestServicerFilter_11ae45b75c0.java)
> >>>
> >>> *
> >>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
> >>>
> >>> *
> >>> org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
> >>>
> >>> *
> >>> $ServletRequestServicerFilter_11ae45b75c4.service($ServletRequestServicerFilter_11ae45b75c4.java)
> >>>
> >>> *
> >>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
> >>>
> >>> *
> >>> $ServletRequestServicer_11ae45b75ba.service($ServletRequestServicer_11ae45b75ba.java)
> >>>
> >>> *
> >>> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
> >>>
> >>> *
> >>> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
> >>>
> >>> * javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> >>> * javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >>> *
> >>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
> >>>
> >>> *
> >>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
> >>>
> >>> *
> >>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> >>>
> >>> *
> >>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
> >>>
> >>> *
> >>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
> >>>
> >>> *
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
> >>>
> >>> *
> >>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
> >>>
> >>> *
> >>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
> >>>
> >>> *
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>>
> >>> *
> >>> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
> >>>
> >>> *
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>>
> >>> *
> >>> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
> >>>
> >>> *
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>>
> >>> *
> >>> org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
> >>>
> >>> *
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>>
> >>> *
> >>> org.trails.security.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:152)
> >>>
> >>> *
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>>
> >>> *
> >>> org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
> >>>
> >>> *
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>>
> >>> *
> >>> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
> >>>
> >>> *
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>>
> >>> *
> >>> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
> >>>
> >>> *
> >>> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
> >>>
> >>> *
> >>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
> >>>
> >>> *
> >>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
> >>>
> >>> *
> >>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
> >>>
> >>> *
> >>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> >>>
> >>> *
> >>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
> >>>
> >>> * org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
> >>> *
> >>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
> >>>
> >>> *
> >>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> >>>
> >>> *
> >>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> >>>
> >>> * org.mortbay.jetty.Server.handle(Server.java:285)
> >>> *
> >>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
> >>>
> >>> *
> >>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
> >>>
> >>> * org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
> >>> * org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
> >>> * org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
> >>> *
> >>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
> >>>
> >>> *
> >>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
> >>>
> >>> * Caused by: java.lang.NullPointerException
> >>> *
> >>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:89)
> >>>
> >>> * ... 112 more
> >>>
> >>>
> >>> Best regards
> >>> Ken in nashua
> >>>
> >>>
> >>>
> >>> > Date: Tue, 1 Jul 2008 19:55:43 -0300
> >>> > From: pablo.grana@...
> >>> > To: users@...
> >>> > Subject: Re: [trails-users] list + search
> >>> >
> >>> > Here is a way to reproduce it. Attached is a diff that simply adds the
> >>> search
> >>> > trails:SearchForm component to the list page.
> >>> >
> >>> > To see the problem, log in and go to the 'List Team Years' menu link.
> >>> In the
> >>> > Year Start field enter a number. You will see that the list is
> >>> correctly
> >>> > filtered after 'search', but the form is cleared.
> >>> >
> >>> > If you now enter a value in the 'Year End' field and click search, both
> >>> 'Year
> >>> > Start' and 'Year End' are filled with the same value. The result of the
> >>> search
> >>> > is correct.
> >>> >
> >>> > IFAIK, the implementation of the SearchForm does not store what the
> >>> user
> >>> > entered. it just uses the data to create a criterion and then stores it
> >>> in the
> >>> > component 'value' field. Once the second form field (ie: 'Year End') is
> >>> > processed (in a rewind), trails picks the same block object and sets
> >>> the value
> >>> > to the value entered in that field. Then, (when not rewinding but
> >>> rendering),
> >>> > trails draws the 'Year Start' field, using the same block that now
> >>> contains the
> >>> > value of the 'Year End' field.
> >>> >
> >>> > Note: this is against trails svn trunk (1.2-SNAPSHOT).
> >>> >
> >>> > Hope this helps ...
> >>> >
> >>> > regards.
> >>> >
> >>> > Alejandro Scandroli wrote:
> >>> > > Hi Pablo
> >>> > >
> >>> > > I'm sorry but I'm not following. Did you mean that your search form
> >>> > > it's always being cleared; it's never being cleared, or it's
> >>> > > "randomly" being cleared.
> >>> > > Can you show me your code?
> >>> > >
> >>> > > Saludos.
> >>> > > Alejandro.
> >>> > >
> >>> > > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na
> >>> <pablo.grana@...> wrote:
> >>> > >> Hi there.
> >>> > >>
> >>> > >> I want the search form at the top of the list of entities. Is there
> >>> an easy
> >>> > >> way? I put the search component in the DefaultList.html, but it
> >>> works
> >>> > >> partially: when the form is recreated, the status of the search page
> >>> fields
> >>> > >> are correctly restored, neither cleaned: some values are overwriten
> >>> with the
> >>> > >> values in other forms.
> >>> > >>
> >>> > >> I know close to nothing about tapestry, but I imagine that the
> >>> problem is in
> >>> > >> the way the value for the input tag is handled: instead of storing
> >>> the value
> >>> > >> in the page, the search component is used to create a new criterion
> >>> and
> >>> > >> reused for the next input tag.
> >>> > >>
> >>> > >> I am now hacking a bit (with trails 1.1.1, unfortunately), but I
> >>> will
> >>> > >> probably spend some time to get this working for other projects
> >>> using a
> >>> > >> 1.2-SNAPSHOT. Any hints?
> >>> > >>
> >>> > >> thanks a lot.
> >>> > >>
> >>> > >>
> >>> > >>
> >>> ---------------------------------------------------------------------
> >>> > >> To unsubscribe from this list, please visit:
> >>> > >>
> >>> > >> http://xircles.codehaus.org/manage_email
> >>> > >>
> >>> > >>
> >>> > >>
> >>> > >
> >>> > > ---------------------------------------------------------------------
> >>> > > To unsubscribe from this list, please visit:
> >>> > >
> >>> > > http://xircles.codehaus.org/manage_email
> >>> > >
> >>> > >
> >>> >
> >>> > --
> >>> > Pablo Gra\~na
> >>> > Chief Architect
> >>> > Globant
> >>> > Arg Office: +54 (11) 4109 1743
> >>> > UK Office: +44 (20) 7043 8269 int 8043
> >>> > US Office: +1 (212) 400 7686 int 8043
> >>> >
> >>>
> >>> ------------------------------------------------------------------------
> >>> Do more with your photos with Windows Live Photo Gallery. Get Windows
> >>> Live-Free
> >>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
> >>> ------------------------------------------------------------------------
> >>> Do more with your photos with Windows Live Photo Gallery. Get Windows
> >>> Live-Free
> >>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
> >> --
> >> Pablo Gra\~na
> >> Chief Architect
> >> Globant
> >> Arg Office: +54 (11) 4109 1743
> >> UK Office: +44 (20) 7043 8269 int 8043
> >> US Office: +1 (212) 400 7686 int 8043
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >> http://xircles.codehaus.org/manage_email
> >>
> >>
> >>
> >>
> >> ------------------------------------------------------------------------
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >> http://xircles.codehaus.org/manage_email
>
> --
> Pablo Gra\~na
> Chief Architect
> Globant
> Arg Office: +54 (11) 4109 1743
> UK Office: +44 (20) 7043 8269 int 8043
> US Office: +1 (212) 400 7686 int 8043
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>


Windows Live Hotmail is giving away Zunes. Enter for your chance to win. Enter Now!
Best regards
Ken in nashua

Re: list + search

by Pablo Gra\~na :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, what I did was a really nasty hack. The thing is that the search component
do not bind the fields, so the data is kept in each search block. I suppose that
the correct thing to do is to rewrite the search blocks to bind the fields
somewhere. I'll take a look at it in a couple of days.

regards

Ken in nashua wrote:

> I never thought persisting form fields could ever get so complicated.
>
> Isn't this suppose to be automatically taken care of tapestry and ognl
> as it renders the objects data to the form... Isn't that what bindings
> are for?
>
> RIGHT ?
>
> Best regards
> Ken in nashua
>
>
>
>  > Date: Thu, 3 Jul 2008 13:02:26 -0300
>  > From: pablo.grana@...
>  > To: users@...
>  > Subject: Re: [trails-users] list + search
>  >
>  > I imagine that this will work, but the search form will be cleared. I
> managed to
>  > implement a workaround that keeps the form values after search. It is
> really
>  > nasty, but works (in trails 1.1.1). I overrode the getBlock method.
>  >
>  > When getBlock is called, I stores in a map the block (as a key) and
> the name of
>  > the property that the block will edit. This map will have as many
> blocks as
>  > 'type of properties', generally less than the number of properties in
> the search
>  > form. So this map holds the name of the last property edited by that
> block.
>  >
>  > The other thing is to keep a map of property names to values. Each
> key in this
>  > map is obtained from the previous map. This gives us the name of the
> property
>  > previously edited by the current block, so the current block should
> contain the
>  > value of such property.
>  >
>  > I went through this stuff because I don't know how to reimplement the
> search
>  > components to bind the values directly to a map. I'll study this a
> little bit
>  > more to see if I can find a better way.
>  >
>  > Here is the code:
>  >
>  > /** Maps a block to the name of the property last edited by the block.
>  > *
>  > * This is used to support search in the list page. It is a hack until we
>  > * find a proper way.
>  > *
>  > * It is never null.
>  > */
>  > private Map<Block, String> searchBlocks = new HashMap<Block, String>();
>  >
>  > /** Maps a property name to the vaue of that property.
>  > *
>  > * This is used to support search in the list page. It is a hack until we
>  > * find a proper way.
>  > *
>  > * It is never null.
>  > */
>  > public abstract Map<String, Object> getSearchValues();
>  > public abstract void setSearchValues(final Map<String, Object> values);
>  >
>  > public Block getBlock() {
>  > String propertyName = getPropertyDescriptor().getName();
>  >
>  > Block searchBlock = getBlockFinder().findBlock(getRequestCycle(),
>  > getPropertyDescriptor());
>  >
>  > /* Saves the value of the block in the search map.
>  > */
>  > if (searchBlocks.get(searchBlock) != null) {
>  > Object value = null;
>  > for (IRender render : searchBlock.getBody()) {
>  > if (render instanceof SimpleSearchField) {
>  > value = ((SimpleSearchField) render).getValue();
>  > break;
>  > }
>  > }
>  > getSearchValues().put(searchBlocks.get(searchBlock), value);
>  > }
>  > searchBlocks.put(searchBlock, propertyName);
>  >
>  > PropertyUtils.write(searchBlock.getPage(), "criteria", getCriteria());
>  >
>  > if (getSearchValues().containsKey(propertyName)) {
>  > for (IRender render : searchBlock.getBody()) {
>  > if (render instanceof SimpleSearchField) {
>  > Object value = getSearchValues().get(propertyName);
>  > ((SimpleSearchField) render).setValue(value);
>  > }
>  > }
>  > }
>  > return searchBlock;
>  > }
>  >
>  > Alejandro Scandroli wrote:
>  > > Hi Pablo
>  > >
>  > > I see your issue now.
>  > > First of all I didn't expect it to work at all, so I'm quite surprised.
>  > > The "criteria" is created on the SearchForm.pageBeginRender method, so
>  > > it's not being shared across requests.
>  > > The search field values aren't persisted in either client or session.
>  > > They neither are binded to anything so I would asume they should be
>  > > NULL every time we take the component out of the editors page.
>  > > It looks like my asumtions were wrong, the values ARE shared across
>  > > all the instances of the same component in the same request cycle.
>  > >
>  > > I think this fixes it:
>  > >
>  > > +++
> modules/trails-hibernate/src/main/java/org/trails/component/search/SimpleSearchField.java
> Thu
>  > > Jul 03 12:28:55 CEST 2008
>  > > + protected void cleanupAfterRender(IRequestCycle cycle)
>  > > + {
>  > > + setValue(null);
>  > > + }
>  > >
>  > > But I have to do a deeper test to confirm.
>  > > Please test the attached patch and then let me know how it goes.
>  > >
>  > >
>  > > Saludos.
>  > > Alejandro.
>  > >
>  > > --
>  > > Alejandro Scandroli - http://weblog.amneris.es/
>  > > Amneris: We build process-driven web applications.
>  > > http://www.amneris.es
>  > >
>  > >
>  > >
>  > > On Thu, Jul 3, 2008 at 4:00 AM, Pablo Gra~na
> <pablo.grana@...> wrote:
>  > >> no, just what I posted. Just to be sure, I deleted my local maven
>  > >> repository, checked out the head from scratch, applied the patch and
>  > >> rebuilt. It gave the same result I posted earlier: the search form
> gets
>  > >> populated with the wrong values.
>  > >>
>  > >> thank a lot.
>  > >>
>  > >> Ken in nashua wrote:
>  > >>> did you make modifications to the *.page file?
>  > >>> If so what are they.
>  > >>>
>  > >>> Best regards
>  > >>> Ken in nashua
>  > >>>
>  > >>>
>  > >>>
>  > >>>
> ------------------------------------------------------------------------
>  > >>> From: nhhockeyplayer@...
>  > >>> To: users@...
>  > >>> Date: Wed, 2 Jul 2008 12:02:27 -0400
>  > >>> Subject: RE: [trails-users] list + search
>  > >>>
>  > >>> My runtime produces this...
>  > >>>
>  > >>> I am working on getting it running
>  > >>>
>  > >>> An exception has occurred. You may continue by *restarting
>  > >>> <http://localhost:8080/restart.svc>* the session.
>  > >>> [ +/- ] Exception: java.lang.NullPointerException
>  > >>> <http://localhost:8080/trails/list/League#>
>  > >>> org.apache.hivemind.ApplicationRuntimeException
>  > >>>
>  > >>> component:
>  > >>>
>  > >>> $HibernateListPage_15@3c1[LeagueList]
>  > >>>
>  > >>> location:
>  > >>>
>  > >>> context:/WEB-INF/DefaultList.page, line 3, column 63
>  > >>> 1
>  > >>>
>  > >>> <!DOCTYPE page-specification PUBLIC "-//Apache Software
>  > >>> Foundation//Tapestry Specification 4.1//EN"
>  > >>>
>  > >>> 2
>  > >>>
>  > >>> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd">
>  > >>>
>  > >>> 3
>  > >>>
>  > >>> <page-specification class="org.trails.page.HibernateListPage">
>  > >>>
>  > >>> 4
>  > >>>
>  > >>>
>  > >>>
>  > >>> 5
>  > >>>
>  > >>> <property name="instances" persist="session"/>
>  > >>>
>  > >>> 6
>  > >>>
>  > >>> <property name="criteria" persist="session"/>
>  > >>>
>  > >>> 7
>  > >>>
>  > >>> <property name="classDescriptor" persist="session"/>
>  > >>>
>  > >>> 8
>  > >>>
>  > >>>
>  > >>>
>  > >>>
>  > >>>
>  > >>>
>  > >>> [ +/- ] Exception: java.lang.NullPointerException
>  > >>> <http://localhost:8080/trails/list/League#>
>  > >>> org.trails.exception.TrailsRuntimeException
>  > >>> Stack Trace:
>  > >>>
>  > >>> *
>  > >>>
> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:92)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.form.DefaultOptionRenderer.renderOptions(DefaultOptionRenderer.java:60)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.form.PropertySelection.renderFormComponent(PropertySelection.java:75)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:104)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>  > >>>
>  > >>> *
>  > >>>
> org.trails.component.search.SimpleSearchField.renderComponent(SimpleSearchField.java:44)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.components.Block.renderForComponent(Block.java:65)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.components.RenderBlock.renderComponent(RenderBlock.java:65)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.components.ForBean.renderComponent(ForBean.java:181)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:503)
>  > >>>
>  > >>> * org.apache.tapestry.form.Form.renderComponent(Form.java:217)
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>  > >>>
>  > >>> * org.apache.tapestry.html.Body.renderComponent(Body.java:38)
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>  > >>>
>  > >>> * org.apache.tapestry.html.Shell.renderComponent(Shell.java:125)
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:185)
>  > >>>
>  > >>> * org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:249)
>  > >>> *
>  > >>>
> org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:400)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:159)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)
>  > >>>
>  > >>> *
>  > >>>
> $ResponseRenderer_11ae45b759a.renderResponse($ResponseRenderer_11ae45b759a.java)
>  > >>>
>  > >>> *
>  > >>>
> org.trails.engine.TrailsPagesService.service(TrailsPagesService.java:111)
>  > >>>
>  > >>> *
> $IEngineService_11ae45b760b.service($IEngineService_11ae45b760b.java)
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.engi`ne.AbstractEngine.service(AbstractEngine.java:241)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
>  > >>>
>  > >>> *
>  > >>>
> $WebRequestServicer_11ae45b75e4.service($WebRequestServicer_11ae45b75e4.java)
>  > >>>
>  > >>> *
>  > >>>
> $WebRequestServicer_11ae45b75e0.service($WebRequestServicer_11ae45b75e0.java)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
>  > >>>
>  > >>> *
>  > >>>
> $ServletRequestServicer_11ae45b75c6.service($ServletRequestServicer_11ae45b75c6.java)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
>  > >>>
>  > >>> *
>  > >>>
> $ServletRequestServicerFilter_11ae45b75c2.service($ServletRequestServicerFilter_11ae45b75c2.java)
>  > >>>
>  > >>> *
>  > >>>
> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
>  > >>>
>  > >>> *
>  > >>>
> $ServletRequestServicerFilter_11ae45b75c0.service($ServletRequestServicerFilter_11ae45b75c0.java)
>  > >>>
>  > >>> *
>  > >>>
> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
>  > >>>
>  > >>> *
>  > >>>
> $ServletRequestServicerFilter_11ae45b75c4.service($ServletRequestServicerFilter_11ae45b75c4.java)
>  > >>>
>  > >>> *
>  > >>>
> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>  > >>>
>  > >>> *
>  > >>>
> $ServletRequestServicer_11ae45b75ba.service($ServletRequestServicer_11ae45b75ba.java)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
>  > >>>
>  > >>> *
>  > >>>
> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
>  > >>>
>  > >>> * javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>  > >>> * javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  > >>> *
>  > >>>
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
>  > >>>
>  > >>> *
>  > >>>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
>  > >>>
>  > >>> *
>  > >>>
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>  > >>>
>  > >>> *
>  > >>>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>  > >>>
>  > >>> *
>  > >>>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>  > >>>
>  > >>> *
>  > >>>
> org.trails.security.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:152)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
>  > >>>
>  > >>> *
>  > >>>
> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
>  > >>>
>  > >>> *
>  > >>>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>  > >>>
>  > >>> *
>  > >>>
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
>  > >>>
>  > >>> *
>  > >>>
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
>  > >>>
>  > >>> *
>  > >>>
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>  > >>>
>  > >>> *
>  > >>>
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
>  > >>>
>  > >>> *
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
>  > >>> *
>  > >>>
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
>  > >>>
>  > >>> *
>  > >>>
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>  > >>>
>  > >>> *
>  > >>>
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>  > >>>
>  > >>> * org.mortbay.jetty.Server.handle(Server.java:285)
>  > >>> *
>  > >>>
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
>  > >>>
>  > >>> *
>  > >>>
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
>  > >>>
>  > >>> * org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
>  > >>> * org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
>  > >>> * org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
>  > >>> *
>  > >>>
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
>  > >>>
>  > >>> *
>  > >>>
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
>  > >>>
>  > >>> * Caused by: java.lang.NullPointerException
>  > >>> *
>  > >>>
> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:89)
>  > >>>
>  > >>> * ... 112 more
>  > >>>
>  > >>>
>  > >>> Best regards
>  > >>> Ken in nashua
>  > >>>
>  > >>>
>  > >>>
>  > >>> > Date: Tue, 1 Jul 2008 19:55:43 -0300
>  > >>> > From: pablo.grana@...
>  > >>> > To: users@...
>  > >>> > Subject: Re: [trails-users] list + search
>  > >>> >
>  > >>> > Here is a way to reproduce it. Attached is a diff that simply
> adds the
>  > >>> search
>  > >>> > trails:SearchForm component to the list page.
>  > >>> >
>  > >>> > To see the problem, log in and go to the 'List Team Years' menu
> link.
>  > >>> In the
>  > >>> > Year Start field enter a number. You will see that the list is
>  > >>> correctly
>  > >>> > filtered after 'search', but the form is cleared.
>  > >>> >
>  > >>> > If you now enter a value in the 'Year End' field and click
> search, both
>  > >>> 'Year
>  > >>> > Start' and 'Year End' are filled with the same value. The
> result of the
>  > >>> search
>  > >>> > is correct.
>  > >>> >
>  > >>> > IFAIK, the implementation of the SearchForm does not store what the
>  > >>> user
>  > >>> > entered. it just uses the data to create a criterion and then
> stores it
>  > >>> in the
>  > >>> > component 'value' field. Once the second form field (ie: 'Year
> End') is
>  > >>> > processed (in a rewind), trails picks the same block object and
> sets
>  > >>> the value
>  > >>> > to the value entered in that field. Then, (when not rewinding but
>  > >>> rendering),
>  > >>> > trails draws the 'Year Start' field, using the same block that now
>  > >>> contains the
>  > >>> > value of the 'Year End' field.
>  > >>> >
>  > >>> > Note: this is against trails svn trunk (1.2-SNAPSHOT).
>  > >>> >
>  > >>> > Hope this helps ...
>  > >>> >
>  > >>> > regards.
>  > >>> >
>  > >>> > Alejandro Scandroli wrote:
>  > >>> > > Hi Pablo
>  > >>> > >
>  > >>> > > I'm sorry but I'm not following. Did you mean that your
> search form
>  > >>> > > it's always being cleared; it's never being cleared, or it's
>  > >>> > > "randomly" being cleared.
>  > >>> > > Can you show me your code?
>  > >>> > >
>  > >>> > > Saludos.
>  > >>> > > Alejandro.
>  > >>> > >
>  > >>> > > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na
>  > >>> <pablo.grana@...> wrote:
>  > >>> > >> Hi there.
>  > >>> > >>
>  > >>> > >> I want the search form at the top of the list of entities.
> Is there
>  > >>> an easy
>  > >>> > >> way? I put the search component in the DefaultList.html, but it
>  > >>> works
>  > >>> > >> partially: when the form is recreated, the status of the
> search page
>  > >>> fields
>  > >>> > >> are correctly restored, neither cleaned: some values are
> overwriten
>  > >>> with the
>  > >>> > >> values in other forms.
>  > >>> > >>
>  > >>> > >> I know close to nothing about tapestry, but I imagine that the
>  > >>> problem is in
>  > >>> > >> the way the value for the input tag is handled: instead of
> storing
>  > >>> the value
>  > >>> > >> in the page, the search component is used to create a new
> criterion
>  > >>> and
>  > >>> > >> reused for the next input tag.
>  > >>> > >>
>  > >>> > >> I am now hacking a bit (with trails 1.1.1, unfortunately), but I
>  > >>> will
>  > >>> > >> probably spend some time to get this working for other projects
>  > >>> using a
>  > >>> > >> 1.2-SNAPSHOT. Any hints?
>  > >>> > >>
>  > >>> > >> thanks a lot.
>  > >>> > >>
>  > >>> > >>
>  > >>> > >>
>  > >>> ---------------------------------------------------------------------
>  > >>> > >> To unsubscribe from this list, please visit:
>  > >>> > >>
>  > >>> > >> http://xircles.codehaus.org/manage_email
>  > >>> > >>
>  > >>> > >>
>  > >>> > >>
>  > >>> > >
>  > >>> > >
> ---------------------------------------------------------------------
>  > >>> > > To unsubscribe from this list, please visit:
>  > >>> > >
>  > >>> > > http://xircles.codehaus.org/manage_email
>  > >>> > >
>  > >>> > >
>  > >>> >
>  > >>> > --
>  > >>> > Pablo Gra\~na
>  > >>> > Chief Architect
>  > >>> > Globant
>  > >>> > Arg Office: +54 (11) 4109 1743
>  > >>> > UK Office: +44 (20) 7043 8269 int 8043
>  > >>> > US Office: +1 (212) 400 7686 int 8043
>  > >>> >
>  > >>>
>  > >>>
> ------------------------------------------------------------------------
>  > >>> Do more with your photos with Windows Live Photo Gallery. Get Windows
>  > >>> Live-Free
>  > >>>
> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
>  > >>>
> ------------------------------------------------------------------------
>  > >>> Do more with your photos with Windows Live Photo Gallery. Get Windows
>  > >>> Live-Free
>  > >>>
> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
>  > >> --
>  > >> Pablo Gra\~na
>  > >> Chief Architect
>  > >> Globant
>  > >> Arg Office: +54 (11) 4109 1743
>  > >> UK Office: +44 (20) 7043 8269 int 8043
>  > >> US Office: +1 (212) 400 7686 int 8043
>  > >>
>  > >>
>  > >> ---------------------------------------------------------------------
>  > >> To unsubscribe from this list, please visit:
>  > >>
>  > >> http://xircles.codehaus.org/manage_email
>  > >>
>  > >>
>  > >>
>  > >>
>  > >>
> ------------------------------------------------------------------------
>  > >>
>  > >> ---------------------------------------------------------------------
>  > >> To unsubscribe from this list, please visit:
>  > >>
>  > >> http://xircles.codehaus.org/manage_email
>  >
>  > --
>  > Pablo Gra\~na
>  > Chief Architect
>  > Globant
>  > Arg Office: +54 (11) 4109 1743
>  > UK Office: +44 (20) 7043 8269 int 8043
>  > US Office: +1 (212) 400 7686 int 8043
>  >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe from this list, please visit:
>  >
>  > http://xircles.codehaus.org/manage_email
>  >
>  >
>
> ------------------------------------------------------------------------
> Windows Live Hotmail is giving away Zunes. Enter for your chance to win.
> Enter Now!
> <http://www.windowslive-hotmail.com/ZuneADay/?locale=en-US&ocid=TXT_TAGLM_Mobile_Zune_V3>

--
Pablo Gra\~na
Chief Architect
Globant
Arg Office: +54 (11) 4109 1743
UK  Office: +44 (20) 7043 8269 int 8043
US  Office: +1 (212) 400 7686 int 8043


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: list + search

by Alejandro Scandroli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hola Pablo

It's true, the search component do not bind the field values to anything.
The correct way (I think) is to bind the values to a model in the page.
I've filed a jira issue to track this:
http://jira.codehaus.org/browse/TRAILS-159
and I've provided a working patch for 1.1.1

Take a look at it and let me know if it works for you.

Saludos.
Alejandro.


On Thu, Jul 3, 2008 at 9:47 PM, Pablo Gra~na <pablo.grana@...> wrote:

> Yes, what I did was a really nasty hack. The thing is that the search
> component do not bind the fields, so the data is kept in each search block.
> I suppose that the correct thing to do is to rewrite the search blocks to
> bind the fields somewhere. I'll take a look at it in a couple of days.
>
> regards
>
> Ken in nashua wrote:
>>
>> I never thought persisting form fields could ever get so complicated.
>>
>> Isn't this suppose to be automatically taken care of tapestry and ognl as
>> it renders the objects data to the form... Isn't that what bindings are for?
>>
>> RIGHT ?
>>
>> Best regards
>> Ken in nashua
>>
>>
>>
>>  > Date: Thu, 3 Jul 2008 13:02:26 -0300
>>  > From: pablo.grana@...
>>  > To: users@...
>>  > Subject: Re: [trails-users] list + search
>>  >
>>  > I imagine that this will work, but the search form will be cleared. I
>> managed to
>>  > implement a workaround that keeps the form values after search. It is
>> really
>>  > nasty, but works (in trails 1.1.1). I overrode the getBlock method.
>>  >
>>  > When getBlock is called, I stores in a map the block (as a key) and the
>> name of
>>  > the property that the block will edit. This map will have as many
>> blocks as
>>  > 'type of properties', generally less than the number of properties in
>> the search
>>  > form. So this map holds the name of the last property edited by that
>> block.
>>  >
>>  > The other thing is to keep a map of property names to values. Each key
>> in this
>>  > map is obtained from the previous map. This gives us the name of the
>> property
>>  > previously edited by the current block, so the current block should
>> contain the
>>  > value of such property.
>>  >
>>  > I went through this stuff because I don't know how to reimplement the
>> search
>>  > components to bind the values directly to a map. I'll study this a
>> little bit
>>  > more to see if I can find a better way.
>>  >
>>  > Here is the code:
>>  >
>>  > /** Maps a block to the name of the property last edited by the block.
>>  > *
>>  > * This is used to support search in the list page. It is a hack until
>> we
>>  > * find a proper way.
>>  > *
>>  > * It is never null.
>>  > */
>>  > private Map<Block, String> searchBlocks = new HashMap<Block, String>();
>>  >
>>  > /** Maps a property name to the vaue of that property.
>>  > *
>>  > * This is used to support search in the list page. It is a hack until
>> we
>>  > * find a proper way.
>>  > *
>>  > * It is never null.
>>  > */
>>  > public abstract Map<String, Object> getSearchValues();
>>  > public abstract void setSearchValues(final Map<String, Object> values);
>>  >
>>  > public Block getBlock() {
>>  > String propertyName = getPropertyDescriptor().getName();
>>  >
>>  > Block searchBlock = getBlockFinder().findBlock(getRequestCycle(),
>>  > getPropertyDescriptor());
>>  >
>>  > /* Saves the value of the block in the search map.
>>  > */
>>  > if (searchBlocks.get(searchBlock) != null) {
>>  > Object value = null;
>>  > for (IRender render : searchBlock.getBody()) {
>>  > if (render instanceof SimpleSearchField) {
>>  > value = ((SimpleSearchField) render).getValue();
>>  > break;
>>  > }
>>  > }
>>  > getSearchValues().put(searchBlocks.get(searchBlock), value);
>>  > }
>>  > searchBlocks.put(searchBlock, propertyName);
>>  >
>>  > PropertyUtils.write(searchBlock.getPage(), "criteria", getCriteria());
>>  >
>>  > if (getSearchValues().containsKey(propertyName)) {
>>  > for (IRender render : searchBlock.getBody()) {
>>  > if (render instanceof SimpleSearchField) {
>>  > Object value = getSearchValues().get(propertyName);
>>  > ((SimpleSearchField) render).setValue(value);
>>  > }
>>  > }
>>  > }
>>  > return searchBlock;
>>  > }
>>  >
>>  > Alejandro Scandroli wrote:
>>  > > Hi Pablo
>>  > >
>>  > > I see your issue now.
>>  > > First of all I didn't expect it to work at all, so I'm quite
>> surprised.
>>  > > The "criteria" is created on the SearchForm.pageBeginRender method,
>> so
>>  > > it's not being shared across requests.
>>  > > The search field values aren't persisted in either client or session.
>>  > > They neither are binded to anything so I would asume they should be
>>  > > NULL every time we take the component out of the editors page.
>>  > > It looks like my asumtions were wrong, the values ARE shared across
>>  > > all the instances of the same component in the same request cycle.
>>  > >
>>  > > I think this fixes it:
>>  > >
>>  > > +++
>> modules/trails-hibernate/src/main/java/org/trails/component/search/SimpleSearchField.java
>> Thu
>>  > > Jul 03 12:28:55 CEST 2008
>>  > > + protected void cleanupAfterRender(IRequestCycle cycle)
>>  > > + {
>>  > > + setValue(null);
>>  > > + }
>>  > >
>>  > > But I have to do a deeper test to confirm.
>>  > > Please test the attached patch and then let me know how it goes.
>>  > >
>>  > >
>>  > > Saludos.
>>  > > Alejandro.
>>  > >
>>  > > --
>>  > > Alejandro Scandroli - http://weblog.amneris.es/
>>  > > Amneris: We build process-driven web applications.
>>  > > http://www.amneris.es
>>  > >
>>  > >
>>  > >
>>  > > On Thu, Jul 3, 2008 at 4:00 AM, Pablo Gra~na
>> <pablo.grana@...> wrote:
>>  > >> no, just what I posted. Just to be sure, I deleted my local maven
>>  > >> repository, checked out the head from scratch, applied the patch and
>>  > >> rebuilt. It gave the same result I posted earlier: the search form
>> gets
>>  > >> populated with the wrong values.
>>  > >>
>>  > >> thank a lot.
>>  > >>
>>  > >> Ken in nashua wrote:
>>  > >>> did you make modifications to the *.page file?
>>  > >>> If so what are they.
>>  > >>>
>>  > >>> Best regards
>>  > >>> Ken in nashua
>>  > >>>
>>  > >>>
>>  > >>>
>>  > >>>
>> ------------------------------------------------------------------------
>>  > >>> From: nhhockeyplayer@...
>>  > >>> To: users@...
>>  > >>> Date: Wed, 2 Jul 2008 12:02:27 -0400
>>  > >>> Subject: RE: [trails-users] list + search
>>  > >>>
>>  > >>> My runtime produces this...
>>  > >>>
>>  > >>> I am working on getting it running
>>  > >>>
>>  > >>> An exception has occurred. You may continue by *restarting
>>  > >>> <http://localhost:8080/restart.svc>* the session.
>>  > >>> [ +/- ] Exception: java.lang.NullPointerException
>>  > >>> <http://localhost:8080/trails/list/League#>
>>  > >>> org.apache.hivemind.ApplicationRuntimeException
>>  > >>>
>>  > >>> component:
>>  > >>>
>>  > >>> $HibernateListPage_15@3c1[LeagueList]
>>  > >>>
>>  > >>> location:
>>  > >>>
>>  > >>> context:/WEB-INF/DefaultList.page, line 3, column 63
>>  > >>> 1
>>  > >>>
>>  > >>> <!DOCTYPE page-specification PUBLIC "-//Apache Software
>>  > >>> Foundation//Tapestry Specification 4.1//EN"
>>  > >>>
>>  > >>> 2
>>  > >>>
>>  > >>> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd">
>>  > >>>
>>  > >>> 3
>>  > >>>
>>  > >>> <page-specification class="org.trails.page.HibernateListPage">
>>  > >>>
>>  > >>> 4
>>  > >>>
>>  > >>>
>>  > >>>
>>  > >>> 5
>>  > >>>
>>  > >>> <property name="instances" persist="session"/>
>>  > >>>
>>  > >>> 6
>>  > >>>
>>  > >>> <property name="criteria" persist="session"/>
>>  > >>>
>>  > >>> 7
>>  > >>>
>>  > >>> <property name="classDescriptor" persist="session"/>
>>  > >>>
>>  > >>> 8
>>  > >>>
>>  > >>>
>>  > >>>
>>  > >>>
>>  > >>>
>>  > >>>
>>  > >>> [ +/- ] Exception: java.lang.NullPointerException
>>  > >>> <http://localhost:8080/trails/list/League#>
>>  > >>> org.trails.exception.TrailsRuntimeException
>>  > >>> Stack Trace:
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:92)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.form.DefaultOptionRenderer.renderOptions(DefaultOptionRenderer.java:60)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.form.PropertySelection.renderFormComponent(PropertySelection.java:75)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:104)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.trails.component.search.SimpleSearchField.renderComponent(SimpleSearchField.java:44)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.components.Block.renderForComponent(Block.java:65)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.components.RenderBlock.renderComponent(RenderBlock.java:65)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.components.ForBean.renderComponent(ForBean.java:181)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:503)
>>  > >>>
>>  > >>> * org.apache.tapestry.form.Form.renderComponent(Form.java:217)
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>  > >>>
>>  > >>> * org.apache.tapestry.html.Body.renderComponent(Body.java:38)
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>  > >>>
>>  > >>> * org.apache.tapestry.html.Shell.renderComponent(Shell.java:125)
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:185)
>>  > >>>
>>  > >>> *
>> org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:249)
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:400)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:159)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)
>>  > >>>
>>  > >>> *
>>  > >>>
>> $ResponseRenderer_11ae45b759a.renderResponse($ResponseRenderer_11ae45b759a.java)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.trails.engine.TrailsPagesService.service(TrailsPagesService.java:111)
>>  > >>>
>>  > >>> *
>> $IEngineService_11ae45b760b.service($IEngineService_11ae45b760b.java)
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.engi`ne.AbstractEngine.service(AbstractEngine.java:241)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
>>  > >>>
>>  > >>> *
>>  > >>>
>> $WebRequestServicer_11ae45b75e4.service($WebRequestServicer_11ae45b75e4.java)
>>  > >>>
>>  > >>> *
>>  > >>>
>> $WebRequestServicer_11ae45b75e0.service($WebRequestServicer_11ae45b75e0.java)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
>>  > >>>
>>  > >>> *
>>  > >>>
>> $ServletRequestServicer_11ae45b75c6.service($ServletRequestServicer_11ae45b75c6.java)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
>>  > >>>
>>  > >>> *
>>  > >>>
>> $ServletRequestServicerFilter_11ae45b75c2.service($ServletRequestServicerFilter_11ae45b75c2.java)
>>  > >>>
>>  > >>> *
>>  > >>>
>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
>>  > >>>
>>  > >>> *
>>  > >>>
>> $ServletRequestServicerFilter_11ae45b75c0.service($ServletRequestServicerFilter_11ae45b75c0.java)
>>  > >>>
>>  > >>> *
>>  > >>>
>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
>>  > >>>
>>  > >>> *
>>  > >>>
>> $ServletRequestServicerFilter_11ae45b75c4.service($ServletRequestServicerFilter_11ae45b75c4.java)
>>  > >>>
>>  > >>> *
>>  > >>>
>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>  > >>>
>>  > >>> *
>>  > >>>
>> $ServletRequestServicer_11ae45b75ba.service($ServletRequestServicer_11ae45b75ba.java)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
>>  > >>>
>>  > >>> * javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>>  > >>> * javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.trails.security.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:152)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
>>  > >>>
>>  > >>> *
>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>>  > >>>
>>  > >>> * org.mortbay.jetty.Server.handle(Server.java:285)
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
>>  > >>>
>>  > >>> * org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
>>  > >>> * org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
>>  > >>> * org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
>>  > >>> *
>>  > >>>
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
>>  > >>>
>>  > >>> *
>>  > >>>
>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
>>  > >>>
>>  > >>> * Caused by: java.lang.NullPointerException
>>  > >>> *
>>  > >>>
>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:89)
>>  > >>>
>>  > >>> * ... 112 more
>>  > >>>
>>  > >>>
>>  > >>> Best regards
>>  > >>> Ken in nashua
>>  > >>>
>>  > >>>
>>  > >>>
>>  > >>> > Date: Tue, 1 Jul 2008 19:55:43 -0300
>>  > >>> > From: pablo.grana@...
>>  > >>> > To: users@...
>>  > >>> > Subject: Re: [trails-users] list + search
>>  > >>> >
>>  > >>> > Here is a way to reproduce it. Attached is a diff that simply
>> adds the
>>  > >>> search
>>  > >>> > trails:SearchForm component to the list page.
>>  > >>> >
>>  > >>> > To see the problem, log in and go to the 'List Team Years' menu
>> link.
>>  > >>> In the
>>  > >>> > Year Start field enter a number. You will see that the list is
>>  > >>> correctly
>>  > >>> > filtered after 'search', but the form is cleared.
>>  > >>> >
>>  > >>> > If you now enter a value in the 'Year End' field and click
>> search, both
>>  > >>> 'Year
>>  > >>> > Start' and 'Year End' are filled with the same value. The result
>> of the
>>  > >>> search
>>  > >>> > is correct.
>>  > >>> >
>>  > >>> > IFAIK, the implementation of the SearchForm does not store what
>> the
>>  > >>> user
>>  > >>> > entered. it just uses the data to create a criterion and then
>> stores it
>>  > >>> in the
>>  > >>> > component 'value' field. Once the second form field (ie: 'Year
>> End') is
>>  > >>> > processed (in a rewind), trails picks the same block object and
>> sets
>>  > >>> the value
>>  > >>> > to the value entered in that field. Then, (when not rewinding but
>>  > >>> rendering),
>>  > >>> > trails draws the 'Year Start' field, using the same block that
>> now
>>  > >>> contains the
>>  > >>> > value of the 'Year End' field.
>>  > >>> >
>>  > >>> > Note: this is against trails svn trunk (1.2-SNAPSHOT).
>>  > >>> >
>>  > >>> > Hope this helps ...
>>  > >>> >
>>  > >>> > regards.
>>  > >>> >
>>  > >>> > Alejandro Scandroli wrote:
>>  > >>> > > Hi Pablo
>>  > >>> > >
>>  > >>> > > I'm sorry but I'm not following. Did you mean that your search
>> form
>>  > >>> > > it's always being cleared; it's never being cleared, or it's
>>  > >>> > > "randomly" being cleared.
>>  > >>> > > Can you show me your code?
>>  > >>> > >
>>  > >>> > > Saludos.
>>  > >>> > > Alejandro.
>>  > >>> > >
>>  > >>> > > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na
>>  > >>> <pablo.grana@...> wrote:
>>  > >>> > >> Hi there.
>>  > >>> > >>
>>  > >>> > >> I want the search form at the top of the list of entities. Is
>> there
>>  > >>> an easy
>>  > >>> > >> way? I put the search component in the DefaultList.html, but
>> it
>>  > >>> works
>>  > >>> > >> partially: when the form is recreated, the status of the
>> search page
>>  > >>> fields
>>  > >>> > >> are correctly restored, neither cleaned: some values are
>> overwriten
>>  > >>> with the
>>  > >>> > >> values in other forms.
>>  > >>> > >>
>>  > >>> > >> I know close to nothing about tapestry, but I imagine that the
>>  > >>> problem is in
>>  > >>> > >> the way the value for the input tag is handled: instead of
>> storing
>>  > >>> the value
>>  > >>> > >> in the page, the search component is used to create a new
>> criterion
>>  > >>> and
>>  > >>> > >> reused for the next input tag.
>>  > >>> > >>
>>  > >>> > >> I am now hacking a bit (with trails 1.1.1, unfortunately), but
>> I
>>  > >>> will
>>  > >>> > >> probably spend some time to get this working for other
>> projects
>>  > >>> using a
>>  > >>> > >> 1.2-SNAPSHOT. Any hints?
>>  > >>> > >>
>>  > >>> > >> thanks a lot.
>>  > >>> > >>
>>  > >>> > >>
>>  > >>> > >>
>>  > >>>
>> ---------------------------------------------------------------------
>>  > >>> > >> To unsubscribe from this list, please visit:
>>  > >>> > >>
>>  > >>> > >> http://xircles.codehaus.org/manage_email
>>  > >>> > >>
>>  > >>> > >>
>>  > >>> > >>
>>  > >>> > >
>>  > >>> > >
>> ---------------------------------------------------------------------
>>  > >>> > > To unsubscribe from this list, please visit:
>>  > >>> > >
>>  > >>> > > http://xircles.codehaus.org/manage_email
>>  > >>> > >
>>  > >>> > >
>>  > >>> >
>>  > >>> > --
>>  > >>> > Pablo Gra\~na
>>  > >>> > Chief Architect
>>  > >>> > Globant
>>  > >>> > Arg Office: +54 (11) 4109 1743
>>  > >>> > UK Office: +44 (20) 7043 8269 int 8043
>>  > >>> > US Office: +1 (212) 400 7686 int 8043
>>  > >>> >
>>  > >>>
>>  > >>>
>> ------------------------------------------------------------------------
>>  > >>> Do more with your photos with Windows Live Photo Gallery. Get
>> Windows
>>  > >>> Live-Free
>>  > >>>
>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
>>  > >>>
>> ------------------------------------------------------------------------
>>  > >>> Do more with your photos with Windows Live Photo Gallery. Get
>> Windows
>>  > >>> Live-Free
>>  > >>>
>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
>>  > >> --
>>  > >> Pablo Gra\~na
>>  > >> Chief Architect
>>  > >> Globant
>>  > >> Arg Office: +54 (11) 4109 1743
>>  > >> UK Office: +44 (20) 7043 8269 int 8043
>>  > >> US Office: +1 (212) 400 7686 int 8043
>>  > >>
>>  > >>
>>  > >>
>> ---------------------------------------------------------------------
>>  > >> To unsubscribe from this list, please visit:
>>  > >>
>>  > >> http://xircles.codehaus.org/manage_email
>>  > >>
>>  > >>
>>  > >>
>>  > >>
>>  > >>
>> ------------------------------------------------------------------------
>>  > >>
>>  > >>
>> ---------------------------------------------------------------------
>>  > >> To unsubscribe from this list, please visit:
>>  > >>
>>  > >> http://xircles.codehaus.org/manage_email
>>  >
>>  > --
>>  > Pablo Gra\~na
>>  > Chief Architect
>>  > Globant
>>  > Arg Office: +54 (11) 4109 1743
>>  > UK Office: +44 (20) 7043 8269 int 8043
>>  > US Office: +1 (212) 400 7686 int 8043
>>  >
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe from this list, please visit:
>>  >
>>  > http://xircles.codehaus.org/manage_email
>>  >
>>  >
>>
>> ------------------------------------------------------------------------
>> Windows Live Hotmail is giving away Zunes. Enter for your chance to win.
>> Enter Now!
>> <http://www.windowslive-hotmail.com/ZuneADay/?locale=en-US&ocid=TXT_TAGLM_Mobile_Zune_V3>
>
> --
> Pablo Gra\~na
> Chief Architect
> Globant
> Arg Office: +54 (11) 4109 1743
> UK  Office: +44 (20) 7043 8269 int 8043
> US  Office: +1 (212) 400 7686 int 8043
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: list + search

by Pablo Gra\~na :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nice, thanks a lot. I did not look at it yet, just a quick overview. One thing I
imagine that could happen is the case of using an int instead of Integer in a
field. When the form shows up, it will probably display a 0, and the browser
will post that 0, effectively filtering by that field. Is my assumption correct?
If that is the case, I imagine that it would be nice to use something else as a
model (perhaps a map?)

Anyway, we could use Integer instead of int in our searchable fields.

thanks again.

Alejandro Scandroli wrote:

> Hola Pablo
>
> It's true, the search component do not bind the field values to anything.
> The correct way (I think) is to bind the values to a model in the page.
> I've filed a jira issue to track this:
> http://jira.codehaus.org/browse/TRAILS-159
> and I've provided a working patch for 1.1.1
>
> Take a look at it and let me know if it works for you.
>
> Saludos.
> Alejandro.
>
>
> On Thu, Jul 3, 2008 at 9:47 PM, Pablo Gra~na <pablo.grana@...> wrote:
>> Yes, what I did was a really nasty hack. The thing is that the search
>> component do not bind the fields, so the data is kept in each search block.
>> I suppose that the correct thing to do is to rewrite the search blocks to
>> bind the fields somewhere. I'll take a look at it in a couple of days.
>>
>> regards
>>
>> Ken in nashua wrote:
>>> I never thought persisting form fields could ever get so complicated.
>>>
>>> Isn't this suppose to be automatically taken care of tapestry and ognl as
>>> it renders the objects data to the form... Isn't that what bindings are for?
>>>
>>> RIGHT ?
>>>
>>> Best regards
>>> Ken in nashua
>>>
>>>
>>>
>>>  > Date: Thu, 3 Jul 2008 13:02:26 -0300
>>>  > From: pablo.grana@...
>>>  > To: users@...
>>>  > Subject: Re: [trails-users] list + search
>>>  >
>>>  > I imagine that this will work, but the search form will be cleared. I
>>> managed to
>>>  > implement a workaround that keeps the form values after search. It is
>>> really
>>>  > nasty, but works (in trails 1.1.1). I overrode the getBlock method.
>>>  >
>>>  > When getBlock is called, I stores in a map the block (as a key) and the
>>> name of
>>>  > the property that the block will edit. This map will have as many
>>> blocks as
>>>  > 'type of properties', generally less than the number of properties in
>>> the search
>>>  > form. So this map holds the name of the last property edited by that
>>> block.
>>>  >
>>>  > The other thing is to keep a map of property names to values. Each key
>>> in this
>>>  > map is obtained from the previous map. This gives us the name of the
>>> property
>>>  > previously edited by the current block, so the current block should
>>> contain the
>>>  > value of such property.
>>>  >
>>>  > I went through this stuff because I don't know how to reimplement the
>>> search
>>>  > components to bind the values directly to a map. I'll study this a
>>> little bit
>>>  > more to see if I can find a better way.
>>>  >
>>>  > Here is the code:
>>>  >
>>>  > /** Maps a block to the name of the property last edited by the block.
>>>  > *
>>>  > * This is used to support search in the list page. It is a hack until
>>> we
>>>  > * find a proper way.
>>>  > *
>>>  > * It is never null.
>>>  > */
>>>  > private Map<Block, String> searchBlocks = new HashMap<Block, String>();
>>>  >
>>>  > /** Maps a property name to the vaue of that property.
>>>  > *
>>>  > * This is used to support search in the list page. It is a hack until
>>> we
>>>  > * find a proper way.
>>>  > *
>>>  > * It is never null.
>>>  > */
>>>  > public abstract Map<String, Object> getSearchValues();
>>>  > public abstract void setSearchValues(final Map<String, Object> values);
>>>  >
>>>  > public Block getBlock() {
>>>  > String propertyName = getPropertyDescriptor().getName();
>>>  >
>>>  > Block searchBlock = getBlockFinder().findBlock(getRequestCycle(),
>>>  > getPropertyDescriptor());
>>>  >
>>>  > /* Saves the value of the block in the search map.
>>>  > */
>>>  > if (searchBlocks.get(searchBlock) != null) {
>>>  > Object value = null;
>>>  > for (IRender render : searchBlock.getBody()) {
>>>  > if (render instanceof SimpleSearchField) {
>>>  > value = ((SimpleSearchField) render).getValue();
>>>  > break;
>>>  > }
>>>  > }
>>>  > getSearchValues().put(searchBlocks.get(searchBlock), value);
>>>  > }
>>>  > searchBlocks.put(searchBlock, propertyName);
>>>  >
>>>  > PropertyUtils.write(searchBlock.getPage(), "criteria", getCriteria());
>>>  >
>>>  > if (getSearchValues().containsKey(propertyName)) {
>>>  > for (IRender render : searchBlock.getBody()) {
>>>  > if (render instanceof SimpleSearchField) {
>>>  > Object value = getSearchValues().get(propertyName);
>>>  > ((SimpleSearchField) render).setValue(value);
>>>  > }
>>>  > }
>>>  > }
>>>  > return searchBlock;
>>>  > }
>>>  >
>>>  > Alejandro Scandroli wrote:
>>>  > > Hi Pablo
>>>  > >
>>>  > > I see your issue now.
>>>  > > First of all I didn't expect it to work at all, so I'm quite
>>> surprised.
>>>  > > The "criteria" is created on the SearchForm.pageBeginRender method,
>>> so
>>>  > > it's not being shared across requests.
>>>  > > The search field values aren't persisted in either client or session.
>>>  > > They neither are binded to anything so I would asume they should be
>>>  > > NULL every time we take the component out of the editors page.
>>>  > > It looks like my asumtions were wrong, the values ARE shared across
>>>  > > all the instances of the same component in the same request cycle.
>>>  > >
>>>  > > I think this fixes it:
>>>  > >
>>>  > > +++
>>> modules/trails-hibernate/src/main/java/org/trails/component/search/SimpleSearchField.java
>>> Thu
>>>  > > Jul 03 12:28:55 CEST 2008
>>>  > > + protected void cleanupAfterRender(IRequestCycle cycle)
>>>  > > + {
>>>  > > + setValue(null);
>>>  > > + }
>>>  > >
>>>  > > But I have to do a deeper test to confirm.
>>>  > > Please test the attached patch and then let me know how it goes.
>>>  > >
>>>  > >
>>>  > > Saludos.
>>>  > > Alejandro.
>>>  > >
>>>  > > --
>>>  > > Alejandro Scandroli - http://weblog.amneris.es/
>>>  > > Amneris: We build process-driven web applications.
>>>  > > http://www.amneris.es
>>>  > >
>>>  > >
>>>  > >
>>>  > > On Thu, Jul 3, 2008 at 4:00 AM, Pablo Gra~na
>>> <pablo.grana@...> wrote:
>>>  > >> no, just what I posted. Just to be sure, I deleted my local maven
>>>  > >> repository, checked out the head from scratch, applied the patch and
>>>  > >> rebuilt. It gave the same result I posted earlier: the search form
>>> gets
>>>  > >> populated with the wrong values.
>>>  > >>
>>>  > >> thank a lot.
>>>  > >>
>>>  > >> Ken in nashua wrote:
>>>  > >>> did you make modifications to the *.page file?
>>>  > >>> If so what are they.
>>>  > >>>
>>>  > >>> Best regards
>>>  > >>> Ken in nashua
>>>  > >>>
>>>  > >>>
>>>  > >>>
>>>  > >>>
>>> ------------------------------------------------------------------------
>>>  > >>> From: nhhockeyplayer@...
>>>  > >>> To: users@...
>>>  > >>> Date: Wed, 2 Jul 2008 12:02:27 -0400
>>>  > >>> Subject: RE: [trails-users] list + search
>>>  > >>>
>>>  > >>> My runtime produces this...
>>>  > >>>
>>>  > >>> I am working on getting it running
>>>  > >>>
>>>  > >>> An exception has occurred. You may continue by *restarting
>>>  > >>> <http://localhost:8080/restart.svc>* the session.
>>>  > >>> [ +/- ] Exception: java.lang.NullPointerException
>>>  > >>> <http://localhost:8080/trails/list/League#>
>>>  > >>> org.apache.hivemind.ApplicationRuntimeException
>>>  > >>>
>>>  > >>> component:
>>>  > >>>
>>>  > >>> $HibernateListPage_15@3c1[LeagueList]
>>>  > >>>
>>>  > >>> location:
>>>  > >>>
>>>  > >>> context:/WEB-INF/DefaultList.page, line 3, column 63
>>>  > >>> 1
>>>  > >>>
>>>  > >>> <!DOCTYPE page-specification PUBLIC "-//Apache Software
>>>  > >>> Foundation//Tapestry Specification 4.1//EN"
>>>  > >>>
>>>  > >>> 2
>>>  > >>>
>>>  > >>> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd">
>>>  > >>>
>>>  > >>> 3
>>>  > >>>
>>>  > >>> <page-specification class="org.trails.page.HibernateListPage">
>>>  > >>>
>>>  > >>> 4
>>>  > >>>
>>>  > >>>
>>>  > >>>
>>>  > >>> 5
>>>  > >>>
>>>  > >>> <property name="instances" persist="session"/>
>>>  > >>>
>>>  > >>> 6
>>>  > >>>
>>>  > >>> <property name="criteria" persist="session"/>
>>>  > >>>
>>>  > >>> 7
>>>  > >>>
>>>  > >>> <property name="classDescriptor" persist="session"/>
>>>  > >>>
>>>  > >>> 8
>>>  > >>>
>>>  > >>>
>>>  > >>>
>>>  > >>>
>>>  > >>>
>>>  > >>>
>>>  > >>> [ +/- ] Exception: java.lang.NullPointerException
>>>  > >>> <http://localhost:8080/trails/list/League#>
>>>  > >>> org.trails.exception.TrailsRuntimeException
>>>  > >>> Stack Trace:
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:92)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.form.DefaultOptionRenderer.renderOptions(DefaultOptionRenderer.java:60)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.form.PropertySelection.renderFormComponent(PropertySelection.java:75)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:104)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.trails.component.search.SimpleSearchField.renderComponent(SimpleSearchField.java:44)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.components.Block.renderForComponent(Block.java:65)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.components.RenderBlock.renderComponent(RenderBlock.java:65)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.components.ForBean.renderComponent(ForBean.java:181)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:503)
>>>  > >>>
>>>  > >>> * org.apache.tapestry.form.Form.renderComponent(Form.java:217)
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>  > >>>
>>>  > >>> * org.apache.tapestry.html.Body.renderComponent(Body.java:38)
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
>>>  > >>>
>>>  > >>> * org.apache.tapestry.html.Shell.renderComponent(Shell.java:125)
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:185)
>>>  > >>>
>>>  > >>> *
>>> org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:249)
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:400)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:159)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> $ResponseRenderer_11ae45b759a.renderResponse($ResponseRenderer_11ae45b759a.java)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.trails.engine.TrailsPagesService.service(TrailsPagesService.java:111)
>>>  > >>>
>>>  > >>> *
>>> $IEngineService_11ae45b760b.service($IEngineService_11ae45b760b.java)
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.engi`ne.AbstractEngine.service(AbstractEngine.java:241)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> $WebRequestServicer_11ae45b75e4.service($WebRequestServicer_11ae45b75e4.java)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> $WebRequestServicer_11ae45b75e0.service($WebRequestServicer_11ae45b75e0.java)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> $ServletRequestServicer_11ae45b75c6.service($ServletRequestServicer_11ae45b75c6.java)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> $ServletRequestServicerFilter_11ae45b75c2.service($ServletRequestServicerFilter_11ae45b75c2.java)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> $ServletRequestServicerFilter_11ae45b75c0.service($ServletRequestServicerFilter_11ae45b75c0.java)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> $ServletRequestServicerFilter_11ae45b75c4.service($ServletRequestServicerFilter_11ae45b75c4.java)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> $ServletRequestServicer_11ae45b75ba.service($ServletRequestServicer_11ae45b75ba.java)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
>>>  > >>>
>>>  > >>> * javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>>>  > >>> * javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.trails.security.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:152)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
>>>  > >>>
>>>  > >>> *
>>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>>>  > >>>
>>>  > >>> * org.mortbay.jetty.Server.handle(Server.java:285)
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
>>>  > >>>
>>>  > >>> * org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
>>>  > >>> * org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
>>>  > >>> * org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
>>>  > >>>
>>>  > >>> *
>>>  > >>>
>>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
>>>  > >>>
>>>  > >>> * Caused by: java.lang.NullPointerException
>>>  > >>> *
>>>  > >>>
>>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:89)
>>>  > >>>
>>>  > >>> * ... 112 more
>>>  > >>>
>>>  > >>>
>>>  > >>> Best regards
>>>  > >>> Ken in nashua
>>>  > >>>
>>>  > >>>
>>>  > >>>
>>>  > >>> > Date: Tue, 1 Jul 2008 19:55:43 -0300
>>>  > >>> > From: pablo.grana@...
>>>  > >>> > To: users@...
>>>  > >>> > Subject: Re: [trails-users] list + search
>>>  > >>> >
>>>  > >>> > Here is a way to reproduce it. Attached is a diff that simply
>>> adds the
>>>  > >>> search
>>>  > >>> > trails:SearchForm component to the list page.
>>>  > >>> >
>>>  > >>> > To see the problem, log in and go to the 'List Team Years' menu
>>> link.
>>>  > >>> In the
>>>  > >>> > Year Start field enter a number. You will see that the list is
>>>  > >>> correctly
>>>  > >>> > filtered after 'search', but the form is cleared.
>>>  > >>> >
>>>  > >>> > If you now enter a value in the 'Year End' field and click
>>> search, both
>>>  > >>> 'Year
>>>  > >>> > Start' and 'Year End' are filled with the same value. The result
>>> of the
>>>  > >>> search
>>>  > >>> > is correct.
>>>  > >>> >
>>>  > >>> > IFAIK, the implementation of the SearchForm does not store what
>>> the
>>>  > >>> user
>>>  > >>> > entered. it just uses the data to create a criterion and then
>>> stores it
>>>  > >>> in the
>>>  > >>> > component 'value' field. Once the second form field (ie: 'Year
>>> End') is
>>>  > >>> > processed (in a rewind), trails picks the same block object and
>>> sets
>>>  > >>> the value
>>>  > >>> > to the value entered in that field. Then, (when not rewinding but
>>>  > >>> rendering),
>>>  > >>> > trails draws the 'Year Start' field, using the same block that
>>> now
>>>  > >>> contains the
>>>  > >>> > value of the 'Year End' field.
>>>  > >>> >
>>>  > >>> > Note: this is against trails svn trunk (1.2-SNAPSHOT).
>>>  > >>> >
>>>  > >>> > Hope this helps ...
>>>  > >>> >
>>>  > >>> > regards.
>>>  > >>> >
>>>  > >>> > Alejandro Scandroli wrote:
>>>  > >>> > > Hi Pablo
>>>  > >>> > >
>>>  > >>> > > I'm sorry but I'm not following. Did you mean that your search
>>> form
>>>  > >>> > > it's always being cleared; it's never being cleared, or it's
>>>  > >>> > > "randomly" being cleared.
>>>  > >>> > > Can you show me your code?
>>>  > >>> > >
>>>  > >>> > > Saludos.
>>>  > >>> > > Alejandro.
>>>  > >>> > >
>>>  > >>> > > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na
>>>  > >>> <pablo.grana@...> wrote:
>>>  > >>> > >> Hi there.
>>>  > >>> > >>
>>>  > >>> > >> I want the search form at the top of the list of entities. Is
>>> there
>>>  > >>> an easy
>>>  > >>> > >> way? I put the search component in the DefaultList.html, but
>>> it
>>>  > >>> works
>>>  > >>> > >> partially: when the form is recreated, the status of the
>>> search page
>>>  > >>> fields
>>>  > >>> > >> are correctly restored, neither cleaned: some values are
>>> overwriten
>>>  > >>> with the
>>>  > >>> > >> values in other forms.
>>>  > >>> > >>
>>>  > >>> > >> I know close to nothing about tapestry, but I imagine that the
>>>  > >>> problem is in
>>>  > >>> > >> the way the value for the input tag is handled: instead of
>>> storing
>>>  > >>> the value
>>>  > >>> > >> in the page, the search component is used to create a new
>>> criterion
>>>  > >>> and
>>>  > >>> > >> reused for the next input tag.
>>>  > >>> > >>
>>>  > >>> > >> I am now hacking a bit (with trails 1.1.1, unfortunately), but
>>> I
>>>  > >>> will
>>>  > >>> > >> probably spend some time to get this working for other
>>> projects
>>>  > >>> using a
>>>  > >>> > >> 1.2-SNAPSHOT. Any hints?
>>>  > >>> > >>
>>>  > >>> > >> thanks a lot.
>>>  > >>> > >>
>>>  > >>> > >>
>>>  > >>> > >>
>>>  > >>>
>>> ---------------------------------------------------------------------
>>>  > >>> > >> To unsubscribe from this list, please visit:
>>>  > >>> > >>
>>>  > >>> > >> http://xircles.codehaus.org/manage_email
>>>  > >>> > >>
>>>  > >>> > >>
>>>  > >>> > >>
>>>  > >>> > >
>>>  > >>> > >
>>> ---------------------------------------------------------------------
>>>  > >>> > > To unsubscribe from this list, please visit:
>>>  > >>> > >
>>>  > >>> > > http://xircles.codehaus.org/manage_email
>>>  > >>> > >
>>>  > >>> > >
>>>  > >>> >
>>>  > >>> > --
>>>  > >>> > Pablo Gra\~na
>>>  > >>> > Chief Architect
>>>  > >>> > Globant
>>>  > >>> > Arg Office: +54 (11) 4109 1743
>>>  > >>> > UK Office: +44 (20) 7043 8269 int 8043
>>>  > >>> > US Office: +1 (212) 400 7686 int 8043
>>>  > >>> >
>>>  > >>>
>>>  > >>>
>>> ------------------------------------------------------------------------
>>>  > >>> Do more with your photos with Windows Live Photo Gallery. Get
>>> Windows
>>>  > >>> Live-Free
>>>  > >>>
>>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
>>>  > >>>
>>> ------------------------------------------------------------------------
>>>  > >>> Do more with your photos with Windows Live Photo Gallery. Get
>>> Windows
>>>  > >>> Live-Free
>>>  > >>>
>>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
>>>  > >> --
>>>  > >> Pablo Gra\~na
>>>  > >> Chief Architect
>>>  > >> Globant
>>>  > >> Arg Office: +54 (11) 4109 1743
>>>  > >> UK Office: +44 (20) 7043 8269 int 8043
>>>  > >> US Office: +1 (212) 400 7686 int 8043
>>>  > >>
>>>  > >>
>>>  > >>
>>> ---------------------------------------------------------------------
>>>  > >> To unsubscribe from this list, please visit:
>>>  > >>
>>>  > >> http://xircles.codehaus.org/manage_email
>>>  > >>
>>>  > >>
>>>  > >>
>>>  > >>
>>>  > >>
>>> ------------------------------------------------------------------------
>>>  > >>
>>>  > >>
>>> ---------------------------------------------------------------------
>>>  > >> To unsubscribe from this list, please visit:
>>>  > >>
>>>  > >> http://xircles.codehaus.org/manage_email
>>>  >
>>>  > --
>>>  > Pablo Gra\~na
>>>  > Chief Architect
>>>  > Globant
>>>  > Arg Office: +54 (11) 4109 1743
>>>  > UK Office: +44 (20) 7043 8269 int 8043
>>>  > US Office: +1 (212) 400 7686 int 8043
>>>  >
>>>  >
>>>  > ---------------------------------------------------------------------
>>>  > To unsubscribe from this list, please visit:
>>>  >
>>>  > http://xircles.codehaus.org/manage_email
>>>  >
>>>  >
>>>
>>> ------------------------------------------------------------------------
>>> Windows Live Hotmail is giving away Zunes. Enter for your chance to win.
>>> Enter Now!
>>> <http://www.windowslive-hotmail.com/ZuneADay/?locale=en-US&ocid=TXT_TAGLM_Mobile_Zune_V3>
>> --
>> Pablo Gra\~na
>> Chief Architect
>> Globant
>> Arg Office: +54 (11) 4109 1743
>> UK  Office: +44 (20) 7043 8269 int 8043
>> US  Office: +1 (212) 400 7686 int 8043
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

--
Pablo Gra\~na
Chief Architect
Globant
Arg Office: +54 (11) 4109 1743
UK  Office: +44 (20) 7043 8269 int 8043
US  Office: +1 (212) 400 7686 int 8043


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



RE: list + search

by nhhockeyplayer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have found that Integer pans out fine with the past few ognl revisions... since last jan/feb. Before it hadn't been able to convert to/from strings.

Best regards
Ken in nashua



> Date: Mon, 7 Jul 2008 11:05:05 -0300
> From: pablo.grana@...
> To: users@...
> Subject: Re: [trails-users] list + search
>
> Nice, thanks a lot. I did not look at it yet, just a quick overview. One thing I
> imagine that could happen is the case of using an int instead of Integer in a
> field. When the form shows up, it will probably display a 0, and the browser
> will post that 0, effectively filtering by that field. Is my assumption correct?
> If that is the case, I imagine that it would be nice to use something else as a
> model (perhaps a map?)
>
> Anyway, we could use Integer instead of int in our searchable fields.
>
> thanks again.
>
> Alejandro Scandroli wrote:
> > Hola Pablo
> >
> > It's true, the search component do not bind the field values to anything.
> > The correct way (I think) is to bind the values to a model in the page.
> > I've filed a jira issue to track this:
> > http://jira.codehaus.org/browse/TRAILS-159
> > and I've provided a working patch for 1.1.1
> >
> > Take a look at it and let me know if it works for you.
> >
> > Saludos.
> > Alejandro.
> >
> >
> > On Thu, Jul 3, 2008 at 9:47 PM, Pablo Gra~na <pablo.grana@...> wrote:
> >> Yes, what I did was a really nasty hack. The thing is that the search
> >> component do not bind the fields, so the data is kept in each search block.
> >> I suppose that the correct thing to do is to rewrite the search blocks to
> >> bind the fields somewhere. I'll take a look at it in a couple of days.
> >>
> >> regards
> >>
> >> Ken in nashua wrote:
> >>> I never thought persisting form fields could ever get so complicated.
> >>>
> >>> Isn't this suppose to be automatically taken care of tapestry and ognl as
> >>> it renders the objects data to the form... Isn't that what bindings are for?
> >>>
> >>> RIGHT ?
> >>>
> >>> Best regards
> >>> Ken in nashua
> >>>
> >>>
> >>>
> >>> > Date: Thu, 3 Jul 2008 13:02:26 -0300
> >>> > From: pablo.grana@...
> >>> > To: users@...
> >>> > Subject: Re: [trails-users] list + search
> >>> >
> >>> > I imagine that this will work, but the search form will be cleared. I
> >>> managed to
> >>> > implement a workaround that keeps the form values after search. It is
> >>> really
> >>> > nasty, but works (in trails 1.1.1). I overrode the getBlock method.
> >>> >
> >>> > When getBlock is called, I stores in a map the block (as a key) and the
> >>> name of
> >>> > the property that the block will edit. This map will have as many
> >>> blocks as
> >>> > 'type of properties', generally less than the number of properties in
> >>> the search
> >>> > form. So this map holds the name of the last property edited by that
> >>> block.
> >>> >
> >>> > The other thing is to keep a map of property names to values. Each key
> >>> in this
> >>> > map is obtained from the previous map. This gives us the name of the
> >>> property
> >>> > previously edited by the current block, so the current block should
> >>> contain the
> >>> > value of such property.
> >>> >
> >>> > I went through this stuff because I don't know how to reimplement the
> >>> search
> >>> > components to bind the values directly to a map. I'll study this a
> >>> little bit
> >>> > more to see if I can find a better way.
> >>> >
> >>> > Here is the code:
> >>> >
> >>> > /** Maps a block to the name of the property last edited by the block.
> >>> > *
> >>> > * This is used to support search in the list page. It is a hack until
> >>> we
> >>> > * find a proper way.
> >>> > *
> >>> > * It is never null.
> >>> > */
> >>> > private Map<Block, String> searchBlocks = new HashMap<Block, String>();
> >>> >
> >>> > /** Maps a property name to the vaue of that property.
> >>> > *
> >>> > * This is used to support search in the list page. It is a hack until
> >>> we
> >>> > * find a proper way.
> >>> > *
> >>> > * It is never null.
> >>> > */
> >>> > public abstract Map<String, Object> getSearchValues();
> >>> > public abstract void setSearchValues(final Map<String, Object> values);
> >>> >
> >>> > public Block getBlock() {
> >>> > String propertyName = getPropertyDescriptor().getName();
> >>> >
> >>> > Block searchBlock = getBlockFinder().findBlock(getRequestCycle(),
> >>> > getPropertyDescriptor());
> >>> >
> >>> > /* Saves the value of the block in the search map.
> >>> > */
> >>> > if (searchBlocks.get(searchBlock) != null) {
> >>> > Object value = null;
> >>> > for (IRender render : searchBlock.getBody()) {
> >>> > if (render instanceof SimpleSearchField) {
> >>> > value = ((SimpleSearchField) render).getValue();
> >>> > break;
> >>> > }
> >>> > }
> >>> > getSearchValues().put(searchBlocks.get(searchBlock), value);
> >>> > }
> >>> > searchBlocks.put(searchBlock, propertyName);
> >>> >
> >>> > PropertyUtils.write(searchBlock.getPage(), "criteria", getCriteria());
> >>> >
> >>> > if (getSearchValues().containsKey(propertyName)) {
> >>> > for (IRender render : searchBlock.getBody()) {
> >>> > if (render instanceof SimpleSearchField) {
> >>> > Object value = getSearchValues().get(propertyName);
> >>> > ((SimpleSearchField) render).setValue(value);
> >>> > }
> >>> > }
> >>> > }
> >>> > return searchBlock;
> >>> > }
> >>> >
> >>> > Alejandro Scandroli wrote:
> >>> > > Hi Pablo
> >>> > >
> >>> > > I see your issue now.
> >>> > > First of all I didn't expect it to work at all, so I'm quite
> >>> surprised.
> >>> > > The "criteria" is created on the SearchForm.pageBeginRender method,
> >>> so
> >>> > > it's not being shared across requests.
> >>> > > The search field values aren't persisted in either client or session.
> >>> > > They neither are binded to anything so I would asume they should be
> >>> > > NULL every time we take the component out of the editors page.
> >>> > > It looks like my asumtions were wrong, the values ARE shared across
> >>> > > all the instances of the same component in the same request cycle.
> >>> > >
> >>> > > I think this fixes it:
> >>> > >
> >>> > > +++
> >>> modules/trails-hibernate/src/main/java/org/trails/component/search/SimpleSearchField.java
> >>> Thu
> >>> > > Jul 03 12:28:55 CEST 2008
> >>> > > + protected void cleanupAfterRender(IRequestCycle cycle)
> >>> > > + {
> >>> > > + setValue(null);
> >>> > > + }
> >>> > >
> >>> > > But I have to do a deeper test to confirm.
> >>> > > Please test the attached patch and then let me know how it goes.
> >>> > >
> >>> > >
> >>> > > Saludos.
> >>> > > Alejandro.
> >>> > >
> >>> > > --
> >>> > > Alejandro Scandroli - http://weblog.amneris.es/
> >>> > > Amneris: We build process-driven web applications.
> >>> > > http://www.amneris.es
> >>> > >
> >>> > >
> >>> > >
> >>> > > On Thu, Jul 3, 2008 at 4:00 AM, Pablo Gra~na
> >>> <pablo.grana@...> wrote:
> >>> > >> no, just what I posted. Just to be sure, I deleted my local maven
> >>> > >> repository, checked out the head from scratch, applied the patch and
> >>> > >> rebuilt. It gave the same result I posted earlier: the search form
> >>> gets
> >>> > >> populated with the wrong values.
> >>> > >>
> >>> > >> thank a lot.
> >>> > >>
> >>> > >> Ken in nashua wrote:
> >>> > >>> did you make modifications to the *.page file?
> >>> > >>> If so what are they.
> >>> > >>>
> >>> > >>> Best regards
> >>> > >>> Ken in nashua
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> ------------------------------------------------------------------------
> >>> > >>> From: nhhockeyplayer@...
> >>> > >>> To: users@...
> >>> > >>> Date: Wed, 2 Jul 2008 12:02:27 -0400
> >>> > >>> Subject: RE: [trails-users] list + search
> >>> > >>>
> >>> > >>> My runtime produces this...
> >>> > >>>
> >>> > >>> I am working on getting it running
> >>> > >>>
> >>> > >>> An exception has occurred. You may continue by *restarting
> >>> > >>> <http://localhost:8080/restart.svc>* the session.
> >>> > >>> [ +/- ] Exception: java.lang.NullPointerException
> >>> > >>> <http://localhost:8080/trails/list/League#>
> >>> > >>> org.apache.hivemind.ApplicationRuntimeException
> >>> > >>>
> >>> > >>> component:
> >>> > >>>
> >>> > >>> $HibernateListPage_15@3c1[LeagueList]
> >>> > >>>
> >>> > >>> location:
> >>> > >>>
> >>> > >>> context:/WEB-INF/DefaultList.page, line 3, column 63
> >>> > >>> 1
> >>> > >>>
> >>> > >>> <!DOCTYPE page-specification PUBLIC "-//Apache Software
> >>> > >>> Foundation//Tapestry Specification 4.1//EN"
> >>> > >>>
> >>> > >>> 2
> >>> > >>>
> >>> > >>> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd">
> >>> > >>>
> >>> > >>> 3
> >>> > >>>
> >>> > >>> <page-specification class="org.trails.page.HibernateListPage">
> >>> > >>>
> >>> > >>> 4
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> > >>> 5
> >>> > >>>
> >>> > >>> <property name="instances" persist="session"/>
> >>> > >>>
> >>> > >>> 6
> >>> > >>>
> >>> > >>> <property name="criteria" persist="session"/>
> >>> > >>>
> >>> > >>> 7
> >>> > >>>
> >>> > >>> <property name="classDescriptor" persist="session"/>
> >>> > >>>
> >>> > >>> 8
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> > >>> [ +/- ] Exception: java.lang.NullPointerException
> >>> > >>> <http://localhost:8080/trails/list/League#>
> >>> > >>> org.trails.exception.TrailsRuntimeException
> >>> > >>> Stack Trace:
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:92)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.form.DefaultOptionRenderer.renderOptions(DefaultOptionRenderer.java:60)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.form.PropertySelection.renderFormComponent(PropertySelection.java:75)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:104)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.trails.component.search.SimpleSearchField.renderComponent(SimpleSearchField.java:44)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.components.Block.renderForComponent(Block.java:65)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.components.RenderBlock.renderComponent(RenderBlock.java:65)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.components.ForBean.renderComponent(ForBean.java:181)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:503)
> >>> > >>>
> >>> > >>> * org.apache.tapestry.form.Form.renderComponent(Form.java:217)
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>> > >>>
> >>> > >>> * org.apache.tapestry.html.Body.renderComponent(Body.java:38)
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
> >>> > >>>
> >>> > >>> * org.apache.tapestry.html.Shell.renderComponent(Shell.java:125)
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:185)
> >>> > >>>
> >>> > >>> *
> >>> org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:249)
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:400)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:159)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> $ResponseRenderer_11ae45b759a.renderResponse($ResponseRenderer_11ae45b759a.java)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.trails.engine.TrailsPagesService.service(TrailsPagesService.java:111)
> >>> > >>>
> >>> > >>> *
> >>> $IEngineService_11ae45b760b.service($IEngineService_11ae45b760b.java)
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.engi`ne.AbstractEngine.service(AbstractEngine.java:241)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> $WebRequestServicer_11ae45b75e4.service($WebRequestServicer_11ae45b75e4.java)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> $WebRequestServicer_11ae45b75e0.service($WebRequestServicer_11ae45b75e0.java)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> $ServletRequestServicer_11ae45b75c6.service($ServletRequestServicer_11ae45b75c6.java)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> $ServletRequestServicerFilter_11ae45b75c2.service($ServletRequestServicerFilter_11ae45b75c2.java)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> $ServletRequestServicerFilter_11ae45b75c0.service($ServletRequestServicerFilter_11ae45b75c0.java)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> $ServletRequestServicerFilter_11ae45b75c4.service($ServletRequestServicerFilter_11ae45b75c4.java)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> $ServletRequestServicer_11ae45b75c8.service($ServletRequestServicer_11ae45b75c8.java)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> $ServletRequestServicer_11ae45b75ba.service($ServletRequestServicer_11ae45b75ba.java)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
> >>> > >>>
> >>> > >>> * javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> >>> > >>> * javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.trails.security.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:152)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
> >>> > >>>
> >>> > >>> *
> >>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> >>> > >>>
> >>> > >>> * org.mortbay.jetty.Server.handle(Server.java:285)
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
> >>> > >>>
> >>> > >>> * org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
> >>> > >>> * org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
> >>> > >>> * org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
> >>> > >>>
> >>> > >>> *
> >>> > >>>
> >>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
> >>> > >>>
> >>> > >>> * Caused by: java.lang.NullPointerException
> >>> > >>> *
> >>> > >>>
> >>> org.trails.component.AbstractPropertySelectionModel.getLabel(AbstractPropertySelectionModel.java:89)
> >>> > >>>
> >>> > >>> * ... 112 more
> >>> > >>>
> >>> > >>>
> >>> > >>> Best regards
> >>> > >>> Ken in nashua
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> > >>> > Date: Tue, 1 Jul 2008 19:55:43 -0300
> >>> > >>> > From: pablo.grana@...
> >>> > >>> > To: users@...
> >>> > >>> > Subject: Re: [trails-users] list + search
> >>> > >>> >
> >>> > >>> > Here is a way to reproduce it. Attached is a diff that simply
> >>> adds the
> >>> > >>> search
> >>> > >>> > trails:SearchForm component to the list page.
> >>> > >>> >
> >>> > >>> > To see the problem, log in and go to the 'List Team Years' menu
> >>> link.
> >>> > >>> In the
> >>> > >>> > Year Start field enter a number. You will see that the list is
> >>> > >>> correctly
> >>> > >>> > filtered after 'search', but the form is cleared.
> >>> > >>> >
> >>> > >>> > If you now enter a value in the 'Year End' field and click
> >>> search, both
> >>> > >>> 'Year
> >>> > >>> > Start' and 'Year End' are filled with the same value. The result
> >>> of the
> >>> > >>> search
> >>> > >>> > is correct.
> >>> > >>> >
> >>> > >>> > IFAIK, the implementation of the SearchForm does not store what
> >>> the
> >>> > >>> user
> >>> > >>> > entered. it just uses the data to create a criterion and then
> >>> stores it
> >>> > >>> in the
> >>> > >>> > component 'value' field. Once the second form field (ie: 'Year
> >>> End') is
> >>> > >>> > processed (in a rewind), trails picks the same block object and
> >>> sets
> >>> > >>> the value
> >>> > >>> > to the value entered in that field. Then, (when not rewinding but
> >>> > >>> rendering),
> >>> > >>> > trails draws the 'Year Start' field, using the same block that
> >>> now
> >>> > >>> contains the
> >>> > >>> > value of the 'Year End' field.
> >>> > >>> >
> >>> > >>> > Note: this is against trails svn trunk (1.2-SNAPSHOT).
> >>> > >>> >
> >>> > >>> > Hope this helps ...
> >>> > >>> >
> >>> > >>> > regards.
> >>> > >>> >
> >>> > >>> > Alejandro Scandroli wrote:
> >>> > >>> > > Hi Pablo
> >>> > >>> > >
> >>> > >>> > > I'm sorry but I'm not following. Did you mean that your search
> >>> form
> >>> > >>> > > it's always being cleared; it's never being cleared, or it's
> >>> > >>> > > "randomly" being cleared.
> >>> > >>> > > Can you show me your code?
> >>> > >>> > >
> >>> > >>> > > Saludos.
> >>> > >>> > > Alejandro.
> >>> > >>> > >
> >>> > >>> > > On Mon, Jun 30, 2008 at 4:06 PM, Pablo Gra~na
> >>> > >>> <pablo.grana@...> wrote:
> >>> > >>> > >> Hi there.
> >>> > >>> > >>
> >>> > >>> > >> I want the search form at the top of the list of entities. Is
> >>> there
> >>> > >>> an easy
> >>> > >>> > >> way? I put the search component in the DefaultList.html, but
> >>> it
> >>> > >>> works
> >>> > >>> > >> partially: when the form is recreated, the status of the
> >>> search page
> >>> > >>> fields
> >>> > >>> > >> are correctly restored, neither cleaned: some values are
> >>> overwriten
> >>> > >>> with the
> >>> > >>> > >> values in other forms.
> >>> > >>> > >>
> >>> > >>> > >> I know close to nothing about tapestry, but I imagine that the
> >>> > >>> problem is in
> >>> > >>> > >> the way the value for the input tag is handled: instead of
> >>> storing
> >>> > >>> the value
> >>> > >>> > >> in the page, the search component is used to create a new
> >>> criterion
> >>> > >>> and
> >>> > >>> > >> reused for the next input tag.
> >>> > >>> > >>
> >>> > >>> > >> I am now hacking a bit (with trails 1.1.1, unfortunately), but
> >>> I
> >>> > >>> will
> >>> > >>> > >> probably spend some time to get this working for other
> >>> projects
> >>> > >>> using a
> >>> > >>> > >> 1.2-SNAPSHOT. Any hints?
> >>> > >>> > >>
> >>> > >>> > >> thanks a lot.
> >>> > >>> > >>
> >>> > >>> > >>
> >>> > >>> > >>
> >>> > >>>
> >>> ---------------------------------------------------------------------
> >>> > >>> > >> To unsubscribe from this list, please visit:
> >>> > >>> > >>
> >>> > >>> > >> http://xircles.codehaus.org/manage_email
> >>> > >>> > >>
> >>> > >>> > >>
> >>> > >>> > >>
> >>> > >>> > >
> >>> > >>> > >
> >>> ---------------------------------------------------------------------
> >>> > >>> > > To unsubscribe from this list, please visit:
> >>> > >>> > >
> >>> > >>> > > http://xircles.codehaus.org/manage_email
> >>> > >>> > >
> >>> > >>> > >
> >>> > >>> >
> >>> > >>> > --
> >>> > >>> > Pablo Gra\~na
> >>> > >>> > Chief Architect
> >>> > >>> > Globant
> >>> > >>> > Arg Office: +54 (11) 4109 1743
> >>> > >>> > UK Office: +44 (20) 7043 8269 int 8043
> >>> > >>> > US Office: +1 (212) 400 7686 int 8043
> >>> > >>> >
> >>> > >>>
> >>> > >>>
> >>> ------------------------------------------------------------------------
> >>> > >>> Do more with your photos with Windows Live Photo Gallery. Get
> >>> Windows
> >>> > >>> Live-Free
> >>> > >>>
> >>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
> >>> > >>>
> >>> ------------------------------------------------------------------------
> >>> > >>> Do more with your photos with Windows Live Photo Gallery. Get
> >>> Windows
> >>> > >>> Live-Free
> >>> > >>>
> >>> <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008>
> >>> > >> --
> >>> > >> Pablo Gra\~na
> >>> > >> Chief Architect
> >>> > >> Globant
> >>> > >> Arg Office: +54 (11) 4109 1743
> >>> > >> UK Office: +44 (20) 7043 8269 int 8043
> >>> > >> US Office: +1 (212) 400 7686 int 8043
> >>> > >>
> >>> > >>
> >>> > >>
> >>> ---------------------------------------------------------------------
> >>> > >> To unsubscribe from this list, please visit:
> >>> > >>
> >>> > >> http://xircles.codehaus.org/manage_email
> >>> > >>
> >>> > >>
> >>> > >>
> >>> > >>
> >>> > >>
> >>> ------------------------------------------------------------------------
> >>> > >>
> >>> > >>
> >>> ---------------------------------------------------------------------
> >>> > >> To unsubscribe from this list, please visit:
> >>> > >>
> >>> > >> http://xircles.codehaus.org/manage_email
> >>> >
> >>> > --
> >>> > Pablo Gra\~na
> >>> > Chief Architect
> >>> > Globant
> >>> > Arg Office: +54 (11) 4109 1743
> >>> > UK Office: +44 (20) 7043 8269 int 8043
> >>> > US Office: +1 (212) 400 7686 int 8043
> >>> >
> >>> >
> >>> > ---------------------------------------------------------------------
> >>> > To unsubscribe from this list, please visit:
> >>> >
> >>> > http://xircles.codehaus.org/manage_email
> >>> >
> >>> >
> >>>
> >>> ------------------------------------------------------------------------
> >>> Windows Live Hotmail is giving away Zunes. Enter for your chance to win.
> >>> Enter Now!
> >>> <http://www.windowslive-hotmail.com/ZuneADay/?locale=en-US&ocid=TXT_TAGLM_Mobile_Zune_V3>
> >> --
> >> Pablo Gra\~na
> >> Chief Architect
> >> Globant
> >> Arg Office: +54 (11) 4109 1743
> >> UK Office: +44 (20) 7043 8269 int 8043
> >> US Office: +1 (212) 400 7686 int 8043
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >> http://xircles.codehaus.org/manage_email
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> > http://xircles.codehaus.org/manage_email
> >
> >
>
> --
> Pablo Gra\~na
> Chief Architect
> Globant
> Arg Office: +54 (11) 4109 1743
> UK Office: +44 (20) 7043 8269 int 8043
> US Office: +1 (212) 400 7686 int 8043
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>


It’s a talkathon – but it’s not just talk. Check out the i’m Talkathon.
Best regards
Ken in nashua