Spry XML Grouping
I am using PHP to query my database and then export as XML
for Spry to read.
FYI: Addresses and Defendants are normalized and linked using
unique ID's.
I am trying to group all of serviceDefendants for each
address on the html page. For instance
Address1:
Defendant 1
Defendant 2
Address 2:
Defendant 3
Defendant 2 (One defendant can have multiple addresses)
That is how I am trying to display..however, I cannot figure
out how to get Spry to group. I am using spry:repeatchildren. I'm
thinking the architecture of the XML needs to change, in which case
I'm in the wrong forums...but if anybody does know how the arch.
should look, that would be helpful.
Right now Spry is repeating the address and the defendant
regardless.
NestedXMLDataSet is the way to go. The architecture will
depend largely on the output XML that is generated by your
database. How many levels of data are you dealing with? Is it
something simple like:
<address id="123">
<resident id="001">Defendant 1</resident>
<resident id="002">Defendant 2</resident>
</address>
Or is the database XML output more complex, with more nested
structure:
<addresses>
<address id="123">
<streetnumber>1234</streetnumber>
<streetname>Main Street</streetname>
<city>Anywhere</city>
<state>US</state>
<zipcode>12345</zipcode>
<residents>
<resident id="001">
<firstname>firstName</firstname>
<lastname>lastName</lastname>
</resident>
<resident id="001">
<firstname>firstName</firstname>
<lastname>lastName</lastname>
</resident>
</residents>
</address>
</addresses>
The XML structure is going to determine what the vars are for
using/accessing the data with Spry.Data.nestedXMLDataSet and. to
some extent, also when/where you would need to use repeat vs.
repeatchildren. Can you provide a sample of the XML structure with
dummy values?
-dustin-
Similar Messages
-
Looking for more samples of spry xml data in use
I was curious if there's a resource out there that shows more
samples of using the spry xml data widget. Almost like a template
or sample gallery. Am I dreaming?Look
Here -
Spry xml data set, accessing specific rows
Hello. I've been trying to build a website using Spry XML
Data Sets, and while I've accomplished my goals for now, I don't
think the solution I came up with is the best.
The website consists of several areas that show projects.
Each project has several fields that are to be filled with content
retrieved from the xml files, but the projects are not all exactly
alike and some have specific fields that others don't require.
All the info is available in several languages, so for now
I've created an xml file for each one. An xml file could be like
Code Part1. (Why I can't add several code snippets along the post
baffles me. I mean, I can't, right?)
This dataset, for simplicity purposes, is not dependent on
the language (Code Part2).
And then there are the content areas (Code Part3).
So as you see, each project has its own structure. This makes
using spry:repeat a not very effective method for filling in all
the content. Ideally I should be able to access each row in the
dataset through some sort of value, like id, or one of its
children's values. The ds_RowID depends on the row order, so unless
there's another way to use it, it doesn't solve my problem.
Here's what I've come up with (Code Part4).
This works (in FF3 OSX, at least), although there are some
other problems that might make it necessary to create a spry:region
(or at least use spry:repeat) for each field. Anyway, it sounds
silly and wasteful to go through every row of the dataset everytime
for each of the fields that need to be filled.
My hope is that I'm ignorant of some much better method of
achieving my goals, something more direct and elegant.
Can anyone help me out with this? Thank you very much in
advance.Hi there
You are indeed absolutely correct a spry region should have been shown, my appologise for that, the code is wrapped in a standard spry region.
That being said i have used a work around in the SQL SELECT statement of the xmlExportObj, Recordset to find the information required without having to do any IF, ELSE on the page.
Many thanks for your reply and for pointing out my mistake in how I had presented my question.
My next question is to follow seperately
Regards
Ray -
I can't get formMail.php to recognize my simple Spry Radio Group button
I don't know php at all, but I have a dreamweaver form that sends its information to a document called "formmail.php" and that sends the email to me.
I was able to add text fields by duplicating the text field code in the formmail.php file and it does work, BUT i don't know what code should be on the file to process the radio button information. The radio button group is made up of 2 buttons "Yes" and "No"
This is a abbreviated version of "formmail.php"
<body>
<?php
$name=addslashes($_POST['name']);
$address=addslashes($_POST['address']);
$email=addslashes($_POST['email']);
$radioGroup1=addslashes($_POST['arrangements']);
$comments=addslashes($_POST['message']);
// you can specify which email you want your contact form to be emailed to here
$toemail = "[email protected]";
$subject = "From the VFS website";
$headers = "MIME-Version: 1.0\n"
."From: \"".$name."\" <".$email.">\n"
."Content-type: text/html; charset=iso-8859-1\n";
$body = "Name: ".$name."<br>\n"
."Address: ".$address."<br>\n"
."Email: ".$email."<br>\n"
."Have you made pre-arrangements?: ".$radioGroup1."<br>\n"
."Comments:<br>\n"
.$comments;
if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
echo "That is not a valid email address. Please return to the"
." previous page and try again.";
exit;
mail($toemail, $subject, $body, $headers);
echo "Thanks for submitting your comments";
?>
</body>
</html>
And this is what the code for my Spry Radio Group button is looking like.
<p id="arrangements"><span id="spryradio1">
<label>
<input type="radio" name="RadioGroup1" value="Yes" id="RadioGroup1_0">
Yes </label>
<label>
<input type="radio" name="RadioGroup1" value="No" id="RadioGroup1_1">
No</label>
<br>
<br>
</span></p>
Please help - I'm lost!The post form method gets a variable, by name and sends that value to your processor. You have called $_POST['attachments'] which is the name of the container <p> tag and not of the radio group. So change:
$radioGroup1=addslashes($_POST['arrangements']);
to
$radioGroup1=addslashes($_POST['RadioGroup1']);
That changes the <p> arrangements to the RadioGroup1 which is the name you gave the radio group. -
How to show an entry with specific ID from spry xml dataset?
I have a spry xml dataset, can I show only one record
specified by, say, unique ID?yeah, I first posted this one, then found out that my other
message was replied:) -
Spry xml dataset / IE / Phatfusion Multibox
I try to use spry xml data set with phatfusion multibox.
I use multibox script to open a PHP page with query string
insides spry:region.
It has problem on this application on IE either 6 and 7. But
works fine in Firefox
The requested php page just open in a new window.
I tested to relocate the dummy scripts for multibox outsides
spry:region, the script do works.
How to solve the problem ! Help pleaseHi bsyyu,
First, you might want to validate your markup because I see
that you have several unclosed tags and a missing title tag.
To solve the problem, you'll have to create your multibox
object inside an observer for the region.
Replace your code inside the region:
<script
type="text/javascript">
var ben = {};
window.addEvent('domready', function(){
ben = new MultiBox('mb', {descClassName: 'multiBoxDesc'});
</script>
with this code, put in a script in the page head:
var obs = new Object;
obs.onPostUpdate = function(notifier, data){
var ben = new MultiBox('mb', {descClassName:
'multiBoxDesc'});
Spry.Data.Region.addObserver('events', obs);
--Florin TUDOR -
Error specifying spry xml data source?
I have been using Dreamweaver's Spry XML Data Sets without any trouble until I added the calendar YUI widget. After that I get an error message "no expected entity name for reference (65, 23)". Also nothing shows in the Bindings Panel. I have a Mac OS X, which I find very frustrating after being on a PC for 15 years. I can never find anything I am looking for in the help section.
Here is what I have tried so far that has not worked.
1. Removed the YUI extension
2. Deleted the ******.dat file from the configuration folder in the library user folder
3. Renamed the configuration folder in the library user folder
4. Copied the configuration library folder from my functioning laptop
5. Uninstalled and reinstalled Dreamweaver CS4
I can code everything by hand, but that is very time consuming and makes this software a virtual paper weight.
I would appreciate any advise that could be offered.The preferences files for Mac programs is in your user account folder/Library/Preferences. The files that DW and other applications create end in .plist. These files are creating by Mac OS for many different applications. If you delete one, the OS will re-create another preferences file upon the next opening of the application.
Also the other files that DW saves during a re-install are saved only if you go through the uninstall process and enable that option. This is the same for the Windows version. Sometimes if there are strange errors you can contact Adobe support for general information.
If not and you need to do a re-install I would recommend de-activating first. Then running the adobe CS# clean tool. Just type that phrase into Google and you will find it as the top result for CS3 or CS4.
Adobe - Adobe CS3Clean Script
Adobe - Adobe CS4 Clean Script
Those do more than just remove the program. They will remove all components in the applications folder and shared in the user library and system library. That is the only true way to do a re-install as far as I know. But you will need to de-activate before doing this because it will erase every file and all serial numbers from all Adobe programs with this tool. -
Including HTML tags in Spry XML data sets
How does one add HTML tags to Spry XML data sets so that the displayed items include that markup?
For example, I might want to bold-face words within XML data items. I have tried adding the markup, but instead of seeing, for example:
This is bold face
in the Spry table, I see:
This is <b>bold</b> face
I have tried using CDATA elements in the XML to no avail.Set the data type for the column as per
var ds1 = new Spry.Data.XMLDataSet("myData.xml", "rows/row");
ds1.setColumnType("myColumn", "html");
Gramps -
Spry xml datasets can't recognise images
Been trying all day to load a spry xml dataset with image
information into a table using the wizard. problem is, you can't
tell the wizard that the data in one of the columns is the path to
an image, so it sees it as a string and just sticks the path in the
table. I tried putting it in as html rather than string but really
I am firing into the dark here!
What have I missed?thanks for the reply. I found the issue in the path string,
along with having to edit the html tag directly, which I wasn't
expecting, being used to DW doing it all for me! I found a lot of
the answer here:
http://www.csupomona.edu/~llsoe/42101/css/sprytables.htm
At least it stopped me being scared of html! -
Currently when I try and add a SPRY XML Dataset and hit the Get Schema button I get "Unable to locate or parse the XML Source (-1,-1). I created the XML from the Export recordset to XML tool in the Developer Toolbox. I can't seem to figure out what I am missing. Anyone else having this problem as well. It use to work then I think my system did some update from Adobe and since has stopped working. Any assistance is greatly appreciated. Thanks.
Hello,
The error usually means that the XML source that you choose within Spry XML Data Set interface is not valid.
So you should check the XML source to see if it returns a valid XML.
Regards,
Ionut -
Designing a 'sample time feed' for Spry XML Data Set
Hi!
Often when I call a Spry XML Data Set I find I can't get the
schema. If offers you the option to design a sample time feed but
doesn't give you enough info to be able to even guess how to do
this.
Is the answer in modifying that php line somehow?
Any guidance would be much appreciated!
MikeThe idea for Design Time XML is that you can use a static XML
file instead of a dynamic source, in case you don't have access to
the real data. You can use the Design Time XML to make the query
and design the page.
This gives you access to the data references for designing
the page.
If you are getting schema errors, the numbers that the dialog
shows is the line number and character number (1,1)
You should be able to see the XML directly in the browser. If
you can, then DW should be able to consume it. -
ANN: Adobe Spry User Group launched
Hello,
I'm honored to announce the launch of the first Adobe Spry User Group, Spry-it. In all the years I have worked with Spry both on a personal as well as on a enterprise level I came to realize that there really little blogging, articles, documentation and information written by the community for the community. There are a few youtube video's here and there. But its all scattered over the place. Spry-it aims to solve that by attempting to become a center point of community driven content, providing users with new ways to receive information and learn about Spry from RSS feeds to Adobe Wave notifications till e-mail newsletters. Not only will we attempt to bundle and organise content, we will also be providing you with content and Spry related services.
A few highlights that we attempt to provide:
A new searchable, API system, that actually contains all the information about the Frameworks methods. Not only the once the Spry team has documented. This will allow users to find more advance, and sometimes more powerful methods that will make it easier to create or polish their applications.
Articles, this will range from skinning a various of widgets. Till creating your own widgets. But also explaining best practices and performance tricks they can apply to improve Spry it self.
A desktop application that will wrap all the information for the users, providing offline documentation that will automatically update it self once connection with internet has been created.
New demo's, these will push Spry to its limits providing you insights to advance techniques with little code.
Working with new platforms, think about Iphone, Adobe AIR, Aptana Jaxer, Palm Pre.
And much more.
So sign-up, its FREE And you just use your Adobe Account to log in. http://groups.adobe.com/groups/f1621de53b/summary
If you have idea's for your self, I'm still searching for a co-manager. The only requirement is passion.vw2ureg wrote:
Is bumping allowed in this forum?
I cannot find anything in the guidelines on the subject.
Ben
Personally I don't mind bumping a few topics here and there. For example if something requires attention. But just posting the word "bump" will be considered spam. The bump content needs to add some sort of value to the topic.
As for Spry-it.com progress. We are currently running on our staging server, connecting the nuts and bolts with the screws .
The Adobe groups platform is getting updated and I hope to get something running on Spry-it.com by that. -
Can a Spry Radio Group be laid out horizontally? (CS6)
I have been searching all over and I cannot figure out how to get a spry radio group to lay out horizontally on my page.
I am trying to create a survey with 9 radio buttons and the page will go on forever and just not look right with 9 inline options for each question.
I want it to look like below.
Can anybody assist?
Thank you,
KimberlyIf you look at your code starting on line 123, you have references to several files inside a SpryAssets folder. Manually upload your SpryAssets folder from your Files Panel (F8).
<link href="/www/SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="/www/SpryAssets/SpryValidationRadio.css" rel="stylesheet" type="text/css" />
<script src="/www/SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="/www/SpryAssets/SpryValidationRadio.js" type="text/javascript"></script>
Nancy O. -
Spry Radio Group, sum of values
I have done this in actionScript, but am wondering if it is
possible using Spry radio groups.
I have an html page with 3 radio groups. Each unique radio
group has 3 available selections, each with respective numeric
values. I would like to be able to make a selection of any of the
radio group options, and cause a calculable field to display the
sum of the 3 radio group values.
To see the exact example of this, and how it looks in Flash,
go here:
Sample
of what I want, but in Flash
For my current purposes, I could just as easily use the
existing calculator that I've already created in Flash. But I want
to learn more about the Spry features in CS3, and this seems like a
good launching point.
If you can recommend a tutorial, that would be best.
Thank you!
rSbisa wrote:
> I have done this in actionScript, but am wondering if it
is possible using Spry
> radio groups.
>
> I have an html page with 3 radio groups. Each unique
radio group has 3
> available selections, each with respective numeric
values. I would like to be
> able to make a selection of any of the radio group
options, and cause a
> calculable field to display the sum of the 3 radio group
values.
>
> To see the exact example of this, and how it looks in
Flash, go here:
>
http://www.viewablebenefits.com/radnet/flash/calc.html
>
> For my current purposes, I could just as easily use the
existing calculator
> that I've already created in Flash. But I want to learn
more about the Spry
> features in CS3, and this seems like a good launching
point.
>
> If you can recommend a tutorial, that would be best.
>
> Thank you!
>
This can be done easily enough with client side js, no need
for Spry.
Mick -
Spry XML Dataset Video Gallery Question
Hi there,
We are trying to create a video gallery using a Spry XML Dataset.
It's currently working in FF and Safari, but not working in IE6-7 or Opera.
Here is a link... http://www.rightsidedesign.com.au/test/tv.html
IE seems to display the content for a second, but it doesn't load the videos or text, but then it disappears.
The elements being fed via the dataset are the video, video description (at bottom right of video) and thumbnails
Can anyone give us a hint as to what we might be doing wrong??
We followed the tutorial at... http://www.coremediadesign.co.uk/web_design_tutorials/dreamweaver_tutorials/spry_image_gal lery_adobe.html
and replaced the image with an FLV player.
Thanks for your help in advance!Hi there,
We are trying to create a video gallery using a Spry XML Dataset.
It's currently working in FF and Safari, but not working in IE6-7 or Opera.
Here is a link... http://www.rightsidedesign.com.au/test/tv.html
IE seems to display the content for a second, but it doesn't load the videos or text, but then it disappears.
The elements being fed via the dataset are the video, video description (at bottom right of video) and thumbnails
Can anyone give us a hint as to what we might be doing wrong??
We followed the tutorial at... http://www.coremediadesign.co.uk/web_design_tutorials/dreamweaver_tutorials/spry_image_gal lery_adobe.html
and replaced the image with an FLV player.
Thanks for your help in advance!
Maybe you are looking for
-
Hello. Someone know's where i can find tutorials to learn to make pdf templates? i have this issue because i need to fill some governmental reports and instead of rtf template its better for me programming in pdf! essencially i need to know how to cr
-
Problem in resizing bing map.
I have given 100% width to the div in which I am loading bing map. But map convert it into pixel and I am unable to shrink the map when get resize.
-
Want to show message on JOptionPane in Gujarati or any language other than
Hello All, I am developing one swing application and in that I need to show some message on JOptionPane in Gujarati Labguage. Now I want to know whether it is possible to show messages on JOptionPane in other than english language? if so, please let
-
Hi. I use Labview 7.1.I am acquiring some data using the DAQ assistant and save it as as lvm file using the Write LVM express vi.Both these blocks are placed inside a while loop which runs continously until user presses the stop data. Now the questio
-
What is this new 'Archive' folder?
Hello, Can anyone explain what the new 'Archive' folder is and how it works? Many thanks, JC