Page 2 of 5

Trouble getting Update Rest Service to work

Posted: Sun Jun 09, 2013 7:52 pm
by ssquire

Katya,

How do I make the default text in my Popup the value of the date or notes field that was clicked to initiate the Popup? I tried the more properties then put attribute as "defaultvalue" and "Value" as the variable containing that data.


Trouble getting Update Rest Service to work

Posted: Sun Jun 09, 2013 10:18 pm
by maxkatz

You can store the value in local storage and then read the value in popup.

As for More Properties -- every element will have different available properties. Search jQuery Mobile and HTML elements docs to see what's supported.


Trouble getting Update Rest Service to work

Posted: Sun Jun 09, 2013 11:26 pm
by ssquire

How do you "readthe value in popup"? (syntax wise)


Trouble getting Update Rest Service to work

Posted: Sun Jun 09, 2013 11:58 pm
by maxkatz

You can use standard local storage API. You will find an example here: http://docs.appery.io/tutorials/build...

And here: https://developer.mozilla.org/en-US/d...


Trouble getting Update Rest Service to work

Posted: Mon Jul 15, 2013 5:14 pm
by ssquire

Max - 1st of all thanks. Using the local storage API is working great. However, I have one problem. Once I edit the value in my pop up and press the 'ok' button, I need to get the new value stored back in the original component, but that component is contained on the screen that the pop up was called from and therefore not visible from the pop up screen. What is the best way to update that component not contained on the current page?


Trouble getting Update Rest Service to work

Posted: Mon Jul 15, 2013 5:30 pm
by maxkatz

Access the component in the DOM and update its value.


Trouble getting Update Rest Service to work

Posted: Wed Jul 17, 2013 10:29 pm
by ssquire

Max - when I use the following code to put the value from my edited text area (on the pop up "edit date") back into the label on the page the pop up is called from - the alert I'm using to see if the edited value was stored is blank. Is this an Appery problem? (see below)

var eDTA = Appery('editDateTextArea').text();
alert(eDTA);
Appery('gameDateLabel').text().val(eDTA);

The value is not being stored and the variable would appear to be blank.


Trouble getting Update Rest Service to work

Posted: Wed Jul 17, 2013 10:33 pm
by maxkatz

"gameDateLabel" -- input or output component?


Trouble getting Update Rest Service to work

Posted: Thu Jul 18, 2013 4:58 pm
by ssquire

It's a label component attached to a database field.


Trouble getting Update Rest Service to work

Posted: Thu Jul 18, 2013 5:45 pm
by Kateryna Grynko

Hi Steven,

Please try the following code:
codevar eDTA = Appery('editDateTextArea').val();
alert(eDTA);
Appery('gameDateLabel').text(eDTA);/code