Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Search Result Set

Participant ,
Jul 07, 2009 Jul 07, 2009

I need to know how to save a search result set within a hidden div after a updating a record in coldfusion....Thank you all..

TOPICS
Advanced techniques
2.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 07, 2009 Jul 07, 2009

Save what?  To where?  And when? This will tell you a great deal about how it needs to be done.

Sorry I could only work 4 of the w's into that short reply.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 07, 2009 Jul 07, 2009

Means that there is a search page...within that page there is a search result section which is visible after one hits the 'search' button for specific information. Then each record on the result set has a link which you can update that record...once the record is updated thru an action.cfm page I need to forward the users to the search.cfm without losing the result set which was already searched.... How will I keep that result set after I update  a record since the page will be refreshed?

I dont want to use <cfquery cache....any other idea???

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 07, 2009 Jul 07, 2009

Read up in the documentation on ColdFusion's persistant memory scopes, such as Session, Application, Server, Client, Cookie, etc.

These handy scopes are maintained by ColdFusion from request to request.

Using Persistent Data and Locking

http://livedocs.adobe.com/coldfusion/8/htmldocs/sharedVars_01.html

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 07, 2009 Jul 07, 2009

I already know how to store in session etc... is there any other way such as http cache?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 07, 2009 Jul 07, 2009

Why do you need another way?

What about using session state is not sufficeint for you requirements?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 07, 2009 Jul 07, 2009

On the search results page send query string (CGI.QUERY_STRING) to the

page that updates the record. After the record is updated redirect to

the variables that was passed to the page.

Adding to Ian's suggestion about your OP:

http://catb.org/esr/faqs/smart-questions.html#beprecise

Mack

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 07, 2009 Jul 07, 2009

if  I use sessionid or urltoken or jsessionid, will i be able to do what I need to do?....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 07, 2009 Jul 07, 2009

If you keep the page address in the session scope you don't need to

manually pass the session identification tokens (unless the client

browser doesn't accept cookies).

Mack

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 07, 2009 Jul 07, 2009

the return page will be search.cfm ...how about after update.... if i return to the search page, i wouldnt get the results which were being generated before update unless i store each search fields in a session var...what I am asking is sessionid or jssessionid specific for that current session or whenever a page is being called, the server creates a new sessionid?....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 08, 2009 Jul 08, 2009

Did you read the link that Ian gave you ? (It's a chapter from the CF

Developer's Guide and it's a pretty good introduction on persisting

state in a web application)

Mack

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 08, 2009 Jul 08, 2009

Have you tried "cfsavecontent" tag

If you need just to show the search result you can use  "cfsavecontent" tag

<cfsavecontent variable="session.searchresult">

(search result)

</cfsavecontent>

and in search.cfm you just output 'session.searchresult' . I hope you know to handle sessions and please do run tests.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 08, 2009 Jul 08, 2009
LATEST

searchresult is a struct that i will have to create or not?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 07, 2009 Jul 07, 2009

So after a record is updated you want to keep the original data?  I'll contribute the 5th w.

Why?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources