Accessing Multiple rows of the same name.
If I have an XML Document which looks like this:
<content nr="1">
<text> Text of the first Content item </text>
<othertext> blahblah </othertext>
<attribute1 foo="bar"/>
</content>
<content nr="2">
<text> Text of the second Content item </text>
<othertext> blahblah </othertext>
<attribute1 foo="bar"/>
</content>
<content nr="3">
<text> Text of the third Content item </text>
<othertext> blahblah </othertext>
<attribute1 foo="bar"/>
</content>
And I want to create a website that automatically displays the contents of <text></text> of all the <content> items, how do I do that? (I dont want to do it manually because it should work independent of how many content items there are)
If I bind
var testData= new Spry.Data.XMLDataSet("testing.xml", "content/text");
and then use
<div spry:region="testData">{testData::text}</div>
I just get the Content of the first item. ("Text of the first Content item").
It seems to be pretty easy to do it right, but I just dont get it.
EDIT: What I forgot: merely using something such as "spry:repeat" wont be enough, because I need to access only a number of these content items (I plan on displaying them over several pages, so I'l just display a few, save the others for the next page)
IMHO, the easiest way is to differentiate the records by adding an identifyer to the record e.g.
<content nr="1">
<text> Text of the first Content item </text>
<page>1</page>
<othertext> blahblah </othertext>
<attribute1 foo="bar"/>
</content>
<content nr="2">
<text> Text of the second Content item </text>
<page>1</page>
<othertext> blahblah </othertext>
<attribute1 foo="bar"/>
</content>
<content nr="3">
<text> Text of the third Content item </text>
<page>2</page>
<othertext> blahblah </othertext>
<attribute1 foo="bar"/>
</content>
Then use Spry:repeat with a Spry:test to obtain the records that you want to use.
Another way is to Spry:test the required content numbers
I hope this helps.
Ben
Similar Messages
-
Label Printing Using Address Book - How can I Print multiple labels of the same name?
Label Printing Using Address Book - How can I Print multiple labels of the same name?
I used to be able to print multiple copies of the same picture on one page using iphoto. There was a customise button when you went through to print and it was there somewhere. I can't see it anymore - maybe since an upgrade.
It's gone. But as a work-around, duplicate your photo (⌘D) to create as many versions as you want copies and select all at once. Then use the "Custom" print layout and set the photo size you want.
After printing, trash the added versions. -
Accessing multiple portals at the same time?
Is it possible to access multiple portals at the same time?
For example, what I want to achieve is different properties (layout,
portlets, look & feel) for different groups of users accessing the same
portal. The Associated Groups part on the Portal admin page is not
fulfilling our requirements. So we decided to have different portals for
different groups of users, all working through one portal, and accessing
their custom portals. Is this achievable?
What we are thinking is: put the common functionality in the repository
portal directory, and the custom portlets/jsps in the group-specific portal
directories. This way we can customize portal behavior for different groups
of users. Is this achievable?
Thanks.
AmitYou have to user respective DRILL commands present in WAD to configure the drill operations on multiple characteristics...
-
How can i select some row from multiple row in the same group of data
I want to select some row from multiple row in the same group of data.
ColumnA
Column B
1 OK
1 NG
2 NG
2 NG
3 OK
3 OK
I want the row of group of
ColumnA if ColumnB contain even 'NG'
row , select only one row which Column B = 'NG'
the result i want =
ColumnA Column B
1 NG
2 NG
3 OK
Thank youThat's some awful explanation, but I think this is what you were driving at:
DECLARE @forumTable TABLE (a INT, b CHAR(2))
INSERT INTO @forumTable (a, b)
VALUES
(1, 'OK'),(1, 'NG'),
(2, 'NG'),(2, 'NG'),
(3, 'OK'),(3, 'OK')
SELECT f.a, MIN(COALESCE(f2.b,f.b)) AS b
FROM @forumTable f
LEFT OUTER JOIN @forumTable f2
ON f.a = f2.a
AND f.b <> f2.b
GROUP BY f.a -
Revision: 949
Author: [email protected]
Date: 2008-03-27 07:12:59 -0700 (Thu, 27 Mar 2008)
Log Message:
Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name, it causes a ClassCastException in the server
QA: Yes - try again with legacy-collection true and false.
Doc: No
Checkintests: Pass
Details: Another try in fixing this bug. When legacy-collection is false, Actionscript Array on the client becomes Java Array on the server and my fix yesterday assumed this case. However, when legacy-collection is true, Actionscript Array becomes Java ArrayList on the server. So added code to handle this case.
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-96
Modified Paths:
blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/proxy/RequestF ilter.javaHi all!
Just to post the solution to this if anyone ever runs accross this thread...
For some reason i had it bad the first time, don't have time right now to see why but here is what worked for me:
HashMap primaryFile = new HashMap();
primaryFile.put("fileContent", bFile);
primaryFile.put("fileName", uploadedFile.getFilename());
operationBinding.getParamsMap().put("primaryFile", primaryFile);
HashMap customDocMetadata = new HashMap();
HashMap [] properties = new HashMap[1];
HashMap customMetadataPropertyRoom = new HashMap();
customMetadataPropertyRoom.put("name", "xRoom");
customMetadataPropertyRoom.put("value", "SOME ROOM");
properties[0] = customMetadataPropertyRoom;
customDocMetadata.put("property", properties);
operationBinding.getParamsMap().put("CustomDocMetaData", customDocMetadata);
Basically an unbounded wsdl type is an array of objects (HashMaps), makes sense, i thought i had it like this before, must have messed up somewhere...
Good luck all! -
Revision: 931
Author: [email protected]
Date: 2008-03-26 11:31:01 -0700 (Wed, 26 Mar 2008)
Log Message:
Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name, it causes a ClassCastException in the server
QA: Yes - we need automated tests for this basic case.
Doc: No
Checkintests: Pass
Details: RequestFilter was not handling multiple headers with the same name properly.
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-96
Modified Paths:
blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/proxy/RequestF ilter.javaHi all!
Just to post the solution to this if anyone ever runs accross this thread...
For some reason i had it bad the first time, don't have time right now to see why but here is what worked for me:
HashMap primaryFile = new HashMap();
primaryFile.put("fileContent", bFile);
primaryFile.put("fileName", uploadedFile.getFilename());
operationBinding.getParamsMap().put("primaryFile", primaryFile);
HashMap customDocMetadata = new HashMap();
HashMap [] properties = new HashMap[1];
HashMap customMetadataPropertyRoom = new HashMap();
customMetadataPropertyRoom.put("name", "xRoom");
customMetadataPropertyRoom.put("value", "SOME ROOM");
properties[0] = customMetadataPropertyRoom;
customDocMetadata.put("property", properties);
operationBinding.getParamsMap().put("CustomDocMetaData", customDocMetadata);
Basically an unbounded wsdl type is an array of objects (HashMaps), makes sense, i thought i had it like this before, must have messed up somewhere...
Good luck all! -
Revision: 889
Author: [email protected]
Date: 2008-03-21 13:08:05 -0700 (Fri, 21 Mar 2008)
Log Message:
Add test case for BLZ-82 where HttpService should return multiple headers with the same name.
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-82
Added Paths:
blazeds/trunk/qa/apps/qa-regress/remote/MultipleHeadersTest.jsp
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/proxyService/httpservice/MultiHe aderTest.mxmlHi again,
this may be old news to some people, but I just realized we can have the desired benefits I originally listed (encapsulation, reuse, maintainability, security) TODAY by using pipelined functions and using the table() function in Apex report region queries.
So the report query basically becomes, for example (if get_employees is a pipelined function)
select * from table(my_package.get_employees(:p1_deptno))
The only downside compared to a (weakly typed) sys_refcursor is that you have to define the type you are returning in your package spec (or as an SQL type). So it's a bit more coding, but it's still worth it for the other benefits it provides.
I like Apex even better now! :-)
- Morten -
Is it possible to search for multiple folders with the same name and...
Is it possible to search for multiple folders with the same name and then select them all and change the permissions on just those folders .i.e. Search for the budget folders in all client folders and lock them down to just the project managers. Without having to go to each folder and apply the permissions.
user11919409 wrote:
Is it possible to create a Clone database with the same name of source db using RMAN ...
yes
>
DB version is 11.2.0.2
Is it possible to clone a 11.2.0.2 database to 11.2.0.3 home location directly on a new server . If it starts in a upgrade mode , it is ok ....yes
Handle: user11919409
Status Level: Newbie (10)
Registered: Dec 7, 2009
Total Posts: 102
Total Questions: 28 (22 unresolved)
why do you waste time here when you rarely get any answers to your questions? -
XOQ-01950: Cube contains multiple BuildSpecifications with the same name.
Hi All ,
While executing the Maintain Cube option it is throwing below issue : Any Clue ?
XOQ-01950: The AWCubeOrganization for cube "NN_OLAP_POC.MARKET_SALES_CUBE" contains multiple BuildSpecifications with the same name.
Thanks,
DxPThis error should only show up when you create a cube (by importing XML), not when you maintain it. So I will assume that this is what you mean.
If you import XML that refers to an OLAP object that already exists, then the new definition overrides the old one. The only exception to this rule is the BuildSpecification object. This kind of object is named, but it does not follow these conventions (for messy implementation reasons). If you import XML that has a BuildSpecificaiton with the same name as one that already exists, then you will trigger the error you see. Here is an example of the relevant XML.
<BuildSpecifications>
<![CDATA[BUILD SPEC LOAD_AND_AGGREGATE
LOAD NO SYNCH,
SOLVE
) ]]>
</BuildSpecifications>The workaround is to delete this section from the XML before importing it. -
Can iTunes sync multiple songs with the same name?
My iTunes library has multiple songs with the same name (but they point to different files on the filesystem).
Curiously when iTunes syncs to my iPhone it will only ever sync two of the files, even if more exists. I suspect what is happening is described below, but I have no way of verifying it:
Let's assume I have 5 songs named IdenticalName, on the filesystem these are named IdenticalName.mp3, IdenticalName 1.mp3, IdenticalName 2.mp3, and so on.
I suspect iTunes is syncing the filename without a number postfix, and the file with the "1" postfix and not continuing with the rest of the files.
Has anyone seen similar behaviour? Did you find a workaround (other than renaming your tracks)?can you manually discover the new instances on the new server?
Then just make sure the name that appears in Grid Control is different.
e.g. prod.world is on server A and B. When you discover in Grid control, you can make it prod_B and you will see the latter without any problem. -
Writing to multiple tags with the same name
Hi,
I am writing to multiple tags with the same name but in different groups. I have noticed only the tag from the first group gets updated. How can I write to a tag in a specific group in this scenario?
Regards,
Chanti.Heres what I found.
When I tried "http://<server>:<port>/XMII/Illuminator?Server=<Name of the TAG dataServer>&Mode=CurrentWrite&TagName=<Group>.<TagName>", the outcome was "Message
Could not add "<Group>.<TagName>" to the response list.
Message
No tags selected."
When I tried "http://<server>:<port>/XMII/Illuminator?Server=<Name of the TAG dataServer>&Mode=CurrentWrite&TagName=<TagName>", it seemed like it worked fine.
Any thoughts? -
Import xml data in Access when multiple rows use the same fieldname
HI.
First of all sorry for my english :-) I have a LiveCycle Designer ES form with multiple rows that I send via e-mail as XML data.
example:
Row 1
Firstname: John Lastname: Dow
Row 2
Firstname: Steve Lastname: Austin
The exported XML is OK but when I want to import it into my Access database, only one row is imported. I pretty sure that the problem comes from the fact that may exported XML use the same fieldname (what is important if I want to import data in the correct Access field) but I don't know what to do to be able to import all the rows of the same Form.
Any idea?
Thanks a lot
FredericHi Viktor,
In case of order recognition rules you should increase the relevancy in the newer version of the cartridge so appropriate ORR will be triggered. In other xqueries, you can try using new namespace as a model variable for each and every version of the cartridge
Regards,
JP -
Multiple documents with the same Name
We had a problem reported where an xquery to the xml db returned multiple records. Upon reading the full db (getAllDocuments) and printing each document's name we found out that all the documents had the same the same Name!!!
We are using 2.3.10
This is very disturbing as we depend on the uniqueness of the Name heavily.
Any ideas on how this could happen?
What information would you need?
Code used to dump data
Message was edited by:
user626230Hi,
Are you using all of the patches to 2.3.10? You should be, or better yet, use 2.3.11. There was a bug that could be involved that is fixed in 2.3.11. Others have seen duplicate documents but the root cause has never been 100% identified.
Be sure that you are aborting your deadlocked transactions properly.
Is this issue reliably reproducible in any way? If so, I'd be very interested in a test case or working with you to figure out what sequence of events causes it.
Regards,
George -
Connect to one wireless network when multiple networks with the same name
Hi all,
I'm at a location where there are two networks with the name (e.g.) "wireless". One uses WEP and one uses WPA. The WEP network is weaker than the WPA network, so my Mac tries to connect to the WPA network, even though I have manually setup the wireless network with WEP security (after trying to connect it asks for a WPA password). Is there a way that I can connect to a wireless network by MAC Address, or some way for me to tell the Macbook to ignore the WPA network? The problem is that the SSID is the same, it seems.
Thanks,
NateThe person (the landlord) isn't tech-savvy at all.
That is clearly obvious as
1. They would not be using WEP
2. They would setup a different SSID
WEP is not secure and can be cracked in minutes using tools readily available on the internet. If a hacker gain access to that network they could run other tools and hijack the dns and then you could be visiting sites on your mac that are completely bogus but look real.
Also it is common trick that hackers use is to setup an access point nearby with the sane SSID to capture details from users that join their network thinking they have joined their own network. Again the hacker can hijack the dns and monitor all your browsing and capture details.
The fact that someone has setup an SSID nearby with the same name would make me very suspicious.
I would treat your landlord's network as an untrusted network same as when your using a public wifi like coffebucks. -
Issue with multiple Albums with the same name. (i.e. Greatest Hits)
I have multiple albums all with the same name (i.e. Greatest Hits). iTunes mixes all of the albums as one. All of the track 1s together, all track 2s together .... Is there a way for iTunes to recognize that there is more than 1 album with the same name? and to keep each album seperate.
ThanksYou need to let iTunes know that they are different albums. The trick I use that work fine is to simply add the artist name of which it is the Greatest Hits in the "Album Artist".
That way, iTunes will keep your album together.
Maybe you are looking for
-
Why does ipod copy over 1500 tunes
An then when i come back hours later i get a message "ipod cannot be updated.The disk could not be read from or written to" Help or advise please Thanks
-
My hard drive crashed on my PC - how do I restore from iPhone back into iTunes?
My hard drive crashed on my PC - how do I get the 24 GB of music off my iPhone and back into iTunes?
-
Setting remote credentials in services-config.xml
Webservice and remoting calls can be restricted access to CFC's using usernames and passwords. And to 'authenticate', I'm having trouble setting the <remote-username> and <remote-password> elements in the services-config.xml A remoting fault event is
-
i have a double layer memorex dvd burner that i bought for another computer a few years ago and now want to use it with my powerbook g4 but dont have the installation software from when i first got it. i have emailed memorex multiple times asking the
-
Some Upgrade Suggestions for the iPhone
I just got 8GB iPhone and am loving it, especially the web browsing capability. My experience would be even better if the iPhone had the following features: 1) a search function equivalent to spotlight in the iMac's (the lack of it seems a major over