On 6/17/10 1:19 AM, MartinWittemann wrote: > Hello Greg, > This is a behavior I didn't see before. Can you reproduce it all the time? > Can you perhaps supply a small code snippet for me to reproduce it? If it > would run in playground, it would be perfect. It seems like a bug which we > should fix. > Regards, > Martin > Hi Martin,
I can reproduce it all the time, yes. I am about to begin a summer away from any form of internet, so just in case I don't have time here is the code in question: folder is an object of class qx.ui.tree.TreeFolder, and qooxdoo.widgets.HtmlArea is my customized htmlarea based on the demobrowser's implementation (source here: http://paste2.org/p/881894 WARNING: it's ugly, this was the first attempt at a widget, and so I didn't do it the proper way). displayEditForm : function(folder) { var win; win = new qx.ui.window.Window("Edit " + folder.getModel().getTitle()); var container = new qx.ui.container.Composite(new qx.ui.layout.VBox(10)); var scroll = new qx.ui.container.Scroll().set({ width: 800, height: 400 }); scroll.add(container); container.add(folder.getModel().getForm(win)); win.setModal(true); win.setShowMaximize(true); win.setShowMinimize(false); win.setLayout(new qx.ui.layout.Grow()); win.add(scroll); win.open(); }, getForm : function (window) { var form = new qx.ui.form.Form(); var formcontroller = new qx.data.controller.Form(this); var boolconverter = {converter: function(data) { if (data == null) { return null; } return !!data; }}; formcontroller.addBindingOptions("featured", boolconverter); formcontroller.addBindingOptions("ispublic", boolconverter); formcontroller.addBindingOptions("pressdate", {converter: function(data) { if (data == null) { return null; } return new Date(data); }}, {converter: function(data) { if (data == null) { return data; } return data.toDateString(); }}); var datefield = new qx.ui.form.DateField(); var headlinefield = new qx.ui.form.TextField("Headline"); var subtitlefield = new qx.ui.form.TextField("Subtitle"); var authorfield = new qx.ui.form.TextField("Author"); var bodyfield = new qooxdoo.Widgets.HtmlArea("Body", null, "blank.html", null); var excerptfield = new qooxdoo.Widgets.HtmlArea("Excerpt", null, "blank.html", null); var publinkfield = new qx.ui.form.TextField("Publication (http://www etc.)"); var pubnamefield = new qx.ui.form.TextField("Publication (name)"); var publicfield = new qx.ui.form.CheckBox("Display this press publicly?"); var featuredfield = new qx.ui.form.CheckBox("Feature this press?"); var savebutton = new qx.ui.form.Button("Save"); form.add(datefield, "Date", null, "pressdate"); datefield.setRequired(true); form.add(headlinefield, "Headline", null, "title"); headlinefield.setRequired(true); form.add(subtitlefield, "Sub-title", null, "subtitle"); form.add(authorfield, "Author", null, "author"); form.add(bodyfield, "Body", null, "body"); bodyfield.setRequired(true); form.add(excerptfield, "Excerpt", null, "excerpt"); excerptfield.setRequired(true); form.add(pubnamefield, "Publication (name)", null, "publication"); pubnamefield.setRequired(true); form.add(publinkfield, "Publication (http://www etc.)", null, "publink"); form.add(publicfield, "Public", null, "ispublic"); form.add(featuredfield, "Featured", null, "featured"); form.addButton(savebutton); formcontroller.setTarget(form); var rpc = new qooxdoo.Remote; rpc.set({ thing: "press", model: this, manager: "Chiara\\Website\\Press\\Manager", window: window, successhandler: rpc.featuredModelHandler(formcontroller, this), form: form }); savebutton.addListener("execute", rpc.getSaveHandler("saveThing", null, "press", '*data*')); var renderer = new qx.ui.form.renderer.Single(form); return renderer; } ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
