Hi Jose,
It's actually rather difficult to determine what could be going on
without more context information (or more code).
One oddity I notice is that in your below sitemap code you are calling
<map:transform type="RequestItem"/> *twice*. The first time with no
parameters, and then the second time with a set of parameters.
It's possible that what you are seeing is that first call is happening
and no parameters are passed along.
If this doesn't help you resolve the issues, it might be helpful if you
can provide us with some additional context, e.g.:
1. Can you describe what it is you are trying to do in DSpace XMLUI? Is
it a simple test or something more?
2. What code in XMLUI are you emulating? It could be helpful to
understand what you are basing your code on.
3. You may even want to send the full files (zipped) or post them
somewhere publicly (e.g. GitHub or public SVN). For example, it is
difficult for us to guess what you may be doing in your "RequestItem"
transformer, etc.
- Tim
On 4/25/2012 10:58 AM, Blanco, Jose wrote:
> I've made a couple of changes trying to emulate other files that work the way
> I want this to work, and I'm still stuck.
>
> Question, I have
>
> cocoon.sendPageAndWait("request-item/main",{"handle":handle,"itemId":itemId,"bitstreamId":bitstreamId});
>
> and I have:
>
> <map:match pattern="request-item/main">
> <map:transform type="RequestItem"/>
> <map:transform type="RequestItem">
> <map:parameter name="handle"
> value="{flow-attribute:handle}"/>
> <map:parameter name="itemId"
> value="{flow-attribute:itemdId}"/>
> <map:parameter name="bitstreamId"
> value="{flow-attribute:bitstreamId}"/>
> </map:transform>
>
> </map:match>
>
> But when I get to ehte RequestItem there is nothing in itemId. I'm either
> not really passing it, or I have some setup error. Any ideas?
>
> -Jose
>
> -----Original Message-----
> From: Blanco, Jose [mailto:[email protected]]
> Sent: Tuesday, April 24, 2012 2:02 PM
> To: [email protected]
> Subject: [Dspace-tech] sendPageAndWait not moving on.
>
> I'm stuck. I created a page where the user enters some data, I then want to
> process the data based on button that is pressed. To do this I have created
> a js file that contains this function:
>
> function startRequestItem()
> {
> var handle = cocoon.request.get("handle");
> var itemId = cocoon.request.get("itemId");
> var bitstreamId = cocoon.request.get("bitstreamId");
> var result;
>
> do
> {
>
>
> sendPageAndWait("request-item/main",{"handle":handle,"itemId":itemId,"bitstreamId":bitstreamId},result);
>
> if (cocoon.request.get("submit_send_request_item"))
> {
> var item = Item.find(getDSContext(),itemId);
>
> cocoon.redirectTo(cocoon.request.getContextPath()+"/handle/"+item.getHandle(),true);
> getDSContext().complete();
> item = null;
> cocoon.exit();
> }
> if (cocoon.request.get("submit_cancel_request_item"))
> {
> var item = Item.find(getDSContext(),itemId);
>
> cocoon.redirectTo(cocoon.request.getContextPath()+"/handle/"+item.getHandle(),true);
> getDSContext().complete();
> item = null;
> cocoon.exit();
> }
> }
> while (true);
>
> }
>
> But what I'm seeing is that the request-item/main is processed but when a
> button is hit you don't return from the sendPageAndWait function. The same
> page is just refreshed.
>
> Here is what I have in the sitemap:
>
> <map:match pattern="request-item">
> <map:match type="request" pattern="artifact-continue">
> <map:call continuation="{1}"/>
> </map:match>
> <map:call function="startRequestItem"/>
> </map:match>
>
>
> AND
>
>
> <!-- requested item -->
> <map:match pattern="request-item/main">
> <map:transform type="RequestItem"/>
> <map:serialize type="xml"/>
> </map:match>
>
>
> I hope this is enough info to get some suggestions.
>
> Thank you! Jose
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and threat
> landscape has changed and how IT managers can respond. Discussions will
> include endpoint security, mobile security and the latest in malware threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech