Did you not look at the solution I posted? It should solve your issue. You
are simply working with JSON, it's easy to add objects to your JSON as I
presented in my solution. Please go back and re-read it. And if it didn't
work, please tell me wny. I do this sort of stuff all the time. I compose
JSON to send to the server for all my calls.
Jim
On Wed, Oct 10, 2012 at 8:51 AM, jwhitten <john_whit...@yahoo.com> wrote:
> Yes, I did think of that, and it would "solve" my immediate situation, but
> I
> don't think it would work well for my larger goal of building a "Generic"
> form/crud manager that I can inherit (extend) from. What I'd like to do is
> set properties in the Generic object to manage those various common
> submission, house-keeping, setup and other "out-of-band" (i.e. out of the
> model data) issues, and then inject them into the param set just prior to
> submitting them to the back-end. So in essence, you'd do something like
> this
> (this is pseudo-code, I'm typing it on the fly as I write):
>
>
> my new class ("blah blah crud MyShinyObject")
>
> extends "blah blah crud Generic"
> ...
>
> properties :
> {
> crudMode : { init: null },
> crudName: { init: null}
> }
> ...
>
> construct : function()
> {
> this.base(arguments);
>
> * this.setCrudMode("new");
> this.setCrudName("MyShinyObject");*
> ...
> }
>
>
> Then in the Generic object it's extended from, there's something like:
>
> members :
> {
> _handleSubmit : function(e)
> var item = e.getData();
> var service = this._getService(item);
> var model = item.getModel();
>
> *__SOMEHOW_ADD_( this.getCrudMode(), this.getCrudName()
> )_TO_MODEL__*
>
> this._callRpcSync(service, this.getUrl(), model);
> }
>
> That way, all of the heavy lifting is handled in the Generic object and all
> the subclassed object has to do is set the crud parameters, set up the form
> and its associated model, and the rest is auto-magically handled by the
> Generic class object.
>
> This would cause the params to contain:
>
> {
> foo: "whatever",
> bar: "something else",
> * crudMode: "new",
> crudName: "myShinyObject"*
> ...
> }
>
> Even more ideally, I could prepent underscores or something to the names so
> they would obviously be out-of-band parameters. But that's a secondary
> issue.
>
> I don't really care how the params get there. Probably the best, easiest
> and
> clearest way would be to somehow convert the form model (values) into a
> key-value pair array (map? in JS parlance??), add the extra parameters to
> that, and then submit it to the RPC object for submission. But I can't
> figure out how to convert the model into an array either.
>
> There doesn't appear to be any clear path from here to where I want to go.
> The manual doesn't seem to help, nor any of the comments I've been able to
> find on the net or Stack Overflow.
>
>
> Thanks for helping me with this, I appreciate it!
>
> john
>
>
>
>
>
> --
> View this message in context:
> http://qooxdoo.678.n2.nabble.com/Need-help-with-Models-please-tp7581630p7581642.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel