When you do this in HTML, the action (eg,
www.example.com?q=loc=miami&data=weather) sends all of the fields to the
server which then sends back a new HTML page with the results. A lot of
things happen automatically for you, such as pairing the values of the
input fields with their IDs to form the query string or the POST.

In Flex, maybe the Form has the ability to look at all its children for
TextInput or IFormInput controls and gets their values and IDs and
composes a FormActionEvent. A controller could listen for that, and cause
an HTTPService to be invoked. When the controller gets the result back, it
dispatches an event which something is listening for and then transitions
from the Form to the next view (eg a Chart).

Basically, I think the Form action should be more than just a URL in Flex;
probably an event. Maybe in FlexJS all of the data extraction is the job
of the app developer to do as they see fit and FlexJS really doesn't do
much more than that.

—peter

On 10/17/16, 10:18 AM, "carlos.rov...@gmail.com on behalf of Carlos
Rovira" <carlos.rov...@gmail.com on behalf of
carlos.rov...@codeoscopic.com> wrote:

>Hi Peter,
>
>makes sense. I was wrong with "action" property...is working ok right now
>(maybe some wrong compilation), and right now if you hit ENTER, it goes to
>www.example.com, so regarding what you say, you mean to add some
>controller/model to the implementation?
>
>
>2016-10-17 14:28 GMT+02:00 Peter Ent <p...@adobe.com>:
>
>> Shouldn't it be possible for the action on a <js:Form> to trigger an
>>event
>> that the application code (or its main controller) could use that would
>> then decide to either open a new URL or go to a different FlexJS view?
>> Usually, I would think, an HTML Form's action takes you to another part
>>of
>> the web "application" like the next set of forms to fill out or to
>>submit
>> your change of address. In the case of Flex, such an action usually
>> triggers a HTTPService call that then displays more Flex UI based on the
>> result of the HTTPService call.
>>
>> ‹peter
>>
>> On 10/17/16, 6:19 AM, "carlos.rov...@gmail.com on behalf of Carlos
>>Rovira"
>> <carlos.rov...@gmail.com on behalf of carlos.rov...@codeoscopic.com>
>> wrote:
>>
>> >I upload to develop a first working implementation of form, still no
>> >functionality, but is nesting elements inside and showing correctly in
>> >HTML
>> >while surrounded by <form> tag. Only JS considerations (no SWF)
>> >
>> >My first question is how is managed properties in FlexJS. We don't have
>> >commitProperties, so  I supposed this was straight forward and
>>implemented
>> >an "action" property like this:
>> >
>> >        private var _action:String = "#";
>> >
>> >        [Bindable("actionChange")]
>> >        /**
>> >         *  The action to be performed when the form is submitted
>> >         *
>> >         *  @langversion 3.0
>> >         *  @playerversion Flash 10.2
>> >         *  @playerversion AIR 2.6
>> >         *  @productversion FlexJS 0.0
>> >         */
>> >        public function get action():String
>> >        {
>> >            return _action;
>> >        }
>> >
>> >        /**
>> >         *  @private
>> >         */
>> >        public function set action(value:String):void
>> >        {
>> >            _action = value;
>> >
>> >            COMPILE::JS
>> >            {
>> >                this.element.setAttribute('action', action);
>> >                this.dispatchEvent('actionChange');
>> >            }
>> >        }
>> >
>> >So using it as:
>> >
>> ><js:Form action="http://www.example.com";>
>> >...
>> >
>> >Should translate to
>> >
>> ><form action="http://www.example.com";>
>> >...
>> >
>> >but it remains action="#"
>> >
>> >so someone could point me on how implement getter/setters in FlexJS?
>> >
>> >Thanks
>> >
>> >
>> >2016-10-17 8:42 GMT+02:00 Alex Harui <aha...@adobe.com>:
>> >
>> >> On 10/16/16, 11:31 PM, "carlos.rov...@gmail.com on behalf of Carlos
>> >> Rovira" <carlos.rov...@gmail.com on behalf of
>> >> carlos.rov...@codeoscopic.com> wrote:
>> >>
>> >> >Hi Alex,
>> >> >
>> >> >maybe I could implement it. It needs few things, action(normal the
>>url
>> >>to
>> >> >call when submit the form). the method (GET, POST).
>> >> >And we should allow to next input elements... I think to start
>> >>something
>> >> >basic should be ok.
>> >>
>> >> That would be great.  And an example or test that shows what Form
>>can do
>> >> would help folks implement a SWF equivalent.
>> >>
>> >> >
>> >> >To make it I would need some guidance about what component to
>>extend,
>> >>and
>> >> >where lib to do it (Core? html?)
>> >>
>> >> Seems like it should go in the HTML.swc
>> >>
>> >>
>> >> >And whatever consideration you know about the actual flexjs
>>framework.
>> >>
>> >> I don't really know enough about Form to provide early guidance.
>>Let's
>> >> see what you come up with and go from there.
>> >>
>> >> -Alex
>> >>
>> >>
>> >
>> >
>> >--
>> >
>> >Carlos Rovira
>> >Director General
>> >M: +34 607 22 60 05
>> >http://www.codeoscopic.com
>> >http://www.avant2.es
>> >
>> >
>> >Este mensaje se dirige exclusivamente a su destinatario y puede
>>contener
>> >información privilegiada o confidencial. Si ha recibido este mensaje
>>por
>> >error, le rogamos que nos lo comunique inmediatamente por esta misma
>>vía y
>> >proceda a su destrucción.
>> >
>> >De la vigente Ley Orgánica de Protección de Datos (15/1999), le
>> >comunicamos
>> >que sus datos forman parte de un fichero cuyo responsable es
>>CODEOSCOPIC
>> >S.A. La finalidad de dicho tratamiento es facilitar la prestación del
>> >servicio o información solicitados, teniendo usted derecho de acceso,
>> >rectificación, cancelación y oposición de sus datos dirigiéndose a
>> >nuestras
>> >oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
>> >necesaria.
>>
>>
>
>
>-- 
>
>Carlos Rovira
>Director General
>M: +34 607 22 60 05
>http://www.codeoscopic.com
>http://www.avant2.es
>
>
>Este mensaje se dirige exclusivamente a su destinatario y puede contener
>información privilegiada o confidencial. Si ha recibido este mensaje por
>error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
>proceda a su destrucción.
>
>De la vigente Ley Orgánica de Protección de Datos (15/1999), le
>comunicamos
>que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
>S.A. La finalidad de dicho tratamiento es facilitar la prestación del
>servicio o información solicitados, teniendo usted derecho de acceso,
>rectificación, cancelación y oposición de sus datos dirigiéndose a
>nuestras
>oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
>necesaria.

Reply via email to