GROUP BY in SPRY DATASET
Hi,
how can I set a GROUP BY in my Spry-Dataset? I got lots of <city> tags that sometimes contain the same city. And I dont want them all to be shown in the list only 1 time.
Thanks for help,
Denis
DenisCGN wrote:
:-) this is where I always look at. But understand nothing :-)
It starts already here: function( ds, row, index ) where do I find ds? row? index? In the filter you showed me yesterday, it was written like that, too.
the ds, row, and index are arguements of the function. Its basically in the information that Spry sends to your filter function that you can use to filter rows in your database.
ds, is a reference to the current dataset that will have the filter applied,
row, is a reference to the current row of your dataset that the filter is checking.
index, is the current row number that is getting filtered.
You can use these values to compile your own custom filter, as i did in example posted above. It uses the row variable to check for data in the current filtered row, and decided based on the information of that row, if the filter function should return the row, or remove the row ( return nothing );
This is only one of the points. the other point is, that I dont know what to look for, when I need help. This filter thing from yesterday, is, nice, works only half, and brings me to the next frontier, like that GROUP BY thing, and that the dropdown fields are closed.
There are a few points to look for information, when i first started, i used allot code from the examples. And searched the Spry API for information. And bought a few books on JavaScript. ( Spry got me hooked on JavaScript ). The Spry Docs is basically the base source of information. It links to almost everything you need. For more about data sets I would really suggest reading the articles that are bundled with Spry.
These pages are bookmarked by me:
http://labs.adobe.com/technologies/spry/docs.html
http://labs.adobe.com/technologies/spry/articles/data_api/index.html
http://labs.adobe.com/technologies/spry/samples/
http://labs.adobe.com/technologies/spry/articles/data_set_overview/index.html
http://labs.adobe.com/technologies/spry/articles/best_practices/index.html
http://labs.adobe.com/technologies/spry/widgets/widgets.html
When i got more used to Spry and JavaScript in I got most of my knowledge by analising all functions in side of Spry, all methods and functions properties, understanding how things work, and why things work. So i can provide better solutions for problems.
When I got one, I got 3 new problems. Thats not so in PHP.
An other thing is, that the german characters arent displayed right. and and and and...
:-) I got to have a coffee now...
Denis
set column types to HTML, make sure you have the correct iso set for your XML and page. If you page is "iso-8859-15" make sure your XML and data is that as well. The same counts for UTF-8 and other encodings.
Similar Messages
-
Thickbox/jquery kills my spry dataset
I've been working with a spry dataset on a project that I've
recently added Thickbox to. Once I've added the 2 required js
script files to the header, the dataset stopped displaying any
data.I found a detailed thread about this very problem in the
forums, but all the combinations of adding an observer to my spry
dataset haven't helped at all. Here is the code of the latest
attempt - anyone see where I went wrong?The main reason can be that Thickbox is triggered before the
dataset is
fully loaded:
You can try this:
1.- Open thickbox.js, Copy the content include in the
function attached to
"$(document).ready" (lines 14 to 16):
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass
where to apply
thickbox
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
2.- Comment the whole function, because we'll trigger it
using Spry
3.- Now, go to the main document where you defined the
observer:
This is your current code:
<script>
function myRegionCallback(notificationState, notifier, data)
if (notificationType == "onPreUpdate")
alert(regionID + " is starting an update!");
else if (notificationType == "onPostUpdate")
alert(regionID + " is done updating!");
</script>
<link href="css/thickbox.css" rel="stylesheet"
type="text/css" />
<script type="text/javascript">
<!--
var dsCalendar = new
Spry.Data.XMLDataSet("DNUdata.php?epoch=<?php echo
$epoch
?>",
"root/row",{sortOnLoad:"app_time",sortOrderOnLoad:"ascending",useCache:false,loa
dInterval:1500});
//-->
Spry.Data.Region.addObserver("ddetail", MyRegionCallback);
</script>
4.- We can simplify things a bit; Since we are only
interested in the moment
when the region is finished, we'll replace the callback
function with an
region observer object:
<link href="css/thickbox.css" rel="stylesheet"
type="text/css" />
<script type="text/javascript">
<!--
var dsCalendar = new
Spry.Data.XMLDataSet("DNUdata.php?epoch=<?php echo
$epoch
?>",
"root/row",{sortOnLoad:"app_time",sortOrderOnLoad:"ascending",useCache:false,loa
dInterval:1500});
//create the observer
TB_Observer= new Object()
TB_Observer.onPostUpdate = function()
//we can launch the thickbox
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass
where to apply
thickbox
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
Spry.Data.Region.addObserver("ddetail", TB_Observer);
//-->
</script>
HTH
Andres Cayon
Spain Adobe Dreamweaver User Group
http://www.dwug.es
"rlcigars" <[email protected]> escribió
en el mensaje de noticias
news:[email protected]...
> I've been working with a spry dataset on a project that
I've recently
> added
> Thickbox to. Once I've added the 2 required js script
files to the header,
> the
> dataset stopped displaying any data.I found a detailed
thread about this
> very
> problem in the forums, but all the combinations of
adding an observer to
> my
> spry dataset haven't helped at all. Here is the code of
the latest
> attempt -
> anyone see where I went wrong?
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="
http://www.w3.org/1999/xhtml"
> xmlns:spry="
http://ns.adobe.com/spry">
> <head>
> <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
> <title>Untitled Document</title>
> <script src="SpryAssets/xpath.js"
type="text/javascript"></script>
> <script src="SpryAssets/SpryData.js"
type="text/javascript"></script>
> <script src="scripts/jquery.js"
type="text/javascript"></script>
> <script src="scripts/thickbox.js"
type="text/javascript"></script>
> <script>
> ...
> function myRegionCallback(notificationState, notifier,
data)
> {
> if (notificationType == "onPreUpdate")
> alert(regionID + " is starting an update!");
> else if (notificationType == "onPostUpdate")
> alert(regionID + " is done updating!");
> }
>
> </script>
>
>
> <link href="css/thickbox.css" rel="stylesheet"
type="text/css" />
> <script type="text/javascript">
> <!--
> var dsCalendar = new
Spry.Data.XMLDataSet("DNUdata.php?epoch=<?php echo
> $epoch
> ?>",
>
"root/row",{sortOnLoad:"app_time",sortOrderOnLoad:"ascending",useCache:false,loa
> dInterval:1500});
> //-->
> Spry.Data.Region.addObserver("ddetail",
MyRegionCallback);
>
> </script>
>
>
> </head>
>
> <body>
> <div id="ddetail" spry:region="dsCalendar">
> <table width="982">
> <tr>
> <th width="169"><div
align="left">Company</div></th>
> <th width="140"><div
align="left">Appointment Date</div></th>
> <th width="127"><div
align="left">Appointment Time</div></th>
> <th width="153"><div
align="left">Number</div></th>
> <th width="70"><div align="left">Caller
ID</div></th>
> <th width="108"><div align="left">Last
Called</div></th>
> <th>edit</th>
> </tr>
> <tr spry:repeat="dsCalendar">
> <td>{company}</td>
> <td>{app_date}</td>
> <td>{app_time}</td>
> <td>{number}</td>
> <td>{clid}</td>
> <td>{last_called}</td>
> <td><a
href="DNUsingledetail.php?id={id}">edit</a></td>
> </tr>
> </table>
> </div>
> -
Dw cs5.5 + Phonegap + spry dataset xml and images links broken
Hi all,
I'm building an app using DW CS5.5 and Phonegap.
This is what I've done:
created pages using the starter template (local)
I created a php page that run a query on a mysql database and output an xml file
I created a spry dataset using the php (see 2) file as data file
It works locally and on-line on my website.
But if I package an app using the android sdk from dw CS5.5 I have problems: all images are all broken. It seems that the link to image is not correct.
In fact, all images are not using absolute path (http://www.mysite.com/images/...) but are set this way: /images/....
So, my question is: have I to specify all images sources using absolute paths to make it work when packaged?
TIA for any reply
tonyHi Gramps,
I just solved the problem with image paths (I made all src paths absolute).
There is only one problem left: I opened another discussion: http://goo.gl/ysNDH
But here the link you (correctly) need to trobleshoot the problem): http://www.camar.it/newsxml
It should work on desktop browsers but it fails when I pack the app for android and install it on an android smartphone: I get "error loading page" when clicking on any details link (the button label is: DETTAGLI) on the news page.
Tony -
How can i hide a portion of the text inside a spry dataset "stackedcolumn"?
Hi all
I have a spry dataset set up reading a .xml file for the price/name/description/etc. I want to only show some of the text (a certain number of characters) at the start then give the visitor the option of clicking a toggle button to see more of the description and help with size of the pages. How do i do that exactly?
I know I have to probably implement jquery toggle but how does it work with a spry?
here is the code as it stands.
<div spry:region="catalog" class="SpotlightAndStacked">
<div spry:repeat="catalog" class="SpotlightAndStackedRow">
<div class="SpotlightContainer">
<div class="SpotlightColumn"><a href="_images/catalog/Art/{Picture_File}" title="{Headline}"><img src="_images/catalog/thumbs/Art/{Picture_File}"></a></div>
</div>
<div class="StackedContainer">
<div class="StackedColumn"> {Item_Last_Name}, {Item_First_Name}</div>
<div class="StackedColumn"> {Item_Code_Number}</div>
<div class="StackedColumn"> {Headline}</div>
<div class="StackedColumn"> {Complete_Description}</div>
<div class="StackedColumn"> {Item_Code_Number}</div>
<div class="StackedColumn"> <strong>Retail price: {Retail_Price}</strong></div>
</div>
<br style="clear:both; line-height: 0px" />
</div>
</div>
Thanks in AdvanceThere are many options for editing objects/layers in the time line. You can split tracks, slip videp, trim, delete, cut, copy and paste etc. Without more specifics about what you want to do I would suggest you review the users guide. Select help to open the manual and then go to Timeline>Edit objects in the timeline. I am sure you will find the answer to your question.
-
Spry dataset is not working properly in IE8, Help me plz...
I am a new user of dreamweaver CS5. I have designed some pages which are using Spry Dataset. It is working perfect in Firefox and IE 7 but it was not working at all in IE 8. Ben asked me to paste the following into the <HEAD> section
<meta http-equiv="X-UA-Compatible" content="IE=7" />
and after doing that it was working properly. But today I tested my site again and I came to know that it is only showing the Master Table, when we click on any master Picture of Spry Dataset it is not showing the details.
Here is the link of my site
http://dsdforu.com/WomensKNewArrivalCollection.htmlhttp://www.dsdforu.com/WomensKSDWCollection.html
I was trying to solve it by myself but I can't. Can any one tell me what am I doing wrong? or what would be the solution.
Thanks for your time.
SuboohiHi Suboohi,
I think the problem may be the pictures themselves. They do not seem to be loading quickly which gives the impression that they are not showing, especially when you have a slow connection.
You might look at optomising the pictures and preloading the images to allow your site to work properly.
I hope this helps.
Ben -
Spry dataset not working in Template - please help
Hi all,
I have a situation where when I pull a spry dataset from an
xml file and display the contents in a table which works fine in a
regular html page but not a template formed page for repeatable
region.
The error I get is FAILED TO RETRIEVE DATA SET FOR SPRY
REPEAT. Prior to that it tells me GetParentDataSet is null or not
an object. I tried setting up a repeat region around the repeated
rows but that didn't work either. So I pulled everything else out
that might be causing the problem but nothing. I checked the
pathing as well for the spry assets and it checks out okay.
Anyway, here's the template.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:spry="
http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<link href="../styles/style.css" rel="stylesheet"
type="text/css">
<link href="../styles/linkB.css" rel="stylesheet"
type="text/css">
<link href="../styles/linkA.css" rel="stylesheet"
type="text/css">
<!-- TemplateEndEditable -->
<script src="../SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryData.js"
type="text/javascript"></script>
<script type=”text/javascript”>
// Setup nested data sets:
var dsReagCons = new
Spry.Data.XMLDataSet("../xml/consumables.xml",
"electrodes_and_accessories/item[@catno='il_acl100_7000_coag_systems']");
</script>
</head>
<body>
<!-- Main body contents -->
<!-- TemplateBeginEditable name="EditRegion3" -->This
is a test
<!-- TemplateEndEditable -->
<div spry:region="dsReagCons">
<table align='center' width='680' border='1'
cellpadding='3' cellspacing='0' class='form'>
<tr>
<td colspan='5' class='prodHead' >Electrodes and
Accessories</td>
</tr>
<tr class='prodHead2'>
<td spry:sort="ddi_cat_no" width='80'>Diamond<br
/>
Cat. No.</td>
<td spry:sort="oem_cat_no" width='80'>OEM<br />
Cat. No.</td>
<td width='300'>Description</td>
<td spry:sort="models" width='100'>Models</td>
<td width='45'>UOM</td>
</tr>
<tr spry:repeat="dsReagCons">
<td>{dsReagCons::ddi_cat_no}</td>
<td>{dsReagCons::oem_cat_no}</td>
<td>{dsReagCons::desc}</td>
<td>{dsReagCons::models}</td>
<td>{dsReagCons::uom}</td>
</tr>
</table>
</div>
</body>
</html>
What am I missing here? Like I said I even tried putting a
repeat region around the table itself.
Thanks,
-- JimHey,
Good to have a comm expert on this. Actually I solved the
problem. It was combination of what I was doing within the template
and the way the xml file was formed. Also, I had to use a template
parameter to feed a spry:test filter.
Thanks for getting back to me anyway.
-- Jim -
Can I link to specific items in a Spry dataset?
I have a website for a community festival. I'm using a spry dataset for the festival events http://www.horizonfest.co.uk/programme/events.html . Visitors click on an event in the left hand column and it appears on the right.
The festival programme is on this page: http://www.horizonfest.co.uk/programme/sitemap.html . If you scroll down to for example the evening event on 16 July, it will take you to the events page (first link above). My clients would like it to open the event for 16 July on the events page (and similarly for any event). At the moment visitors have to scroll down and open the event themselves.
I have tried putting an anchor in the 16 July data item. I am not surprised it doesn't work because the anchor is effectively on a different page.
So, is there any way of doing this? I'll be pleased if the answer is definitively 'no'. I'll be delighted if there is a way of doing this. If there isn't it may be something to look at in the future.
I subscribe to creative cloud.
Thank you
Chris SissonsI'm sorry I don't have an answer for you other than to say it's a grim future for Spry. Adobe abandoned the framework late last year with no plans for future development with it.
Nancy O. -
Slimbox not working with Spry Dataset
Hi there,
I'm trying to populate a page with Spry Dataset and use Slimbox2 to show a set of 4 images when a thumbnail is clicked.
The original webpage WITHOUT Spry Dataset is here:
http://shadowmuseum.com/portfolio/p-web.html
Currently it works with just slimbox, but as soon as I add a Spry Dataset, the large images won't load anymore. When a thumbnail is clicked on, it opens the 1st large image of the set in a new page, completely removing the lightbox effect.
I've scouted the internet for solutions; it's been suggested that slimbox doesn't work because spry doesn't have time to load the content first. But I'm not savvy with javascript at all, so have no idea how to work around it....
Any help would be greatly appreciated.
Thanks a lot.
P.S. Below is the HTML code for the page with both spry & slimbox:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/bone.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="keywords" content="Shadow Museum, design, photography, london, web, web design, ana, ana lorraine lui, benjamin, backhouse, E1, E8, N16, graphic design, st martins, creative, agency, bespoke, multi-disciplinary" /><meta name="description" content="London based bespoke multi-disciplinary creative agency. Services include web design, photography, print design, and filmmaking." />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Shadow Museum || London-based bespoke multi-disciplinary creative agency</title>
<script type="text/javascript" src="../zzAssets/scripts/Lightbox/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="../zzAssets/scripts/Lightbox/js/slimbox2.js"></script>
<script src="../zzAssets/scripts/SpryAssets/xpath.js" type="text/javascript"></script>
<script src="../zzAssets/scripts/SpryAssets/SpryData.js" type="text/javascript"></script>
<link rel="stylesheet" href="../zzAssets/scripts/Lightbox/css/slimbox2.css" type="text/css" media="screen" />
<!-- InstanceEndEditable -->
<link href="../zzAssets/scripts/main.css" rel="stylesheet" type="text/css" />
<script src="../zzAssets/scripts/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="../zzAssets/scripts/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../zzAssets/scripts/clock/clockp.js"></script>
<script type="text/javascript" src="../zzAssets/scripts/clock/clockh.js"></script>
<!-- InstanceBeginEditable name="head" -->
<script type="text/javascript">
<!--
var dsWeb = new Spry.Data.XMLDataSet("p-web.xml", "portfolio/project");
dsWeb.setColumnType("info", "html");
//-->
</script>
<!-- InstanceEndEditable --><!-- InstanceParam name="footer" type="boolean" value="true" --><!-- InstanceParam name="clock" type="boolean" value="true" -->
</head>
<body>
<div id="clock_a"></div>
<div id="menu">
<ul id="mainMenu" class="MenuBarHorizontal">
<li><a href="../index.html">Home</a> </li>
<li><a href="../news/news.html">News</a></li>
<li><a class="MenuBarItemSubmenu" href="#">About</a>
<ul>
<li><a href="../about/our_story.html">Our Story</a></li>
<li><a href="../about/our_values.html">Our Values</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarItemSubmenu">Services</a>
<ul>
<li><a href="../services/web_design.html">Web Design</a></li>
<li><a href="../services/print_design.html">Print Design</a></li>
<li><a href="../services/photography.html">Photography</a></li>
<li><a href="../services/filmmaking.html">Filmmaking</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarItemSubmenu">Portfolio</a>
<ul>
<li><a href="p-web.html">Web Design</a></li>
<li><a href="p-print.html">Print Design</a></li>
<li><a href="p-photography.html">Photography</a></li>
<li><a href="p-filmmaking.html">Filmmaking</a></li>
</ul>
</li>
<li><a href="../contact/contact.html">Contact</a></li>
</ul>
</div>
<!-- InstanceBeginEditable name="content area" -->
<div id="content">
<div id="p-web">
<h2>Web Portfolio</h2>
<div class="SpryHiddenRegion" spry:region="dsWeb">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr spry:repeat="dsWeb">
<td align="center" valign="top">
<a href="../zzAssets/images/p-web/{pic1}" rel="{label}" title="{title}"><img src="../zzAssets/images/p-web/{thm}" width="180" height="130" /></a>
<a href="../zzAssets/images/p-web/{pic2}" rel="{label}" title="{title}"></a>
<a href="../zzAssets/images/p-web/{pic3}" rel="{label}" title="{title}"></a>
<a href="../zzAssets/images/p-web/{pic4}" rel="{label}" title="{title}"></a>
</td>
<td align="left" valign="top">
<h3>{title}</h3>
{info}
<p><a href="http://{url}" target="_blank">{url-label}</a></p>
</td>
</tr>
</table>
</div>
<p> </p>
</div>
</div>
<!-- InstanceEndEditable -->
<div id="footer">
<div id="watermarkRight">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top">©2009 Shadow Museum | Company Number 6576238
| <a href="../terms.html" class="colourless">Terms & Conditions</a></td>
<td align="right" valign="top">contact us: <a href="mailto:[email protected]">[email protected]</a></td>
</tr>
</table>
</div>
</div>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("mainMenu", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
<!-- InstanceEnd --></html>You are not re-initializing the lightbox library code after Spry have generated the markup.
You can use the Spry region observer onPostUpdate to get notified of region re-generation and recall the initialization code of the lightbox. -
With Acces you create the dataset and then just pull the dataentry into the link box and you're done.
I know hot to make the link open in a new page but how to put the data into the link box using a spry dataset??
Tried pulling it to the link box but id soent work... any ideas??edited my first post and I hope for a reply
-
Results (totals) row in spry datasets
Hi everybody.
I spent a lot of time on the problem how to get row with
result of the spry dataset.
And I found it:
Javascript code:
// This is our dataset
var dsSpecials = new Spry.Data.JSONDataSet("paysdata.cfm",
{path:"rows"});
// This is dataset for results
var dsSums = new Spry.Data.JSONDataSet();
// Loading empty array to results
dsSums.loadDataIntoDataSet("[]");
var myObserver = new Object;
// Calculate function will run each time when data will
change
myObserver.onDataChanged = function(dataSet, data) {
calcTotals(); }
dsSpecials.addObserver(myObserver);
var calcTotals = function() {
var tsums = [];
var rows = dsSpecials.data;
// ... here you calculate what you need...
dsSums.loadDataIntoDataSet(Spry.Utils.serializeObject(tsums));
And now, the final part - HTML code:
<div spry:region="dsSpecials dsSums"
class="SpryHiddenRegion">
<table>
<tr spry:repeat="dsSpecials">
</tr>
<tr spry:repeat="dsSums">
</tr>
</table>
</div>Loveanie wrote:
> There seems to have a bug in the final release of DW CS4
that wasn't there in
> the Beta version: when we create an html Spry dataset
and we check the
> "Advanced data selection" option, DW automatically adds
a row with column0,
> column1, and so on. This row doesn't do anything good
It identifies the column. In Step 2, you can select each
column and
change its name in the Column Name field at the top of the
wizard.
Without a column name, the Spry data set has no way of
identifying the
data you want to display.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
Using Multiple Spry datasets? - regarding Regions: DetailContainer/DetailRegion
Hi Spry experts:
I've been battling a good battle: Spry datasets and mobile app development. I'm making headway, but as is true in life, there are problems. I've professor googled for several days related to the current issue without success. I'm throwing in the towel and asking for help.
I have a jquery mobile project I am developing in dreamweaver cs 5.5. I created a Spry HTML dataset to populate 3 lists on separate pages. Each list page is populated by a single html file that contains 3 tables with different ids.
Each table has 3 rows (name, image, desc). Each list is populated using the "name" field from each table. The lists part is all working just fine.
However, when a list item is selected (clicked), it is supposed to take the user to another page (details). There are three details pages--one for each list. These pages are for the item details. Each details page uses the same basic code. Only one page works. If I switch the location of the detail pages in DW, the page that is closest to the list pages is the one that works. I know that I am doing something that is pretty plain to someone who knows Spry, but I'm lost as to what to do next. I've tried multiple fixes and read many Spry documents. A HUGE thanks in advance to anyone who knows the answer. If you need more information, please let me know.
The expected behavior is that whatever list item is clicked the item should jump to the details page and load the data.
Here is the code for the details pages:
<!--*****************************************************************************-->
<!--Description page for items from list 1-->
<!--*****************************************************************************-->
<div data-role="page" id="details_list1"
data-add-back-btn="true" data-theme="c">
<div data-role="header">
<h1>Details List 1</h1>
</div>
<div data-role="content">
<h2><span class="DetailContainer">
<span spry:detailregion="dsList1">{dsList1::name}</span></span></h2>
<p class="DetailColumn" align="center">
<span class="DetailContainer">
<span spry:detailregion="dsList1"
class="DetailContainer">{dsList1::image}</span></span></p>
<p class="DetailColumn"><span class="DetailContainer">
<span spry:detailregion="dsList1" class="DetailContainer">
{dsList1::desc}</span></span></p>
<span class="DetailContainer">
<span spry:detailregion="dsList1"
class="DetailContainer"><br />
</span></span><br>
<br>
</div>
<!--*****************************************************************************-->
<!--Description page for List 2-->
<!--*****************************************************************************-->
<div data-role="page" id="description_list2" data-add-back-btn="true" data-theme="e">
<div data-role="header">
<h1>List 2 Details</h1>
</div>
<div data-role="content">
<h2><span class="DetailContainer">
<span spry:detailregion="dsList2">
{dsList2::sign}</span></span></h2>
<p class="DetailColumn" align="center">
<span class="DetailContainer">
<span spry:detailregion="dsList2" class="DetailContainer">
{dsList2::image}</span></span></p>
<p class="DetailColumn"><span class="DetailContainer">
<span spry:detailregion="dsList2" class="DetailContainer">
{dsList2::desc}</span></span></p>
<span class="DetailContainer"><span spry:detailregion="dsList2" class="DetailContainer"><br />
</span></span><br>
<br>
</div>
<!--*****************************************************************************-->
<!--Description page for List 3-->
<!--*****************************************************************************-->
<div data-role="page" id="description_list3" data-add-back-btn="true" data-theme="e">
<div data-role="header">
<h1>List 3 Details</h1>
</div>
<div data-role="content">
<h2><span class="DetailContainer">
<span spry:detailregion="dsList3">
{dsList3::sign}</span></span></h2>
<p class="DetailColumn" align="center">
<span class="DetailContainer">
<span spry:detailregion="dsList3" class="DetailContainer">
{dsList3::image}</span></span></p>
<p class="DetailColumn"><span class="DetailContainer">
<span spry:detailregion="dsList3" class="DetailContainer">
{dsList3::desc}</span></span></p>
<span class="DetailContainer"><span spry:detailregion="dsList3" class="DetailContainer"><br />
</span></span><br>
<br>
</div>I've been battling a good battle: Spry datasets and mobile app development.
Is this an offline app?
If not, then please post a link to your site.
Gramps -
Using an .aspx file for a spry dataset
I need to pull title data and associated links from this page (
http://www.isurv.com/site/custom_scripts/rss_whats_new.aspx) on to a separate site where the info is displayed as latest news.
Whilst locally I can get this to work in I.E. no data shows in Firefox, Chrome, Safari.
If I upload the file and supports to the site I get nothing in any browser.
Question. Can I use an .aspx file as a source for my Spry dataset?
If so can some one show me an example?
here's my code:
<script type="text/javascript">
var ds2 = new Spry.Data.XMLDataSet("http://www.isurv.com/site/custom_scripts/rss_whats_new.aspx", "rdf:RDF/item");
ds2.setColumnType("dc:date", "date");
</script>
<body>
<div spry:region="ds2">
<ul spry:repeatchildren="ds2">
<li><a href="{ds2::link}">{title}</a></li>
</ul>
</div>
</bodyThe problem lies with the fact that XML data cannot normally be transferred from one domain to another, that is unless you are using YQL, see here http://developer.yahoo.com/yql/
Our friend Arnaut Kazemier (V1) has written a nifty script that combines the features of Spry with that of YQL and can be found here https://github.com/3rd-Eden/Spry-YQL-DataSet. Using the YQLDataSet I have written a test page which can be found here http://pleysier.com.au/rss_example/
However, I tried to connect to http://www.isurv.com/site/custom_scripts/rss_whats_new.aspx without the result
Another interesting possibility can be found here http://www.linecraft.com/dreamweaver-get-external-feed/extension.php. I have not tried it yet.
Gramps -
Advanced data selection in Spry datasets
There seems to have a bug in the final release of DW CS4 that
wasn't there in the Beta version: when we create an html Spry
dataset and we check the "Advanced data selection" option, DW
automatically adds a row with column0, column1, and so on. This row
doesn't do anything good, and if we click next, checking or
unchecking the "Use first row as header" option doesn't change
anything...
In fact, if we don't check the "Advanced data selection" in
the first step, checking or unchecking the "Use first row as
header" on the second step toggles the column0... behavior... So,
it's like if there was a bug that if we use advanced, it always
acts as if the "Use first row as header" was always unchecked...
adding an unessesary row to our data...
For now, the only way I could go around that, was to not use
the "Advanced data selection", and in the last step, clicking Set
Up... and removing the columns that I don't want...Loveanie wrote:
> There seems to have a bug in the final release of DW CS4
that wasn't there in
> the Beta version: when we create an html Spry dataset
and we check the
> "Advanced data selection" option, DW automatically adds
a row with column0,
> column1, and so on. This row doesn't do anything good
It identifies the column. In Step 2, you can select each
column and
change its name in the Column Name field at the top of the
wizard.
Without a column name, the Spry data set has no way of
identifying the
data you want to display.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
I'm using the spry dataset feature with an XML file. The XML is set up like so...
<item>
<image>(path to image)</image>
<title>(short title)</title>
<desc>(short description of image)</desc>
<cat>(one of three categories: cars, shirts, graphics)</cat>
</item>
Ultimately my goal is to get 3 checkboxes(cars, shirts, graphics) to filter the spry content accordingly.
What would be my best route for applying the filters?You are best off using xpath filtering as seen here http://labs.adobe.com/technologies/spry/samples/data_region/FilterXPath_with_params.html
I hope this helps.
Ben -
Spry dataset ie9 display anomaly
I have a well-formed XML data set with 6 fields per record derived from an Excel spreadsheet which displays exactly as expected in Firefox using a Spry dataset constructed by Dreamweaver CS5..
In IE9, however, an extra blank field is inserted somewhere around every 1000 fields or so which shifts the remaining fields of that record to the right into the margin area.
This smells like a rendering bug in IE9, but if anyone has a better idea and a fix, I'd be very happy to hear from them.
The site is not quite ready to go live, so I can't yet give you a url.Curiosity got the better of me.
I use DW CS5 and this doesn't come with the CSVdataset option, but I found SpryCSVdataset.js on the web and cobbled together appropriate syntax with some difficulty given the paucity of documentation on the subject. CSV doesn't show up as an option in the bindings panel, so it has to be done by hand.
The csv file has the headings as the first record. There is available syntax to override this and to add your own headings in the ds1 declaration.
In case it helps anyone, the end result was:
<head>
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script src="SpryAssets/SpryCSVDataSet.js" type="text/javascript"></script>
<script type="text/javascript">
var ds1 = new Spry.Data.CSVDataSet("CSVdatafile.csv");
</script>
</head>
<div spry:region="ds1" id="memorial">
<table width="900" border="0">
<tr class="spryEven">
<th onClick="ds1.sort('No','toggle')">No</th>
<th onClick="ds1.sort('Initials','toggle')">Initials</th>
<th onClick="ds1.sort('Surname','toggle')">Surname</th>
<th onClick="ds1.sort('Served','toggle')">Served</th>
<th onClick="ds1.sort('Role','toggle')">Role</th>
<th onClick="ds1.sort('Where','toggle')">Died</th>
<th onClick="ds1.sort('When','toggle')">When</th>
</tr>
<tr spry:repeat="ds1" spry:odd="spryOdd" spry:even="spryEven">
<td>{No}</td>
<td>{Initials}</td>
<td>{Surname}</td>
<td>{Served}</td>
<td>{Role}</td>
<td>{Where}</td>
<td>{When}</td>
</tr>
</table>
</div>
This generates the required display and the csv datafile is only 75k against 250k for the XML, which is a bonus.
However, the display problem is still there!
Experimenting by dropping fields and changing table width, it looks to me like there might be a rendering bug related to the width of the fields relative to the available column width (which so far I haven't found any way to control manually) and the number of wrapped fields ahead of the problem point. Possibly something in the word wrap logic that only appears in IE?
csv is also much more sensitive to empty fields than XML.
Maybe you are looking for
-
I have an iPhone 3GS, and realized I do most of my SMS/MMS messaging at home, when connected to my WiFi. Then I began to think, if I'm using the messaging app over WiFi, can the SAME app (which, personally I like much better than the third party apps
-
I just went thru 2 hours of updating my iphone 4 I had to b/c I could no longer take pictures of my daughter b/c I kept getting "storage almost full" and "storage full" many times. I have 13.68GB capacity 4.4 is designated to "other" - what is this O
-
Three times in the last week, when I have put my MacPro (2009, running OSX 10.7.5) to sleep, when I wake it, my Bluetooth Apple Trackpad and my Bluetooth Logitech keyboard are disconnected, and I have a little zig-zag slash through the Bluetooth icon
-
My songs skip on iTunes. I have a Mac Pro (10 GB ram) with my iTunes library on a WD My Book World Edition (Blue Rings) network drive connected to an Airport Extreme N. Also, when going to the next song, there is no sound but the song is playing. Thi
-
Hi all we are in process of creating new company code. And wanted to upload data for the same.We are given the reference company code for extracting the master data. I dont know how to make use of this reference company code to extract the MATERIAL A