PRAjaxSearchWidget not working on Seaside3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PRAjaxSearchWidget not working on Seaside3

Nick
Hi,
PRAjaxSearchWidget does not return any results using the latest Seaside3/Pier2 packages

Steps to reproduce
* open and start web server
* open a workspace and execute:
PRPierFrame registerAsApplication: 'pier' kernel: (PRKernel named: 'defaultKernel').
* type something into the search box, observe the XHR request/responses; the text typed is being sent, however no results are returned.

The problem seems to be that the textInput callback is not called, however I noticed that the callback in SUAutocompleterTest is also never called. By mimicking the code in SUAutocompleterTest I have a local working version of PRAjaxSearchWidget, with the following changes:

Old version:
PRAjaxSearchWidget>>renderContentOn:
   .... html scriptaculous autocompleter ... on: #renderItemsOn: of: self

modified version:
PRAjaxSearchWidget>>renderContentOn:
   .... html scriptaculous autocompleter ... on: #renderItemsOn:for: of: self

Old version:
PRAjaxSearchWidget>>renderItemsOn: html
html unorderedList: [
self items do: [ :each |
html listItem
passenger: each; " the only difference to the original "
with: [ self renderItem: each on: html ] ] ]

Modified version:
PRAjaxSearchWidget>>renderItemsOn: html for: aString
self searchText: aString.
 
html unorderedList: [
self items do: [ :each |
html listItem
passenger: each; " the only difference to the original "
with: [ self renderItem: each on: html ] ] ]

If the above changes make sense, I'll push them into the repository.

Nick



_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRAjaxSearchWidget not working on Seaside3

Nick
I've updated Pier-Seaside in Pier2 repository with these changes. Shout if that doesn't make sense.

Nick

2010/1/25 Nick Ager <[hidden email]>
Hi,
PRAjaxSearchWidget does not return any results using the latest Seaside3/Pier2 packages

Steps to reproduce
* open and start web server
* open a workspace and execute:
PRPierFrame registerAsApplication: 'pier' kernel: (PRKernel named: 'defaultKernel').
* type something into the search box, observe the XHR request/responses; the text typed is being sent, however no results are returned.

The problem seems to be that the textInput callback is not called, however I noticed that the callback in SUAutocompleterTest is also never called. By mimicking the code in SUAutocompleterTest I have a local working version of PRAjaxSearchWidget, with the following changes:

Old version:
PRAjaxSearchWidget>>renderContentOn:
   .... html scriptaculous autocompleter ... on: #renderItemsOn: of: self

modified version:
PRAjaxSearchWidget>>renderContentOn:
   .... html scriptaculous autocompleter ... on: #renderItemsOn:for: of: self

Old version:
PRAjaxSearchWidget>>renderItemsOn: html
html unorderedList: [
self items do: [ :each |
html listItem
passenger: each; " the only difference to the original "
with: [ self renderItem: each on: html ] ] ]

Modified version:
PRAjaxSearchWidget>>renderItemsOn: html for: aString
self searchText: aString.
 
html unorderedList: [
self items do: [ :each |
html listItem
passenger: each; " the only difference to the original "
with: [ self renderItem: each on: html ] ] ]

If the above changes make sense, I'll push them into the repository.

Nick




_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki