This project is read-only.

Redrawing a shape

Topics: Core, General, Writing modules
Jun 4, 2012 at 10:11 AM

Hi Guys,

I have a widget, that I need to update with data, when a event happens.

but I'm not sure, how to redraw the shape from the controller, with the new value. 

I have tried the following :

dynamic shape = _shapeFactory.DrainOnResourcesGrpPersWidget();           

shape.graphdata = data;           

shape.TimePeriodValue = dbs.TimePeriodValue;           

return new ShapeResult(this, shape);

// this is the same  :-(  return new ShapePartialResult(this, shape); 


And what happens is, that orchard sends us a alert message with the following header "Message from webpage" and in the text it is showing the shape in html


and the shape is not refreshed - can anyone tell me, what I'm doing wrong ?!?!



Jun 4, 2012 at 7:40 PM

I'm sorry but I have no idea what you are trying to do, what you are expecting from that code, what TimePeriodValue is supposed to do or what dbs is. There is not nearly enough context here to provide a useful answer.

Jun 4, 2012 at 11:25 PM

Are you trying to make the Widget refresh Async?