Paged Data Set w/ Details
I'm having a bit of an issue -- I can successfully create a
PagedView dataset from an XMLDataSet:
var ds1_dars = new Spry.Data.XMLDataSet("build_xml/xxx.php",
"dars/dar");
var pg1_dars = new Spry.Data.PagedView(ds1_dars, { pageSize:
15 });
But the web page will not display the details of the selected
row of the master table. The following code does show the first row
of the master table, just not the details of the currently selected
row. (I should mention that I could get the master / detail
function to work without the introduction of the PagedView code.)
<div spry:region="pg1_dars">
<table width="100%" border="0" cellpadding="0"
cellspacing="0">
<tr>
<th>Original_date</th>
<th>Product</th>
<th>Release</th>
<th>Title</th>
</tr>
<tr spry:repeat="pg1_dars" spry:setrow="pg1_dars"
spry:even="even_row" spry:hover="hover_row">
<td>{original_date}</td>
<td>{product}</td>
<td>{release}</td>
<td>{title}</td>
</tr>
</table>
</div>
<h2>Details</h2>
<div spry:detailregion="pg1_dars">
<p>{product} {release}</p>
</div>
Can someone tell me why the detail information is not
updating with the selected row, or tell me where I'm going wrong?
Hi Patrick,
Setting the current row on the paged view data set actually
sets the current row on the master data set. Try changing this:
<div spry:detailregion="pg1_dars">
<p>{product} {release}</p>
</div>
to this:
<div spry:detailregion="ds1_dars">
<p>{product} {release}</p>
</div>
I'm trying to rework the paged view data set so that it is a
bit more independent of the master data set.
--== Kin ==--
Similar Messages
-
Please Help, Data Set Master/Detail with mySQL DB
Hi...
I installed the Data Set Master/Detail Sample (states and
citys autopopulate) getting values from a XML file...
when a user adds a listing in my site, it works great.. i use
the XML file values for the states/citys and then everything is
stored in a DB... BUT i need to do this..
when he comes back to edit his listing, i want the Data Set
Master/Detail to show hes values (from de DB) with the option to
edit them, not the first XML file values.
ThanksThank you kinblas!!!!!
I saw another post with the solution!!!
Here it is
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=602&threadid =1308016&highlight_key=y&keyword1=SetDefaultState
Thanks again! -
2 Data Sets - 1 Detail Region - HOW???
I need to feed two separate XML data sets to one detail
region. I tried a method (from a previous post) of adding both data
sets to one detail region, separated by a space. It will only
access the first data set listed and ignores the one that trails.
E.G. -
<div id="sidebar" spry:detailregion="emailData07
emailData06">
Thanks in advance for
any help!!!
Source follows:
<div id="content">
<div id="Acc1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div
class="AccordionPanelTab"> 2007 Email
Archive</div>
<div class="AccordionPanelContent">
<div id="dataHolder" spry:region="emailData07">
<table id="products">
<tr>
<th width="16%" spry:sort="bDate">Date</th>
<th width="20%">Source Code</th>
<th width="64%">Offer Description</th>
</tr>
<tr spry:repeat="emailData07" class="even"
spry:setrow="emailData07" spry:hover="rowHover"
spry:select="rowSelected" onclick="MM_effectAppearFade('boxshot',
1000, 0, 100, true)">
<td>{bDate}</td>
<td>{sourceCode}</td>
<td>{campaign}</td>
</tr>
</table>
</div>
</div>
</div>
<div class="AccordionPanel">
<div
class="AccordionPanelTab"> 2006 Email
Archive</div>
<div class="AccordionPanelContent">
<div id="dataHolder" spry:region="emailData06">
<table id="products">
<tr>
<th width="16%" spry:sort="bDate">Date</th>
<th width="20%">Source Code</th>
<th width="64%">Offer Description</th>
</tr>
<tr spry:repeat="emailData06" class="even"
spry:setrow="emailData06" spry:hover="rowHover"
spry:select="rowSelected" onclick="MM_effectAppearFade('boxshot',
1000, 0, 100, true)">
<td>{bDate}</td>
<td>{sourceCode}</td>
<td>{campaign}</td>
</tr>
</table>
</div>
</div>
<div class="AccordionPanelFooter"></div>
</div>
</div>
<p>Questions? Revisions? <a
href="mailto:[email protected]?subject=Email Archive Query"
class="SelectedListBoxItem">Send Email</a></p>
</div>
<!-- Detail Region Starts Here -->
<div id="sidebar" spry:detailregion="emailData07
emailData06">
<p id="boxshot" ><img src="{emailimage}"
alt="{bDate} Email Screen Shot" /></p>
<p align="center"><a href="{emailLink}"
target="_blank" class="SelectedListBoxItem"><b>View
Email</b></a></p>
</div>Hey BSK,
There are 2 ways to write data references, one more formal
than the other.
Short: {nodename}
Formal: {dsname::nodename}
The formal version will always work.
The short version works when there is only one data set on
the region or, WHEN IT IS LISTED FIRST.
If you have a region with multiple datasets, data references
that come from the data set that is NOT first must use the formal
notation. This assures that we can distinguish between the data
sets, in case of duplicate node names.
So, for those data refs that come from emailData06, make them
{emailData06::nodename}
Make sense?
Thanks,
Don -
I'm trying to populate a second dropdown based on the
selected item in the first dropdown. I've been testing out Data Set
Master-Detail Sample but it specifies a field in the first select
"url" which contains the actual name of the url file.
1. I'm using the dynamic xml plugin from Adobe on a CF query.
Thus, I'd like to only pass the variable needed to the dataset
needed. I know it should look something like the example, but the
example is hardcoded, not dynamic ("/photos.php?galleryid=2000").
How do I make this dynamic based on the ID I have in the first
select drop down?
2. Also, I'm getting the error
that..."document.forms[0].select2" is Null or not an object.
3. here's my code:
<script type="text/javascript">
<!--
var dsclientlist = new
Spry.Data.XMLDataSet("/ajax/getclients.cfm",
"export/row",{sortOnLoad:"ClientName",sortOrderOnLoad:"ascending",useCache:false});
dsclientlist.setColumnType("ClientID", "number");
var dsproblemlist = new
Spry.Data.XMLDataSet("/ajax/getproblems.cfm", "export/row", {
method: "POST", postData: "clientrecid=184", headers: {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
</script>
</head>
<body>
<form name="selectForm" action="">
<div spry:region="dsclientlist">
<select name="select" spry:repeatchildren="dsclientlist"
onchange="document.forms[0].select2.disabled = true;
dsclientlist.setCurrentRowNumber(this.selectedIndex);" >
<option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
value="{ClientID}"
selected="selected">{ClientName}</option>
<option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
value="{ClientID}">{ClientName}</option>
</select>
</div>
<br />
<div spry:region="dsclientlist dsproblemlist">
<select name="select2"
spry:repeatchildren="dsproblemlist">
<option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
value="{dsproblemlist::ProblemID}"
selected="selected">{dsproblemlist::ProblemTitle}</option>
<option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
value="{dsproblemlist::ProblemID}">{dsproblemlist::ProblemTitle}</option>
</select>
</div>
</form>
Thanks,
Michael
Here's the code I'm usingKin,
Yes, I'm using ClientID from the first select box to try and
pass it to a query to get the values for the second select box. I
tried your code but I think I'm still missing something. With the
"post" method, wouldn't I need to actually do a form submit? Or
would it work just by changing the value in the first drop down?
I'm trying to base my method off of the following example,
but make it dynamic:
http://labs.adobe.com/technologies/spry/samples/data_region/DataSetMasterDetailSample.html
The query to get my second select list values looks like
this:
SELECT ProblemID,ProblemTitle,fgnClientRecID
FROM dbo.tbl_Problems
where fgnClientRecID = #url.ClientID#
My code looks like this:
<script src="/SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="/SpryAssets/SpryData.js"
type="text/javascript"></script>
<script type="text/javascript">
var dsclientlist = new
Spry.Data.XMLDataSet("/ajax/getclients.cfm",
"export/row",{sortOnLoad:"ClientName",sortOrderOnLoad:"ascending",useCache:false});
dsclientlist.setColumnType("ClientID", "number");
var dsproblemlist = new
Spry.Data.XMLDataSet("/ajax/getproblems.cfm", "export/row", {
method: "POST", postData: "clientrecid={dsclientlist::ClientID}",
headers: { "Content-Type": "application/x-www-form-urlencoded;
charset=UTF-8" } });
</script>
</head>
<body>
<form name="selectForm" action="">
<div spry:region="dsclientlist">
<select name="select" spry:repeatchildren="dsclientlist"
onchange="document.forms[0].select2.disabled = true;
dsclientlist.setCurrentRowNumber(this.selectedIndex);">
<option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
value="{ClientID}"
selected="selected">{ClientName}</option>
<option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
value="{ClientID}">{ClientName}</option>
</select>
</div>
<br />
<div spry:region="dsproblemlist">
<select name="select2"
spry:repeatchildren="dsproblemlist">
<option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
value="{dsproblemlist::ProblemID}"
selected="selected">{dsproblemlist::ProblemTitle}</option>
<option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
value="{dsproblemlist::ProblemID}">{dsproblemlist::ProblemTitle}</option>
</select>
</div>
</form>
Thanks,
Mike -
Failed to get a data set context!
What does this mean?
"processTokens: Failed to get a data set context!"
Ive setup a Paged Data Set using
var dsResults = new
Spry.Data.XMLDataSet("/general/xml/xml_Results.php'",
"/search_results/product");
var pvResults = new Spry.Data.PagedView(dsResults, {
pageSize: 7 });
The paged data works and everything is displayed correctly
however I receive that error message still? How do I resolve this?
ThanksIt typically means that you have a data reference that is
refering to a data set that the region is not bound to, for
example:
<div spry:region="ds1">
{dsFoo::bar}
</div>
--== Kin ==-- -
Help with Spry Detail Regions, XML Data Sets, for IMG gallery
Hello,
I'm working on a site for a friend of mine, a photo gallery. You can see the gallery here, it's a temporary one I'm working on
http://www.emiliajozefa.com/a_index.html
Here are some important parts of my code:
//initially load these data sets. the function will be called by the links to update components later<script type="text/javascript">
var intNumPhoto = 0;
dsGallery = new Spry.Data.XMLDataSet("photofile.xml", "galleries/ride/photo");
dsNav = new Spry.Data.XMLDataSet("photofile.xml", "galleries/ride");
function updateSpryComponents(galleryDir){
alert("updating spry components for " + galleryDir);
intNumPhoto = 0;
dsGallery = Spry.Data.XMLDataSet("photofile.xml", "galleries/" + galleryDir + "/photo");
dsNav = Spry.Data.XMLDataSet("photofile.xml", "galleries/" + galleryDir);
dsGallery.setCurrentRow(intNumPhoto);
//document.getElementById('nav').innerHTML='<H1>'+enlarge.inp.value+'</H1>';
document.getElementById('nav').innerHTML=
"<span spry:detailregion = 'dsGallery'>
<a href = 'javascript:' onclick = 'if(intNumPhoto > 0){intNumPhoto -= 1}; dsGallery.setCurrentRow(intNumPhoto);'><</a> {@id} / </span>
<span spry:detailregion = 'dsNav'>{@numPhotos}
<a href = 'javascript:' onclick = 'if(intNumPhoto < ({@numPhotos} - 1)){intNumPhoto += 1; }; dsGallery.setCurrentRow(intNumPhoto);'>></a>
</span>";
</script> <--- later ----><!-- SIDEBAR NAV. When link i clicked, set DataSet to the location of the new gallery -->
<div id = "sideBarNav">
<a href = "javascript:" onclick ='updateSpryComponents('ride');">Tannersville</a>
<br />
<a href = "javascript:" onclick = "updateSpryComponents('dive');">Dive</a>
<br />
<a href = "javascript:" onclick = "updateSpryComponents('poland');">Poland</a>
<br />
<a href = "javascript:" onclick = "updateSpryComponents('alaska');">Alaska</a>
</div>
</div>
<div id = "content2">
<!-- PHOTO CONTAINER I think I somehow need to refresh this section of the code to reload new data-->
<div id = "fotoContainer" spry:detailregion="dsGallery"><img src = "photos/{@path}" width = "{@width}" height = "{@height}"/></div>
<!-- IMAGE NAVIGATION -->
<div id = "nav">
<span spry:detailregion = "dsGallery" id = "galSpan">
<a href = "javascript:" onclick = "if(intNumPhoto > 0){intNumPhoto -= 1}; dsGallery.setCurrentRow(intNumPhoto);"><</a> {@id} / </span>
<span spry:detailregion = "dsNav" id = "navSpan">{@numPhotos}
<a href = "javascript:" onclick = "if(intNumPhoto < ({@numPhotos} - 1)){intNumPhoto += 1; }; dsGallery.setCurrentRow(intNumPhoto);">></a>
</span>
</div>
You could view source there to get the code. Here is what I believe is my problem
I'm trying to automate the site so that when you click on one of the links on the left, without refreshing the page, the paths to the galleries xml file changes, and the spry Detail Regions (1 for the images, 1 for the navigation - left and right arrows). I think the problem is that once the link changes the set and calls my updateSpryComponenets() function, the detail regions need to be refreshed. I'm currently trying to solve this by dynamically rewriting the HTML thru .innterHTML, everytime I call updateSpryComponents().There may also be a problem in the Javascript function updateSpryControllers because if I put the alert after the spry calls, I never get the alert
Thanks in advance for any help!Update:
Ok, the first query on the Recent tab doesnt work for me because it wont show unless its already voted, and since these are supposed to be new blurts, that kind of breaks the whole site:
"SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt Group By Id_blurt ORDER BY Blurt.`Date` DESC";
So I replaced it with what I originally had.
"SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date FROM Blurt ORDER BY Blurt.`Date` DESC";
But this doesn't provide me with the initial average rating:( -
2 different master/detail data sets
Hello. I have created a master/detail dataset for a photo gallery, with customised css. Whenever I tried to use this same spry tool for different purposes, so with different customised css, the photo gallery data set was roped into the new layout. To make the two independent, I tried saving the master/detail css of the photo gallery to an external style sheet - not sure why (I'm new to this), thought it would detach those rules from the default settings. Now when I add a new data set it appears with no css attributes at all. Help much appreciated.
I understand completely the desire to do something that turns out to be really complicated! But therein lies a real goal.
Have you uploaded this to a server, so I can see your code in action (or frozen...as the case may be!)?
To target specific IDs:
Wrap the entire masterdetail widget in a div:
<div id="galleryone">
<div class="MasterDetail">
<div spry:region="ds1" class="MasterContainer">
<div class="MasterColumn" spry:repeat="ds1" spry:setrow="ds1" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{thumbnail}</div>
</div>
<div spry:detailregion="ds1" class="DetailContainer">
<div class="DetailColumn">
<h2>{title}</h2>
</div>
<div style="position: relative;"><div class="DetailColumn">{image}
<div class="DetailColumn credit">{credit}</div></div></div>
<div class="DetailColumn top"><em>{medium}</em> {size}</div>
<div class="DetailColumn">{date}</div>
<div class="DetailColumn">{place}</div>
<div class="DetailColumn">{price}</div>
<div class="DetailColumn" id="sold">{sold}</div>
</div>
<br style="clear:both" />
</div>
</div>
Then you can restyle the CSS file by making a complete copy of the CSS file and re-linking it:
@charset "UTF-8";
/* SpryMasterDetail.css */
/* Copyright (c) 2007. Adobe Systems Incorporated. All rights reserved. */
/* This is the selector for the main Master/Detail structure container.
* If you want to constrain the width of the Master/Detail structure, set a width on
* the Master/Detail container. By default, our structure expands horizontally to fill
* up available space.
#galleryone .MasterDetail {
font: 100% Verdana, Geneva, sans-serif;
margin: 2px;
/* This is the selector for the Master Container element which houses all the MasterColumn
* classes. By default the Master column occupy about 35% from the width of the
* entire structure.
#galleryone .MasterDetail .MasterContainer {
width: 99px;
float: left;
height: 650px;
overflow-y: auto;
/* This is the selector for a Master Column element which holds the actual data for
* a master column.
#galleryone .MasterDetail .MasterColumn {
font-size: 75%;
padding:5px 10px 5px 0;
cursor:pointer;
float: left;
/* This is the selector for a highlighted Master Column element.
#galleryone .MasterDetail .MasterColumnHover {
background-color: #090;
/* This is the selector for a selected Master Column element.
#galleryone .MasterDetail .MasterColumnSelected {
padding: 25px 5px;
color: black;
/* This is the selector for the Detail Container element which houses all the DetailColumn
* classes. By default the Detail column occupy about 60% from the width of the
* entire structure.
#galleryone .MasterDetail .DetailContainer {
padding:10px 0 0 0;
width: 605px;
float: right;
overflow: auto;
#galleryone .DetailColumn.position {
position: relative;
/* This is the selector for a Detail Column element which holds the actual data for
* a detail column.
#galleryone .MasterDetail .DetailColumn {
margin-bottom: 1px;
Notice that I have pre-pended the #galleryone to every style in this stylesheet. Be sure to leave a space after #galleryone. This focuses specifically on the master/detail in <div id="galleryone">. Make sure this file is loaded after any generic master/detail CSS file. Better yet, make all your galleries specific with IDs (both in the page and in a CSS file).
If I only have small changes to make, I would add the additional styles into the generic stylesheet:
.MasterDetail {
font: 100% Verdana, Geneva, sans-serif;
margin: 2px;
#galleryone .MasterDetail {margin: 30px;}
Note that I only made a style selector for the one attribute that changed. All the other attributes will remain the same (font: 100% Verdana, Geneva, sans-serif;)
It is possible that styling other than specifically master/detail styling will vary from gallery to gallery.
For instance, if h2 will change from gallery to gallery:
#galleryone h2 {color: red;}
Do this in either your general or your master/detail stylesheet.
Curly brackets are the two keys to the right of the "P" key on the keyboard...shift to get curly brackets.
When you make a secondary stylesheet (named to correspond to its use), you must attach it to your page using the Link icon at the bottom of the CSS Styles Panel. Browse to the file and press the Link radio button. Then your additional styles will show in your stylesheet.
Beth -
How do I link a Spry data set with a detail region to a html web site?
I have created a spry data set with a detail region. It works well. However, I would like to have a link from the detail region to another html web site. Can anyone help with the code? Below is the spry data set.
<?xml version="1.0" encoding="utf-8"?>
<books>
<book>
<title>The Advnentures of Crunchy and Munchy Squirrel: Field Nuts</title>
<author>Levester Williams</author>
<image>images/portfolio/tn_adventuresOfCrunchyAndMunchySquirrel.jpg</image>
<description>This delightful book for young readers teaches the importance of obedience and always doing what you know is right.</description> I
<weblink >www.crunchyandmunchy.com</weblink>
</book>
<book>
<title>More Dirty Little Secrets</title>
<author> Dr. Claud Anderson and Brant Anderson</author>
<image>images/portfolio/tn_moreDirtyLittleSecrets.jpg</image>
<description>In More Dirty Little Secrets, Dr. Claud Anderson and his son Brant Anderson, piece together little known facts about Black people, thier achievements, influence, involvement, tribulations and present them with wit and humor.</description>
<weblink>http://powernomics.com/</weblink>
</book>
</books>Hi,
In your html page, use the following notation:
<a href="http://{weblink}" title="{weblink}" target="_blank">{weblink}</a>
I hope this helps.
Ben -
How do you set up Paged View with Spry Data Sets
Hope someone can help. I have constructed a Spry data set using a html table and want to use the paged view javascript to limit the amount of rows displayed on one page at a time to 10 then forcing a new page. Have found the java script file in the spry 1.6 download and attached it to the spry assets folder and have followed the instructions found at the Adobe development center http://labs.adobe.com/technologies/spry/articles/pager/index.html with no luck. Have attached files to show what I have done. If someone could look at this and point out my error or suggest a better way I would be grateful. I am not a code warrior so simple instructions would be so helpful. Many thanks in advance.
Here is the code
<!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/SpryData.js" type="text/javascript"></script>
<script src="SpryAssets/SpryHTMLDataSet.js" type="text/javascript"></script>
<script src="SpryAssets/SpryPagedView .js"></script>
<link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
var ds1 = new Spry.Data.HTMLDataSet("table.html", "ds1", {sortOnLoad: "Name", sortOrderOnLoad: "ascending"});
ds1.setColumnType("Phone", "number");
var pv1 = new Spry.Data.PagedView( ds1 ,{pageSize: 10});
//-->
</script>
</head>
<body>
<input type="button" value="First" onclick="pv1.firstPage();" />
<input type="button" value="Prev" onclick="pv1.previousPage();" />
<input type="button" value="Next" onclick="pv1.nextPage();" />
<input type="button" value="Last" onclick="pv1.lastPage();" /
<div class="MasterDetail">
<div spry:region="ds1" class="MasterContainer">
<div class="MasterColumn" spry:repeat="ds1" spry:setrow="ds1" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{Name}</div>
</div>
<div spry:detailregion="ds1" class="DetailContainer">
<div class="DetailColumn">{Name}</div>
<div class="DetailColumn">{Product}</div>
<div class="DetailColumn">{Contact}</div>
<div class="DetailColumn">{Phone}</div>
</div>
<br style="clear:both" />
</div>
<input type="button" value="First" onclick="pv1.firstPage();" />
<input type="button" value="Prev" onclick="pv1.previousPage();" />
<input type="button" value="Next" onclick="pv1.nextPage();" />
<input type="button" value="Last" onclick="pv1.lastPage();" /
</body>
</html>Your region needs to refer to the pageview, not the dataset. Your paged view var is already looking at/pulling in the ds.
I would change the following code:
<div spry:detailregion="ds1" class="DetailContainer">
<div class="DetailColumn">{Name}</div>
<div class="DetailColumn">{Product}</div>
<div class="DetailColumn">{Contact}</div>
<div class="DetailColumn">{Phone}</div>
</div>
to read the following:
<div spry:region="pv1">
<table>
<tr spry:repeat="pv1">
<td>{Name}</td>
<td>{Product}</td>
<td>{Contact}</td>
<td>{Phone}</td>
</tr>
</table>
Regards,
Michael -
Paged view data set not working
Help - I'm new to spry and web design in general, I'm
attempting to create a spry table pulling data from an xml file
which works fine, but the xml file has 70+ records so I want to use
the SpryPagedView.js function, but when I add the code for the
SpryPagedView data set the browser displays the following error in
a red box at the bottom right of the page saying "failed to
retrieve data set (pv1) for spry:repeat".
What am I doing wrong???
The html is as follows: -
<!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="SpryAssets/SpryPagedView.js"
type="text/javascript"></script>
<script type="text/javascript">
var ds1 = new Spry.Data.XMLDataSet("extlist.xml",
"Root/Row"});
var pv1 = new Spry.Data.PagedView(ds1,{ pageSize:20 });
</script>
<link href="style.css" rel="stylesheet" type="text/css"
/>
</head>
<body>
<p>
<input type="button" value="First"
onclick="pv1.firstPage();" />
<input type="button" value="Prev"
onclick="pv1.previousPage();" />
<input type="button" value="Next"
onclick="pv1.nextPage();" />
<input type="button" value="Last"
onclick="pv1.lastPage();" />
</p>
<div spry:region="pv1" spry:repeatchildren="pv1">
<table>
<tr>
<th>First Name</th>
<th>Surname</th>
</tr>
<tr>
<td>{First_Name}</td>
<td>{Surname}</td>
</tr>
</table>
</div>
</body>
</html>
and the XML is laid out as follows: -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Root xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<Row>
<Surname>Blogs</Surname>
<First_Name>Joe</First_Name>
<Ext>2279</Ext>
<DDI>657912</DDI>
</Row>
</Root>Bannana fingers wrote:
> Help - I'm new to spry and web design in general, I'm
attempting to create a
> spry table pulling data from an xml file which works
fine, but the xml file has
> 70+ records so I want to use the SpryPagedView.js
function, but when I add the
> code for the SpryPagedView data set the browser displays
the following error in
> a red box at the bottom right of the page saying "failed
to retrieve data set
> (pv1) for spry:repeat".
> What am I doing wrong???
If the following is your exact code:
> var ds1 = new Spry.Data.XMLDataSet("extlist.xml",
"Root/Row"});
> var pv1 = new Spry.Data.PagedView(ds1,{ pageSize:20 });
Then the issue may be that you have a } after "Root/Row"
which could cause an error in the creation of the ds1 dataset.
HTH
Danilo Celic
|
http://blog.extensioneering.com/
| WebAssist Extensioneer
| Adobe Community Expert -
Hi,
"Report Builder is a report authoring environment for business users who prefer to work in the Microsoft Office environment.
You work with one report at a time. You can modify a published report directly from a report server. You can quickly build a report by adding items from the Report Part Gallery provided by report designers from your organization." - As mentioned
on TechNet.
I wonder how a non-technical business analyst can use Report Builder 3 to create ad-hoc reports/analysis with list of parameters based on other data sets.
Do they need to learn TSQL or how to add and link parameter in Report Builder? then How they can add parameter into a report. Not sure what i am missing from whole idea behind Report builder then?
I have SQL Server 2012 STD and Report Builder 3.0 and want to train non-technical users to create reports as per their need without asking to IT department.
Everything seems simple and working except parameters with list of values e.g. Sales year List, Sales Month List, Gender etc. etc.
So how they can configure parameters based on Other data sets?
Workaround in my mind is to create a report with most of columns and add most frequent parameters based on other data sets and then non-technical user modify that report according to their needs but that way its still restricting users to
a set of defined reports?
I want functionality like "Excel Power view parameters" into report builder which is driven from source data and which is only available Excel 2013 onward which most of people don't have yet.
So how to use Report Builder. Any other thoughts or workaround or guide me the purpose of Report Builder, please let me know.
Many thanks and Kind Regards,
For quick review of new features, try virtual labs: http://msdn.microsoft.com/en-us/aa570323Hi Asam,
If we want to create a parameter depend on another dataset, we can additional create or add the dataset, embedded or shared, that has a query that contains query variables. Then use the option that “Get values from a
query” to get available values. For more details, please see:http://msdn.microsoft.com/en-us/library/dd283107.aspx
http://msdn.microsoft.com/en-us/library/dd220464.aspx
As to the Report Builder features, we can refer to the following articles:http://technet.microsoft.com/en-us/library/hh213578.aspx
http://technet.microsoft.com/en-us/library/hh965699.aspx
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Download using open data set and close data set
can any body please send some sample pgm using open data set and close data set .the data should get downloaded in application server
very simple pgm neededHi Arun,
See the Sample code for BDC using OPEN DATASET.
report ZSDBDCP_PRICING no standard page heading
line-size 255.
include zbdcrecx1.
*--Internal Table To hold condition records data from flat file.
Data: begin of it_pricing occurs 0,
key(4),
f1(4),
f2(4),
f3(2),
f4(18),
f5(16),
end of it_pricing.
*--Internal Table To hold condition records header .
data : begin of it_header occurs 0,
key(4),
f1(4),
f2(4),
f3(2),
end of it_header.
*--Internal Table To hold condition records details .
data : begin of it_details occurs 0,
key(4),
f4(18),
f5(16),
end of it_details.
data : v_sno(2),
v_rows type i,
v_fname(40).
start-of-selection.
refresh : it_pricing,it_header,it_details.
clear : it_pricing,it_header,it_details.
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = 'C:\WINDOWS\Desktop\pricing.txt'
FILETYPE = 'DAT'
TABLES
DATA_TAB = it_pricing
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7.
WRITE : / 'Condition Records ', P_FNAME, ' on ', SY-DATUM.
OPEN DATASET P_FNAME FOR INPUT IN TEXT MODE.
if sy-subrc ne 0.
write : / 'File could not be uploaded.. Check file name.'.
stop.
endif.
CLEAR : it_pricing[], it_pricing.
DO.
READ DATASET P_FNAME INTO V_STR.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
write v_str.
translate v_str using '#/'.
SPLIT V_STR AT ',' INTO it_pricing-key
it_pricing-F1 it_pricing-F2 it_pricing-F3
it_pricing-F4 it_pricing-F5 .
APPEND it_pricing.
CLEAR it_pricing.
ENDDO.
IF it_pricing[] IS INITIAL.
WRITE : / 'No data found to upload'.
STOP.
ENDIF.
loop at it_pricing.
At new key.
read table it_pricing index sy-tabix.
move-corresponding it_pricing to it_header.
append it_header.
clear it_header.
endat.
move-corresponding it_pricing to it_details.
append it_details.
clear it_details.
endloop.
perform open_group.
v_rows = sy-srows - 8.
loop at it_header.
perform bdc_dynpro using 'SAPMV13A' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RV13A-KSCHL'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RV13A-KSCHL'
it_header-f1.
perform bdc_dynpro using 'SAPMV13A' '1004'.
perform bdc_field using 'BDC_CURSOR'
'KONP-KBETR(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KOMG-VKORG'
it_header-f2.
perform bdc_field using 'KOMG-VTWEG'
it_header-f3.
**Table Control
v_sno = 0.
loop at it_details where key eq it_header-key.
v_sno = v_sno + 1.
clear v_fname.
CONCATENATE 'KOMG-MATNR(' V_SNO ')' INTO V_FNAME.
perform bdc_field using v_fname
it_details-f4.
clear v_fname.
CONCATENATE 'KONP-KBETR(' V_SNO ')' INTO V_FNAME.
perform bdc_field using v_fname
it_details-f5.
if v_sno eq v_rows.
v_sno = 0.
perform bdc_dynpro using 'SAPMV13A' '1004'.
perform bdc_field using 'BDC_OKCODE'
'=P+'.
perform bdc_dynpro using 'SAPMV13A' '1004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
endif.
endloop.
*--Save
perform bdc_dynpro using 'SAPMV13A' '1004'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
perform bdc_transaction using 'VK11'.
endloop.
perform close_group.
Hope this resolves your query.
Reward all the helpful answers.
Regards -
How to use open data set in SAP
Hi SAP Gurus,
Could anyone help, how to use open data set in SAP.
I need to upload a file from Application server (ZSAPUSAGEDATA) to internal table (IT_FINAL).
Thanks & Regards,
Krishnau2026Hi Krishna.
These are the steps you need to follow.
tables: specify the table.
data: begin of fs_...
end of fs_ " Structure Field string.
data: t_table like
standard table
of fs_...
data:
w_file TYPE string.
data:
fname(10) VALUE '.\xyz.TXT'.
select-options: if any.
PARAMETERS:
p_file LIKE rlgrap-filename.
w_file = p_file.
select .... statement
OPEN DATASET fname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
*OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
LOOP AT t_... INTO fs_....
write:/ .....
TRANSFER fs_... TO fname.
or
TRANSFER t_... TO fname
ENDLOOP.
CLOSE DATASET fname.
Reward points wisely and if you are benefitted or ask for more detailed explanation if problem not solved.
Regards Harsh. -
Hello ,
I am sending file to print server and i am accounting problems with special characters
In first version of program ( please see the code below )
"OPEN DATASET g_filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT."
The special characters l from German and French alphabet were NOT printed properly , and we had some nonsense results . Other '"Normal "characters like A , B... are printed without errors .
To prevent this error i wrote new line of code for open data set ( below ).
"OPEN DATASET g_filename FOR OUTPUT IN LEGACY TEXT MODE CODE PAGE '4110' IGNORING CONVERSION ERRORS."
This was working only when FTP was NOT used , when FTP was used i had following short dump.
I am working in SAP release 6.0
Please Advice
SHORT DUMP Message :
What happened?
The conversion of texts in code page '4102' to code page '4110' is not
supported here.
The current ABAP program 'SAPLZPRN_AUTO_LBL' had to be interrupted because
incorrect
data would have been created by the conversion.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_CODEPAGE_CONVERTER_INIT', was
not caught in
procedure "Z_TRANSFER_FILE" "(FUNCTION)", nor was it propagated by a RAISING
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
Possibly, one of the codepages '4102' or '4110' - needed for the
conversion - is unknown to the system. Another option is, that a Unicode
codepage was specified for a file in LEGACY MODE, which is not allowed.
Additional parameters for the codepage conversion (as , for example, the
replacement character) might have invalid values. You can find further
information under 'Inernal notes'.
If the problem occurred at opening, reading, or writing of a file, then
the file name was '/te/mm/labels/0488_20091208_051317_EC008119_01_001.dd'.
(Further information about this file: " X ")Hi,
Also check the character set supported by the Printer. Printer configuration should also be checked on SAP side to determine character set and code page using SPAD.
Regards,
Nishad -
Hello all,
Can we specify Encoding in the OPEN DATA SET statement,i found out that we can encode it with UTF-8.
but i want to encode my data in Latin1 ISO-8859-1.
is it possible?
if yes how to do it?
plz help its urgent:(Hello Surmeet
For me this sounds like that your string contains characters from two different encodings, e.g. ISO-8859-1 and ISO-8859-2.
You could try to use option
OPEN DATASET ... IGNORING CONVERSION ERRORS.
Alternatively, you could surround the OPEN DATASET statement with a
TRY.
OPEN DATASET ...
CATCH CX_SY_CONVERSION_CODEPAGE INTO lo_error.
ld_msg = lo_error->get_text( ). " get the message text
ENDTRY.
block and analyse the error message text. Hopefully you will find some hints to solve the problem.
<i>Note</i>: For details refer to the ABAP keyword documentation of OPEN DATASET.
Regards
Uwe
Maybe you are looking for
-
Incomplete Data on report (report does not show all records from the table)
Hello, I have problem with CR XI, I'm running the same report on the same data with simple select all records from the table (no sorting, no grouping, no filters) Sometimes report shows me all records sometimes not. Mostly not all records on the repo
-
Executing a command using Runtime Class
How to execute a command on a differnet machine with different ipaddress using Runtime Class My code is String[] cmd = new String[3]; cmd[0] = "192.1...../c:/WINNT/system32/cmd.exe" ; cmd[1] = "/C" ; cmd[2] = args[0]; Runtime rt = Runtime.getRuntime(
-
Can anybody please suggest me the process of uplifting a one time vendor master to regular vendor master
-
"Replace Existing Songs and Import Them Again" -- Yes or No?
It is too early in the mroning for me to get my head around this challenge. I have a CD of an artist's "Greatest Hits." When I go to import it into my iTunes Library I get this message: I'm sure I have some of these songs on other albums / playlists
-
Hi, I am using Mikrotik router RB750GL and connected one of the ethernet port to the new airport Time Capsule. However, i am unable neither to create a new network nor extending an existing network using MacBook Pro. I have only managed to detect the