I understand your question now. We include the id of the element that
generates the message in the message payload. The "app_20" is the id
that we assigned to the element that generated your message. If an
element does not have an "id" defined, we define one for it.
I seem to recall that there is a way to suppress a fieldset member
from the message payload. Let me take a look.
On Jan 5, 12:30 pm, Dan Connelly <
daniel.s.conne...@comcast.net>
wrote:
> Nolan:
> My question is due to the fact the payload for your example will not be the JSON you give. It will actually be:{'id':'app_20', 'username':'value', 'password':'value'}The "id" property will appear in the payload although there is no 'id' input in the fieldset.
> Just run the Fieldsets Example in the Appcelerator documentation and you will see this. Value is usually app_xx where xx is numeric. I have no idea if this value is meaningful or predictable. I have no idea how to suppress it.
> Maybe the 'id' property is a bug, since neither one of us expected it.
> -- Dan Connelly
> Nolan Wright wrote:I'm not sure I understand your question, but here's some info on fieldsets: they are used to link input fields together for the purpose of sending a message. When a message is generated by a member of a fieldset, we place all of the values of the fields that share the same fieldset name (e.g., fieldset="my_form"). When setting the message payload we look at the "id" value to set the name portion of the name/value pair. You should also be able to use "name" as well. Here's an example: <input type="text" name="username" fieldset="login"/> <input type="password" id="password" fieldset="login"/> <input type="button" fieldset="login" on="click then r:login.request"/In the example above the message payload would have {'username':'value', 'password':'value'}. Not sure if this answers your question. If not, can you provide me with some additional detail? Thanks. Nolan On Jan 5, 8:24 am, Dan Connelly<
daniel.s.conne...@comcast.net>wrote:Am I supposed to use the value of the "id" property to distinguish among the possible fieldsets on the page? If so, it should be the fieldset name. Is there some standard use for "id"? Does the value have a meaning?