Re: Coldfusion and Spry

2007-01-18 Thread Adrian
erm, dont know much about spry, but it looks to me like you are only loading
in the dataset once?

var dsRecruitments = new
Spry.Data.XMLDataSet

Its not in a function? Are you reloading the page when the user searches or
are you using spry to send a call to cf to do the search?

page loads
spry loads xml
user does search
cf writes new file
{need spry to reload the xml now}



On 17/01/07, Chad McCue [EMAIL PROTECTED] wrote:

 IE and Mozilla


 Chad McCue
 Advanced Media Productions
 251 West Central St. Suite 28
 Natick MA, 01760

 [EMAIL PROTECTED]
 p: 508.647.5151 ext 16
 f: 508.647.5150

 -Original Message-
 From: Jim Wright [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, January 17, 2007 2:59 PM
 To: CF-Talk
 Subject: Re: Coldfusion and Spry

 Chad McCue wrote:
  The problem is the browser after the search is conducted still sees
  all accounts even though the XML document only shows the results
  searched for.

 Is this in IE?  ..
 http://www.google.com/search?q=spry%20ie%20caching



 

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266850
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Coldfusion and Spry

2007-01-18 Thread David Mineer
In addition to the usecache that you already have, here are my notes
from when I had the same problem: (My complete notes are here:
http://mineer.blogspot.com/search?q=spry+caching)

After that, you'll want to define a function callback that will be
triggered *after* your server request to update the record:


function UpdateRecordCallback(req)
{
// We just finished updating a record, force myDataSet to
// reload the data from the server so our regions auto update.

myDataSet.loadData();
}


Then use the loadURL() utility function to send your request. You'll
have to pass your callback function to loadURL so that it gets called
when the request succeeds:

function UpdateMyRecord(recordID)
{
Spry.Utils.loadURL(GET, closetesrecord.php?id= + recordID, true,
UpdateRecordCallback);
}

I hope that helps.

On 1/17/07, Chad McCue [EMAIL PROTECTED] wrote:
 I created a search page that allows the admin to search for accounts in
 the database. When they first come to the search screen all accounts in
 the database are returned and presented to them. The xml document that
 SPRY reads gets generated with all accounts in the DB. When the admin
 conducts a search, I create a XML document only with the results
 returned and then overwrite the original XML document. Works Perfectly.
 The problem is the browser after the search is conducted still sees all
 accounts even though the XML document only shows the results searched
 for. Below is some code:

 I am running a cf component that returns a list of accounts and puts it
 into and XML document like below.

 CFQUERY
 SELECT BLAH
 FROM BLAH
 WHERE BLAH = BLAH
 /CFQUERY

 CFXML VARIABLE=RecruitmentResults
Recruitments
CFOUTPUT query=Recruitments 
 Recruitment ID=#RecruitmentID#
 firstname#htmleditformat(trim(FirstName))#/firstname
 lastname#htmleditformat(trim(LastName))#/lastname
 company#trim(CompanyName)#/company
 country#trim(Country)#/country
 WantedPosition#trim(WantedPosition)#/WantedPosition
 /Recruitment
/CFOUTPUT
/Recruitments
   /CFXML

   CFFILE ACTION=write
 FILE=#Request.XMLRoute#/Administrator_#Session.AdminID#/Recruitments.xm
 l OUTPUT=#ToString(RecruitmentResults)# nameconflict=overwrite

 This is the part of my result page that is outputting the results.

 !--
 var pageOffset = 0;
 var pageSize = 50;
 var pageStop = pageOffset + pageSize;

 CFOUTPUT
 var dsRecruitments = new
 Spry.Data.XMLDataSet(../DisplayPages/admin/Administrators/Administrator
 _#Session.AdminID#/Recruitments.xml,Recruitments/Recruitment, {
 filterFunc: MyPagingFunc }, {useCache:false});
 /CFOUTPUT

 function MyPagingFunc(ds, row, rowNumber)
 {
  if (rowNumber  pageOffset || rowNumber = pageStop)
   return null;
  return row;
 }

 function UpdatePage(offset)
 {
  var numRows = dsRecruitments.getUnfilteredData().length;

  if (offset  (numRows - pageSize))
   offset = numRows - pageSize;
  if (offset  0)
   offset = 0;

  pageOffset = offset;
  pageStop = offset + pageSize;

  // Re-apply our non-destructive filter on dsStates1:
  dsRecruitments.filter(MyPagingFunc);

 }
 --
 /script

 div id=Recruitment_Div spry:region=dsRecruitments
   table id=Recruitment_Table class=datagrid width=100%
 border=0 cellspacing=0 cellpadding=0
tr class=FormBar
th onclick=dsRecruitments.sort('lastname','toggle');
 align=left  class=LeftBorder style=cursor:pointernbsp;Contact
 Name/th
th onclick=dsRecruitments.sort('company','toggle');
 width=350 align=left style=cursor:pointerCompany Name/th
   /tr
   tbody
   tr bgcolor=#Request.Row1Color# spry:repeat=dsRecruitments
 class=FormBody2
td width=125 align=left valign=middle class=LeftBorder
 {firstname} {lastname}
/td
td width=350 valign=middle
 {company}
/td
  /tr
 /tbody
 /table
 /div






 

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266879
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Coldfusion and Spry

2007-01-17 Thread Chad McCue
I created a search page that allows the admin to search for accounts in
the database. When they first come to the search screen all accounts in
the database are returned and presented to them. The xml document that
SPRY reads gets generated with all accounts in the DB. When the admin
conducts a search, I create a XML document only with the results
returned and then overwrite the original XML document. Works Perfectly.
The problem is the browser after the search is conducted still sees all
accounts even though the XML document only shows the results searched
for. Below is some code:
 
I am running a cf component that returns a list of accounts and puts it
into and XML document like below.
 
CFQUERY
SELECT BLAH
FROM BLAH
WHERE BLAH = BLAH
/CFQUERY
 
CFXML VARIABLE=RecruitmentResults
   Recruitments
   CFOUTPUT query=Recruitments 
Recruitment ID=#RecruitmentID#   
firstname#htmleditformat(trim(FirstName))#/firstname
lastname#htmleditformat(trim(LastName))#/lastname
company#trim(CompanyName)#/company
country#trim(Country)#/country
WantedPosition#trim(WantedPosition)#/WantedPosition
/Recruitment
   /CFOUTPUT
   /Recruitments
  /CFXML
  
  CFFILE ACTION=write
FILE=#Request.XMLRoute#/Administrator_#Session.AdminID#/Recruitments.xm
l OUTPUT=#ToString(RecruitmentResults)# nameconflict=overwrite
 
This is the part of my result page that is outputting the results.
 
!--
var pageOffset = 0;
var pageSize = 50;
var pageStop = pageOffset + pageSize;
 
CFOUTPUT
var dsRecruitments = new
Spry.Data.XMLDataSet(../DisplayPages/admin/Administrators/Administrator
_#Session.AdminID#/Recruitments.xml,Recruitments/Recruitment, {
filterFunc: MyPagingFunc }, {useCache:false});
/CFOUTPUT
 
function MyPagingFunc(ds, row, rowNumber)
{ 
 if (rowNumber  pageOffset || rowNumber = pageStop)
  return null;
 return row;
}
 
function UpdatePage(offset)
{
 var numRows = dsRecruitments.getUnfilteredData().length;
 
 if (offset  (numRows - pageSize))
  offset = numRows - pageSize;
 if (offset  0)
  offset = 0;
 
 pageOffset = offset;
 pageStop = offset + pageSize;
 
 // Re-apply our non-destructive filter on dsStates1:
 dsRecruitments.filter(MyPagingFunc);
 
}
--
/script
 
div id=Recruitment_Div spry:region=dsRecruitments  
  table id=Recruitment_Table class=datagrid width=100%
border=0 cellspacing=0 cellpadding=0   
   tr class=FormBar
   th onclick=dsRecruitments.sort('lastname','toggle');
align=left  class=LeftBorder style=cursor:pointernbsp;Contact
Name/th 
   th onclick=dsRecruitments.sort('company','toggle');
width=350 align=left style=cursor:pointerCompany Name/th 
  /tr
  tbody 
  tr bgcolor=#Request.Row1Color# spry:repeat=dsRecruitments
class=FormBody2
   td width=125 align=left valign=middle class=LeftBorder
{firstname} {lastname} 
   /td   
   td width=350 valign=middle
{company}
   /td
 /tr
/tbody
/table
/div
 
 

  


~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266799
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Coldfusion and Spry

2007-01-17 Thread Raymond Camden
Are you using the same URL for the dataset? Maybe consider adding a no
cache directive to the dataset.

On 1/17/07, Chad McCue [EMAIL PROTECTED] wrote:
 I created a search page that allows the admin to search for accounts in
 the database. When they first come to the search screen all accounts in
 the database are returned and presented to them. The xml document that
 SPRY reads gets generated with all accounts in the DB. When the admin
 conducts a search, I create a XML document only with the results
 returned and then overwrite the original XML document. Works Perfectly.
 The problem is the browser after the search is conducted still sees all
 accounts even though the XML document only shows the results searched
 for. Below is some code:

 I am running a cf component that returns a list of accounts and puts it
 into and XML document like below.

 CFQUERY
 SELECT BLAH
 FROM BLAH
 WHERE BLAH = BLAH
 /CFQUERY

 CFXML VARIABLE=RecruitmentResults
Recruitments
CFOUTPUT query=Recruitments 
 Recruitment ID=#RecruitmentID#
 firstname#htmleditformat(trim(FirstName))#/firstname
 lastname#htmleditformat(trim(LastName))#/lastname
 company#trim(CompanyName)#/company
 country#trim(Country)#/country
 WantedPosition#trim(WantedPosition)#/WantedPosition
 /Recruitment
/CFOUTPUT
/Recruitments
   /CFXML

   CFFILE ACTION=write
 FILE=#Request.XMLRoute#/Administrator_#Session.AdminID#/Recruitments.xm
 l OUTPUT=#ToString(RecruitmentResults)# nameconflict=overwrite

 This is the part of my result page that is outputting the results.

 !--
 var pageOffset = 0;
 var pageSize = 50;
 var pageStop = pageOffset + pageSize;

 CFOUTPUT
 var dsRecruitments = new
 Spry.Data.XMLDataSet(../DisplayPages/admin/Administrators/Administrator
 _#Session.AdminID#/Recruitments.xml,Recruitments/Recruitment, {
 filterFunc: MyPagingFunc }, {useCache:false});
 /CFOUTPUT

 function MyPagingFunc(ds, row, rowNumber)
 {
  if (rowNumber  pageOffset || rowNumber = pageStop)
   return null;
  return row;
 }

 function UpdatePage(offset)
 {
  var numRows = dsRecruitments.getUnfilteredData().length;

  if (offset  (numRows - pageSize))
   offset = numRows - pageSize;
  if (offset  0)
   offset = 0;

  pageOffset = offset;
  pageStop = offset + pageSize;

  // Re-apply our non-destructive filter on dsStates1:
  dsRecruitments.filter(MyPagingFunc);

 }
 --
 /script

 div id=Recruitment_Div spry:region=dsRecruitments
   table id=Recruitment_Table class=datagrid width=100%
 border=0 cellspacing=0 cellpadding=0
tr class=FormBar
th onclick=dsRecruitments.sort('lastname','toggle');
 align=left  class=LeftBorder style=cursor:pointernbsp;Contact
 Name/th
th onclick=dsRecruitments.sort('company','toggle');
 width=350 align=left style=cursor:pointerCompany Name/th
   /tr
   tbody
   tr bgcolor=#Request.Row1Color# spry:repeat=dsRecruitments
 class=FormBody2
td width=125 align=left valign=middle class=LeftBorder
 {firstname} {lastname}
/td
td width=350 valign=middle
 {company}
/td
  /tr
 /tbody
 /table
 /div






 

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266803
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Coldfusion and Spry

2007-01-17 Thread Chad McCue
This is what I am using to get the XML

CFOUTPUT
var dsRecruitments = new
Spry.Data.XMLDataSet(../DisplayPages/admin/Administrators/Administrator
_#Session.AdminID#/Recruitments.xml,Recruitments/Recruitment, {
filterFunc: MyPagingFunc }, {useCache:false}); /CFOUTPUT
 
function MyPagingFunc(ds, row, rowNumber) {  if (rowNumber  pageOffset
|| rowNumber = pageStop)
  return null;
 return row;
}
/CFOUTPUT

Not sure what the no cache directiive is, I set useCache:false
above.



-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 17, 2007 2:46 PM
To: CF-Talk
Subject: Re: Coldfusion and Spry

Are you using the same URL for the dataset? Maybe consider adding a no
cache directive to the dataset.

On 1/17/07, Chad McCue [EMAIL PROTECTED] wrote:
 I created a search page that allows the admin to search for accounts 
 in the database. When they first come to the search screen all 
 accounts in the database are returned and presented to them. The xml 
 document that SPRY reads gets generated with all accounts in the DB. 
 When the admin conducts a search, I create a XML document only with 
 the results returned and then overwrite the original XML document.
Works Perfectly.
 The problem is the browser after the search is conducted still sees 
 all accounts even though the XML document only shows the results 
 searched for. Below is some code:

 I am running a cf component that returns a list of accounts and puts 
 it into and XML document like below.

 CFQUERY
 SELECT BLAH
 FROM BLAH
 WHERE BLAH = BLAH
 /CFQUERY

 CFXML VARIABLE=RecruitmentResults
Recruitments
CFOUTPUT query=Recruitments 
 Recruitment ID=#RecruitmentID#
 firstname#htmleditformat(trim(FirstName))#/firstname
 lastname#htmleditformat(trim(LastName))#/lastname
 company#trim(CompanyName)#/company
 country#trim(Country)#/country
 WantedPosition#trim(WantedPosition)#/WantedPosition
 /Recruitment
/CFOUTPUT
/Recruitments
   /CFXML

   CFFILE ACTION=write
 FILE=#Request.XMLRoute#/Administrator_#Session.AdminID#/Recruitments.
 xm l OUTPUT=#ToString(RecruitmentResults)# 
 nameconflict=overwrite

 This is the part of my result page that is outputting the results.

 !--
 var pageOffset = 0;
 var pageSize = 50;
 var pageStop = pageOffset + pageSize;

 CFOUTPUT
 var dsRecruitments = new
 Spry.Data.XMLDataSet(../DisplayPages/admin/Administrators/Administrat
 or _#Session.AdminID#/Recruitments.xml,Recruitments/Recruitment, {
 filterFunc: MyPagingFunc }, {useCache:false}); /CFOUTPUT

 function MyPagingFunc(ds, row, rowNumber) {  if (rowNumber  
 pageOffset || rowNumber = pageStop)
   return null;
  return row;
 }

 function UpdatePage(offset)
 {
  var numRows = dsRecruitments.getUnfilteredData().length;

  if (offset  (numRows - pageSize))
   offset = numRows - pageSize;
  if (offset  0)
   offset = 0;

  pageOffset = offset;
  pageStop = offset + pageSize;

  // Re-apply our non-destructive filter on dsStates1:
  dsRecruitments.filter(MyPagingFunc);

 }
 --
 /script

 div id=Recruitment_Div spry:region=dsRecruitments
   table id=Recruitment_Table class=datagrid width=100%
 border=0 cellspacing=0 cellpadding=0
tr class=FormBar
th onclick=dsRecruitments.sort('lastname','toggle');
 align=left  class=LeftBorder style=cursor:pointernbsp;Contact
 Name/th
th onclick=dsRecruitments.sort('company','toggle');
 width=350 align=left style=cursor:pointerCompany Name/th
   /tr
   tbody
   tr bgcolor=#Request.Row1Color# spry:repeat=dsRecruitments
 class=FormBody2
td width=125 align=left valign=middle
class=LeftBorder
 {firstname} {lastname}
/td
td width=350 valign=middle
 {company}
/td
  /tr
 /tbody
 /table
 /div






 



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266806
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Coldfusion and Spry

2007-01-17 Thread Jim Wright
Chad McCue wrote:
 The problem is the browser after the search is conducted still sees all
 accounts even though the XML document only shows the results searched
 for. 

Is this in IE?  ..
http://www.google.com/search?q=spry%20ie%20caching

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266808
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Coldfusion and Spry

2007-01-17 Thread Chad McCue
IE and Mozilla 


Chad McCue
Advanced Media Productions
251 West Central St. Suite 28
Natick MA, 01760
 
[EMAIL PROTECTED]
p: 508.647.5151 ext 16
f: 508.647.5150

-Original Message-
From: Jim Wright [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 17, 2007 2:59 PM
To: CF-Talk
Subject: Re: Coldfusion and Spry

Chad McCue wrote:
 The problem is the browser after the search is conducted still sees 
 all accounts even though the XML document only shows the results 
 searched for.

Is this in IE?  ..
http://www.google.com/search?q=spry%20ie%20caching



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266810
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4