Re: Search Text

2006-08-17 Thread Peter Dawn

i am going to have a look at lucene and try to get that to work.
otherwise might use a simple JS implementation. through tapestry would
be good but if its too time consuming then no.

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



RE: Search Text

2006-08-17 Thread Mark Stang
I guess I may have to reduce my expectations to only searching components.


-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
Sent: Thu 8/17/2006 4:58 PM
To: Tapestry users
Subject: Re: Search Text
 
There is a special type of component that people don't get exposed to
normall that contains any non managed text (ie free flow typed text in
html), that might be a possibility..(I think it's called
TextToken..something like that)..

You're not going to be able to search a whole page in the sense of searching
what might be dynamic content generated from components though...Well...You
could, but it wouldn't be very performant.

On 8/17/06, Mark Stang <[EMAIL PROTECTED]> wrote:
>
> I would like to be able to search all my pages for text.  Which is
> different from the current page.
>
> Thoughts?
>
>
> -Original Message-
> From: James Carman [mailto:[EMAIL PROTECTED]
> Sent: Thu 8/17/2006 3:55 PM
> To: 'Tapestry users'
> Subject: RE: Search Text
>
> Okay, cool.  I am one of those guys who try to use the "simplest solution
> that works."  I was just checking if Ctrl-F applied. :-)
>
>
> -Original Message-
> From: Peter Dawn [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 17, 2006 5:50 PM
> To: Tapestry users
> Subject: Re: Search Text
>
> i will try albartell's approach and see if it works. i was hoping
> there would be a tapestry component i could use. and James i dont want
> to use ctrl+f. i mean i can, but i would like to create something more
> specific to my web app.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>


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

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.



Re: Search Text

2006-08-17 Thread Jesse Kuhnert

There is a special type of component that people don't get exposed to
normall that contains any non managed text (ie free flow typed text in
html), that might be a possibility..(I think it's called
TextToken..something like that)..

You're not going to be able to search a whole page in the sense of searching
what might be dynamic content generated from components though...Well...You
could, but it wouldn't be very performant.

On 8/17/06, Mark Stang <[EMAIL PROTECTED]> wrote:


I would like to be able to search all my pages for text.  Which is
different from the current page.

Thoughts?


-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Thu 8/17/2006 3:55 PM
To: 'Tapestry users'
Subject: RE: Search Text

Okay, cool.  I am one of those guys who try to use the "simplest solution
that works."  I was just checking if Ctrl-F applied. :-)


-Original Message-
From: Peter Dawn [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 17, 2006 5:50 PM
To: Tapestry users
Subject: Re: Search Text

i will try albartell's approach and see if it works. i was hoping
there would be a tapestry component i could use. and James i dont want
to use ctrl+f. i mean i can, but i would like to create something more
specific to my web app.

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



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







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

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.


RE: Search Text

2006-08-17 Thread Mark Stang
I would like to be able to search all my pages for text.  Which is different 
from the current page.

Thoughts?


-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Thu 8/17/2006 3:55 PM
To: 'Tapestry users'
Subject: RE: Search Text
 
Okay, cool.  I am one of those guys who try to use the "simplest solution
that works."  I was just checking if Ctrl-F applied. :-)


-Original Message-
From: Peter Dawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 17, 2006 5:50 PM
To: Tapestry users
Subject: Re: Search Text

i will try albartell's approach and see if it works. i was hoping
there would be a tapestry component i could use. and James i dont want
to use ctrl+f. i mean i can, but i would like to create something more
specific to my web app.

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



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




RE: Search Text

2006-08-17 Thread James Carman
Okay, cool.  I am one of those guys who try to use the "simplest solution
that works."  I was just checking if Ctrl-F applied. :-)


-Original Message-
From: Peter Dawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 17, 2006 5:50 PM
To: Tapestry users
Subject: Re: Search Text

i will try albartell's approach and see if it works. i was hoping
there would be a tapestry component i could use. and James i dont want
to use ctrl+f. i mean i can, but i would like to create something more
specific to my web app.

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



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



Re: Search Text

2006-08-17 Thread Peter Dawn

i will try albartell's approach and see if it works. i was hoping
there would be a tapestry component i could use. and James i dont want
to use ctrl+f. i mean i can, but i would like to create something more
specific to my web app.

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



RE: Search Text

2006-08-17 Thread James Carman
Hitting Ctrl-F on your browser won't do it?  If it's the currently-displayed
HTML document, your browser can do the searching for you, no?


-Original Message-
From: Peter Dawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 17, 2006 8:53 AM
To: Tapestry users
Subject: Re: Search Text

yes. thats the idea. i have been reading about lucene too. anyone tried
that.

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



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



RE: Search Text

2006-08-17 Thread albartell

>i would prefer to do it through tapestry. and if not is there a JS library
i can use.
Here is how I do it on my pages. Note that  is a JSF component but
it could be just as easily done in Tapestry.

Hope that helps,
Aaron Bartell


...
');">
...
/*
 * This is the function that actually highlights a text string by
 * adding HTML tags before and after all occurrences of the search
 * term. You can pass your own tags if you'd like, or if the
 * highlightStartTag or highlightEndTag parameters are omitted or
 * are empty strings then the default  tags will be used.
 */
function doHighlight(bodyText, searchTerm, highlightStartTag,
highlightEndTag) 
{
  // the highlightStartTag and highlightEndTag parameters are optional
  if ((!highlightStartTag) || (!highlightEndTag)) {
highlightStartTag = "";
highlightEndTag = "";
  }
  
  // find all occurences of the search term in the given text,
  // and add some "highlight" tags to them (we're not using a
  // regular expression search, because we want to filter out
  // matches that occur within HTML tags and script blocks, so
  // we have to do a little extra validation)
  var newText = "";
  var i = -1;
  var lcSearchTerm = searchTerm.toLowerCase();
  var lcBodyText = bodyText.toLowerCase();

  while (bodyText.length > 0) {
i = lcBodyText.indexOf(lcSearchTerm, i+1);
if (i < 0) {
  newText += bodyText;
  bodyText = "";
} else {
  // skip anything inside an HTML tag
  if (bodyText.lastIndexOf(">", i) >= bodyText.lastIndexOf("<", i)) {
// skip anything inside a 

Re: Search Text

2006-08-17 Thread Peter Dawn

yes. thats the idea. i have been reading about lucene too. anyone tried that.

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



RE: Search Text

2006-08-17 Thread James Carman
Are you talking about searching for text within the page that you're
reading? 

-Original Message-
From: Peter Dawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 17, 2006 1:39 AM
To: tapestry-user@jakarta.apache.org
Subject: Search Text

guys,
is there a component which allows text search. its sort of similar to
what the tassel site has, but i want the user to search through text,
as in general paragraphs. this info is not stored in the db but
locally within that page. so the ability to search within the content
of a page.
any ideas.

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



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



Re: Search Text

2006-08-17 Thread Peter Dawn

i would prefer to do it through tapestry. and if not is there a JS
library i can use.

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



Re: Search Text

2006-08-17 Thread Gurps

maybe do it using javascript highlighting or more complicated put some sort
of post-filter after rendering the content (don't know how to do it in
tapestry but know via JSP/JSTL)...


Peter Dawn wrote:
> 
> guys,
> is there a component which allows text search. its sort of similar to
> what the tassel site has, but i want the user to search through text,
> as in general paragraphs. this info is not stored in the db but
> locally within that page. so the ability to search within the content
> of a page.
> any ideas.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Search-Text-tf2119682.html#a5847713
Sent from the Tapestry - User forum at Nabble.com.


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