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:blan...@umich.edu] Sent: Tuesday, April 24, 2012 2:02 PM To: dspace-tech@lists.sourceforge.net 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 DSpace-tech@lists.sourceforge.net 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 DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech