Index: Dev/branches/rest-dojo-ui/client/rft/pages/questions.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/pages/questions.html	(revision 274)
+++ Dev/branches/rest-dojo-ui/client/rft/pages/questions.html	(revision 275)
@@ -4,5 +4,5 @@
     <div data-dojo-type="dijit.layout.AccordionContainer" data-dojo-props="doLayout: false" style="width: 100%; height: 100%;" data-rft-attach-point="accordion">
     </div>
-    <div data-dojo-type="dijit.Dialog" title="Question" data-rft-attach-point="questionDialog" style="width: 400px; height: 300px;">
+    <div data-dojo-type="dijit.Dialog" title="Question" data-rft-attach-point="questionDialog">
         <form data-dojo-type="dijit.form.Form" data-rft-attach-point="questionForm" data-rft-attach-event="onSubmit:onSaveQuestion">
             <fieldset>
Index: Dev/branches/rest-dojo-ui/client/rft/pages/questions.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/pages/questions.js	(revision 274)
+++ Dev/branches/rest-dojo-ui/client/rft/pages/questions.js	(revision 275)
@@ -1,6 +1,6 @@
 define(['dojo/_base/declare','dojo/_base/lang','dojo/_base/array','dojo/_base/event',
     'dojo/_base/Deferred','dojo/store/JsonRest','dijit/layout/ContentPane',
-    'rft/ui/_Page','rft/ui/QuestionWidget'],
-    function(declare,lang,array,event,Deferred,JsonRest,ContentPane,_Page,QuestionWidget) {
+    'rft/ui/_Page','rft/ui/LineWithActionsWidget'],
+    function(declare,lang,array,event,Deferred,JsonRest,ContentPane,_Page,LineWithActionsWidget) {
         return declare('rft.pages.questions',[_Page],{
             constructor: function() {
@@ -26,5 +26,6 @@
                 if ( !categoryContainer ) {
                     var ac = new ContentPane({
-                        title:category
+                        title:category,
+                        doLayout: false
                     });
                     categoryContainer = this.containers[category] = {
@@ -40,6 +41,10 @@
                 var question = this.questions[uid];
                 if ( !question ) {
-                    var qw = new QuestionWidget({
-                        question: q
+                    var qw = new LineWithActionsWidget({
+                        title: q.title,
+                        userObject: q,
+                        actions: {
+                            'Edit': lang.hitch(this,'_editQuestion')
+                        }
                     });
                     qw.startup();
@@ -48,16 +53,24 @@
                         widget: qw
                     }
+                } else {
+                    // update info
+                    question.question = q;
+                    question.widget.title = q.title;
+                    question.widget.userObject = q;
+                    question.widget.refresh();
                 }
                 var container = this._getContainerForQuestion(q);
                 question.widget.placeAt(container.containerNode);
-                container.resize();
             },
             onNewQuestion: function() {
                 Deferred.when( this._store.add({}) )
                 .then(lang.hitch(this,function(question){
-                    this.questionForm.reset();
-                    this.questionForm.set('value',question);
-                    this.questionDialog.show();
+                    this._editQuestion(question);
                 }));
+            },
+            _editQuestion: function(question) {
+                this.questionForm.reset();
+                this.questionForm.set('value',question);
+                this.questionDialog.show();
             },
             onSaveQuestion: function(evt) {
Index: Dev/branches/rest-dojo-ui/client/rft/run.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/run.js	(revision 274)
+++ Dev/branches/rest-dojo-ui/client/rft/run.js	(revision 275)
@@ -16,5 +16,5 @@
     'rft/ui/MenuBarLink',
     'rft/ui/MenuLink',
-    'rft/ui/QuestionWidget',
+    'rft/ui/LineWithActionsWidget',
     'rft/pages/questions' // could this be done dynamically?
 ]);
Index: Dev/branches/rest-dojo-ui/client/rft/ui/LineWithActionsWidget.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/LineWithActionsWidget.html	(revision 275)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/LineWithActionsWidget.html	(revision 275)
@@ -0,0 +1,4 @@
+<div>
+    <span data-dojo-attach-point="actionBar"></span>
+    <span data-dojo-attach-point="titleNode"></span>
+</div>
Index: Dev/branches/rest-dojo-ui/client/rft/ui/LineWithActionsWidget.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/LineWithActionsWidget.js	(revision 275)
+++ Dev/branches/rest-dojo-ui/client/rft/ui/LineWithActionsWidget.js	(revision 275)
@@ -0,0 +1,27 @@
+define(['dojo/_base/declare','dojo/_base/lang','dijit/form/Button','dijit/_WidgetBase','dijit/_TemplatedMixin','dijit/_WidgetsInTemplateMixin','dojo/text!rft/ui/LineWithActionsWidget.html'],
+    function(declare,lang,Button,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,templateString){
+        return declare('rft.ui.LineWithActionsWidget',[_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin],{
+            templateString: templateString,
+            title: '',
+            userObject: null,
+            actions: {},
+            startup: function() {
+                this.inherited(arguments);
+                this._setupActions();
+                this.refresh();
+            },
+            _setupActions: function() {
+                for (var action in this.actions) {
+                    new Button({
+                        label: action,
+                        onClick: lang.hitch(this,function(){
+                            this.actions[action](this.userObject);
+                        })
+                    }).placeAt(this.actionBar);
+                }
+            },
+            refresh: function() {
+                this.titleNode.innerHTML = this.title;
+            }
+        });
+    });
Index: Dev/branches/rest-dojo-ui/client/rft/ui/QuestionWidget.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/QuestionWidget.html	(revision 274)
+++ 	(revision )
@@ -1,8 +1,0 @@
-<div>
-    <h2>Question</h2>
-    <table>
-        <tr><td>Code</td><td data-dojo-attach-point="codeField"></td></tr>
-        <tr><td>Title</td><td data-dojo-attach-point="titleField"></td></tr>
-        <tr><td>Description</td><td data-dojo-attach-point="descriptionField"></td></tr>
-    </table>
-</div>
Index: Dev/branches/rest-dojo-ui/client/rft/ui/QuestionWidget.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/ui/QuestionWidget.js	(revision 274)
+++ 	(revision )
@@ -1,14 +1,0 @@
-define(['dojo/_base/declare','dijit/_WidgetBase','dijit/_TemplatedMixin','dijit/_WidgetsInTemplateMixin','dojo/text!rft/ui/QuestionWidget.html'],
-    function(declare,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,templateString){
-        return declare('rft.ui.QuestionWidget',[_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin],{
-            templateString: templateString,
-            question: null,
-            startup: function() {
-                if ( this.question ) {
-                    this.codeField.innerHTML = this.question.code;
-                    this.titleField.innerHTML = this.question.title;
-                    this.descriptionField.innerHTML = this.question.description;
-                }
-            }
-        });
-    });
Index: Dev/branches/rest-dojo-ui/server/api.php
===================================================================
--- Dev/branches/rest-dojo-ui/server/api.php	(revision 274)
+++ Dev/branches/rest-dojo-ui/server/api.php	(revision 275)
@@ -142,4 +142,8 @@
     }
 
+    function put($request) {
+        return $this->post($request);
+    }
+    
 }
 
@@ -171,5 +175,5 @@
     }
 
-    function put($request) {
+    function post($request) {
         $response = new Response($request);
         restore_session($response);
@@ -204,4 +208,8 @@
         $response->body = $object;
         return $response;
+    }
+
+    function put($request) {
+        return $this->post($request);
     }
 
