Re: [ACFUG Discuss] Feeling a little SPRY

2006-08-24 Thread Steven Ross
Wow that IS ugly... sorry all I can do is state the obvious.On 8/24/06, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:code_snippet source=
fekke.com/blogscriptvar dsData = new Spry.Data.XMLDataSet(http://www.fekke.com/com/SpockWS.cfc,/soapenv:Envelope/soapenv:Body/ns1:getQuoteResponse/getQuoteReturn, {
method:POST, postData: '?xml version=1.0 encoding=UTF-8standalone=no?SOAP-ENV:Envelopexmlns:SOAP-ENV=
http://schemas.xmlsoap.org/soap/envelope/xmlns:apachesoap=http://xml.apache.org/xml-soap xmlns:impl=http://com
xmlns:intf=http://comxmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/xmlns:tns1=
http://rpc.xml.coldfusionxmlns:wsdl=http://schemas.xmlsoap.org/wsdl/xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/
xmlns:xsd=http://www.w3.org/2001/XMLSchemaxmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
 SOAP-ENV:Bodymns:getQuote xmlns:mns=http://comSOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
/mns:getQuote/SOAP-ENV:Body/SOAP-ENV:Envelope',headers: { Content-Type: text/xml; charset=utf-8, SOAPAction:
http://localhost:8300/com/SpockWS/getQuote } , useCache: false });dsData.startLoadInterval(1);/script/code_snippetThere has to be an easier and prettier way of calling a webservice from spry,
any ideas?-To unsubscribe from this list, manage your profile @http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglistsArchive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com--- Steven Ross
web application  interface developer http://www.zerium.com[phone] 404-488-4364



-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-



Re: [ACFUG Discuss] Feeling a little SPRY

2006-08-24 Thread john . lyons

essentially:

setup:
cfmx7
everything is local.

Calling page is Here:
code_snippet source=john
html 
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
titletest/title
script language=JavaScript type=text/javascript
src=includes/xpath.js/script
script language=JavaScript type=text/javascript
src=includes/SpryData.js/script
script language=JavaScript type=text/javascript
//var cartData = new 
Spry.Data.XMLDataSet(com/cart.cfc?method=getcarts,
/query/row);
//have have the cfc write out an xml file cause it wont read the above line
var cartData = new Spry.Data.XMLDataSet(myxml.xml, /query/row);
/script
link rel=stylesheet type=text/css href=armc.css /
/head
body
div id=container
 div id=topChart Cart v0.1Alpha/div
div spry:region=cartData id=content
 table border=1
   tr
 th onClick=cartData.sort('cartid','toggle');Cart Number/th
 th onClick=cartData.sort('username','toggle');Current User/th
 th onClick=cartData.sort('department','toggle');Users
Department/th
 th onClick=cartData.sort('authusername','toggle');Authorized
by/th
 th onClick=cartData.sort('statusid','toggle');Cart Status/th
 th onClick=cartData.sort('ticketid','toggle');Cart Repair
Ticket/th
   /tr
   tr spry:repeat=cartData
onClick=cartData.setCurrentRow('{ds_RowID}');
 td{cartid}/td
 td{username}/td
 td{department}/td
 td{authusername}/td
 tdspan spry:if='{statusid}' == 1;
   center
 {cartstatusdescr} br /
 img src=images/avail.jpg height=20 width=20
   /center
   /span span spry:if='{statusid}' != 1;
   center
 {cartstatusdescr} br /
 img src=images/notavail.jpg height=20 width=20
   /center
   /span /td
 tdspan spry:if='{ticketid}' != 0;
   center
 img src=images/submitimg.gif height=20 width=20
   /center
   /span span spry:if='{ticketid}' == 0;
   center
 img src=images/ticket.gif height=20 width=20
   /center
   /span /td
   /tr
 /table
   /div
   div id=moreinfo spry:detailregion=cartData
div id=cartinfo
  Last Date Checked Out:{checkout} br /
 Last Date Check In:{checkin} br /
 Notes: {notes} br /
  /div
  div id=carttools
  a href=##Check In Cart {cartid}/abr /
  a href=##Check Out Cart {cartid}/a br /
  a href=##Remove Cart {cartid}/abr /
  a href=##Add new Cart/a
  /div
   /div

 div id=footerblargh/div
/div
/body
/html

/code_snippet


And the xml the cfc returns is here (though i have to have it write out to
myxml.xml for spry page to work):
code_snippet source=johnscfc
?xml version=1.0 encoding=UTF-8 ?
query columns=10 rows=3
 row
   authusernameMARK FENNELL/authusername
   cartid10/cartid
   cartstatusdescrChecked In/cartstatusdescr
   checkinAugust 22, 2006/checkin
   checkoutAugust 22, 2006/checkout
   departmentData Processing (936)/department
   notesI have sung the songs of the exalted salted almonds/notes
   statusid1/statusid
   ticketid0/ticketid
   usernameJOHN LYONS/username
 /row
 row
   authusernameJOHN LYONS/authusername
   cartid11/cartid
   cartstatusdescrChecked In/cartstatusdescr
   checkinAugust 22, 2006/checkin
   checkoutAugust 22, 2006/checkout
   departmentData Processing (936)/department
   notesCan't Sleep Clowns will eat me/notes
   statusid1/statusid
   ticketid0/ticketid
   usernameJOHN LYONS/username
 /row
 row
   authusernameJOHN LYONS/authusername
   cartid12/cartid
   cartstatusdescrChecked In/cartstatusdescr
   checkinAugust 22, 2006/checkin
   checkoutAugust 22, 2006/checkout
   departmentData Processing (936)/department
   notesThe cat ate his hat while dancing on a boy named matt/notes
   statusid1/statusid
   ticketid0/ticketid
   usernameJOHN LYONS/username
 /row
/query

/code_snippet)


I really need to do 2 things:
1) be able to call that cfc without having it write out the myxml file because
the file and what shows in the browser are identical

2)be able to send to a webservice with arguements so i can alter carts states
via the links at the bottom.




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform


For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-





Re: [ACFUG Discuss] Feeling a little SPRY

2006-08-24 Thread Teddy Payne
John,This sounds like the functionality of consuming a remote CFC, which auto-generates a WSDL translation of the component. It is a matter of calling the CFC method with an access=remote. You can use cfsavecontent to create an xml with coldfusion and return a customized XML file as the web service return value. This shoudl enable SPRY to read a formatted XML document returned from your CFC.
TeddyOn 8/24/06, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:essentially:setup:cfmx7everything is local.Calling page is Here:
code_snippet source=johnhtml headmeta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /titletest/title
script language=_javascript_ type=text/_javascript_src="">script language=_javascript_ type=text/_javascript_src=""
script language=_javascript_ type=text/_javascript_//var cartData = new Spry.Data.XMLDataSet(com/cart.cfc?method=getcarts,/query/row);//have have the cfc write out an xml file cause it wont read the above line
var cartData = new Spry.Data.XMLDataSet(myxml.xml, /query/row);/scriptlink rel=stylesheet type=text/css href="" //head
bodydiv id=containerdiv id=topChart Cart v0.1Alpha/div div spry:region=cartData id=contenttable border=1
trth  Number/thth  User/th
th >Department/thth >by/th
th  Status/thth  RepairTicket/th/tr
tr spry:repeat=cartData>td{cartid}/tdtd{username}/tdtd{department}/td
td{authusername}/tdtdspan spry:if='{statusid}' == 1;center{cartstatusdescr} br /img src="" height=20 width=20
/center/span span spry:if='{statusid}' != 1;center{cartstatusdescr} br /img src="" height=20 width=20
/center/span /tdtdspan spry:if='{ticketid}' != 0;centerimg src="" height=20 width=20
/center/span span spry:if='{ticketid}' == 0;centerimg src="" height=20 width=20
/center/span /td/tr/table/divdiv id=moreinfo spry:detailregion=cartData
div id=cartinfoLast Date Checked Out:{checkout} br /Last Date Check In:{checkin} br /Notes: {notes} br //div
div id=carttoolsa href="" In Cart {cartid}/abr /a href="" Out Cart {cartid}/a br /
a href="" Cart {cartid}/abr /a href="" new Cart/a/div/divdiv id=footerblargh/div
/div/body/html/code_snippetAnd the xml the cfc returns is here (though i have to have it write out tomyxml.xml for spry page to work):code_snippet source=johnscfc
?xml version=1.0 encoding=UTF-8 ?query columns=10 rows=3rowauthusernameMARK FENNELL/authusernamecartid10/cartid
cartstatusdescrChecked In/cartstatusdescrcheckinAugust 22, 2006/checkincheckoutAugust 22, 2006/checkoutdepartmentData Processing (936)/department
notesI have sung the songs of the exalted salted almonds/notesstatusid1/statusidticketid0/ticketidusernameJOHN LYONS/username
/rowrowauthusernameJOHN LYONS/authusernamecartid11/cartidcartstatusdescrChecked In/cartstatusdescrcheckinAugust 22, 2006/checkin
checkoutAugust 22, 2006/checkoutdepartmentData Processing (936)/departmentnotesCan't Sleep Clowns will eat me/notesstatusid1/statusid
ticketid0/ticketidusernameJOHN LYONS/username/rowrowauthusernameJOHN LYONS/authusernamecartid12/cartid
cartstatusdescrChecked In/cartstatusdescrcheckinAugust 22, 2006/checkincheckoutAugust 22, 2006/checkoutdepartmentData Processing (936)/department
notesThe cat ate his hat while dancing on a boy named matt/notesstatusid1/statusidticketid0/ticketidusernameJOHN LYONS/username
/row/query/code_snippet)I really need to do 2 things:1) be able to call that cfc without having it write out the myxml file becausethe file and what shows in the browser are identical
2)be able to send to a webservice with arguements so i can alter carts statesvia the links at the bottom.-To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserformFor more info, see http://www.acfug.org/mailinglistsArchive @ 
http://www.mail-archive.com/discussion%40acfug.org/List hosted by http://www.fusionlink.com-
-- cf_payne /Blog: http://cfpayne.wordpress.com/Atlanta CFUG: http://www.acfug.org




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-



Re: [ACFUG Discuss] Feeling a little SPRY

2006-08-24 Thread john . lyons

cffunction name=getcarts access=remote output=true returntype=any
cfquery datasource=#adsn# name=DBpull
SELECT *stuff*
FROM *somewhere*
LEFT JOIN *something*  on *something*
   LEFT JOIN *something*  on *something*
   LEFT JOIN *something*  on *something*
/cfquery
cfscript
bReturn =  querytoxml(DBpull);
/cfscript

cfreturn breturn/
/cffunction


theres the function 



-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform


For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-





RE: [ACFUG Discuss] Feeling a little SPRY

2006-08-24 Thread Charlie Arehart
John, who's note are you replying to? Did you read the entries I pointed to
about solving common problems in returning data from CFML to Spry? If you're
saying you can call this from the browser, then the problem does seem it
would be one of the issues I'd raised. Just can't tell since you're not
indicating whose not you're replying to.


/charlie
http://www.carehart.org/blog/

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, August 24, 2006 2:14 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] Feeling a little SPRY

cffunction name=getcarts access=remote output=true returntype=any
cfquery datasource=#adsn# name=DBpull
SELECT *stuff*
FROM *somewhere*
LEFT JOIN *something*  on *something*
LEFT JOIN *something*  on *something*
LEFT JOIN *something*  on *something*
 /cfquery
cfscript
bReturn =  querytoxml(DBpull);
/cfscript

cfreturn breturn/
/cffunction


theres the function 



-
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists Archive @
http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-






-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-





Re: [ACFUG Discuss] Feeling a little SPRY

2006-08-24 Thread Teddy Payne
Here is a blog post that kind of shows the XMl transformation aspect from a method in a component:http://www.quackit.com/coldfusion/coldfusion_web_services.cfm
TeddyOn 8/24/06, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:cffunction name=getcarts access=remote output=true returntype=any
cfquery datasource=#adsn# name=DBpullSELECT *stuff*FROM *somewhere*LEFT JOIN *something*on *something*
LEFT JOIN *something*on *something*LEFT JOIN *something*on *something* /cfquerycfscriptbReturn =querytoxml(DBpull);
/cfscriptcfreturn breturn//cffunctiontheres the function -
To unsubscribe from this list, manage your profile @http://www.acfug.org?fa=login.edituserformFor more info, see 
http://www.acfug.org/mailinglistsArchive @ http://www.mail-archive.com/discussion%40acfug.org/List hosted by 
http://www.fusionlink.com--- cf_payne /Blog: 
http://cfpayne.wordpress.com/Atlanta CFUG: http://www.acfug.org



-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-



RE: [ACFUG Discuss] Feeling a little SPRY

2006-08-24 Thread john . lyons
the function was to teddy i think. I got yours. and yes its returning 
the in the

in-correct mime-type working to resolve that now.



-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform


For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-





RE: [ACFUG Discuss] Feeling a little SPRY

2006-08-24 Thread Charlie Arehart
Note, as well, that I pointed out in the entry some tools that are SO
valuable when doing spry coding.  Since you can't see what the spry
requestor (xmlhttprequest) is getting back, you can't see if there's an
error in your code, for instance. Or any of the things I talked about. It's
really critical for folks to use some sort of tool to show you the back and
forth between the browser and the server, since you cannot always rely on
dropping the request in the browser yourself to check it. HTH.


/charlie
http://www.carehart.org/blog/

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, August 24, 2006 2:57 PM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Feeling a little SPRY

the function was to teddy i think. I got yours. and yes its returning the in
the in-correct mime-type working to resolve that now.



-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-






-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-