Appcelerator. Update table with JSON data without refresh - appcelerator-mobile

I am developing an iOS app using Appcelerator. I got a table on one window which contains six sections. Every section contains one or more items (rows).
When a user clicks a row she is forwarded to another window where she can edit the item. I then would like to update that row in the table without reloading the table completely.
The JSON object for the row is sent to the edit page where it is updated with the latest details and then sent back to the first window where it updates the old object.
The problem I am facing now is how to "refresh" the table. I am using sections.
This is the code for the first window: http://pastie.org/2189569
This is the code for the second window: http://pastie.org/2189592
Do anyone know of a better way or a way to solve this problem?
Thankful for all input!

Related

Oracle Apex - Problem with InteractiveGrid field in Dynamic Action refresh

I have a problem using a dynamic action refresh in an interactive grid.
I have a field of type popup lov, when I choose one of the items in the list, I am performing a query to fill a collection, and then I do a refresh with a dynamic action, so that the data is reflected in the grid.
But at the moment of doing it, this happens with the field:
enter image description here
and in the console it shows me the following:
enter image description here
I hope to have your help, thank you very much.

Interactive Grid autosave and refresh (after processing)

I have Interactive Grid with Static ID full_grid. For auto save I have dynamic action based on JavaScript Expression:
$('input[type=text]')
which saves grid details:
apex.region("full_grid").widget().interactiveGrid("getActions").invoke("save");
and it calls process - Interactive Grid - Automatic Row Processing (DML), with custom PL/SQL logic. This part is okay, everything working, but I have problem with data refresh. If I updating only one cell (row), everything is okay, because it updating only one row (last modified), but sometimes I need to update 1 or 2 additional rows when updated one of row. I mean if I have 10 rows, when I update 5th row, I update 2nd and 3rd rows as well (in database table), and after processing Interactive Grid is not updated visually for 2nd and 3rd rows. I understand that I have to refresh Interactive Grid after processing, but I don't have idea how I can do it. It is possible to call JavaScript function from PL/SQL or maybe there is another solution to refresh Interactive Grid after processing without page submit?
Try:
apex.region("full_grid").widget().interactiveGrid("getActions").invoke("selection-refresh");
for refresh current line, or
apex.region("full_grid").widget().interactiveGrid("getActions").invoke("refresh");
for full refresh.

Power BI parameter for image

I wanted to know if there's a way to have a parameter that holds an image.
The problem: I have 10 PBIX, each one containing over 20 screens. every report has the clients logo. it is an image let's say the client changed his logo, that means I'll need to change the logo 200 times!! (10 PBIX X 20 screens).
Wanted solution: is there a way to hold a parameter that will contain the logo, therefore changing the logo only 10 times (for each PBIX) that will be a HUGE improvement for my time and productivity. sorry for not including pictures this is to keep my client anonymous
Thank you!
Here is how you can achieve your requirement as stated below-
Step-1 create a custom function in Power Query as stated below. The function is taken from Here and you can check this blog for more details if you are interested.
let
BinaryToImage = (BinaryContent as binary) as text =>
let
Base64 = "data:image/jpeg;base64, " & Binary.ToText(BinaryContent, BinaryEncoding.Base64)
in
Base64
in
BinaryToImage
Here below is the image for the custom function-
Step-2 create report wise folder in your local directory and keep your image there. I am considering one folder here, but you can do your own once you get the workaround.
Step-3 Create a data connection for Folder as shown below and point to the folder you kept your logo/image-
And now you will have a table as below with one row as there are one image only. I named the table as PBI_Images.
Here basically Content column holding the Binary data for the image and we have to convert it to Base64 using the Function we created earlier.
Step-4 Now lets Invoke the function in our table. Select the table and do what shown in the below image-
Now you have a new column with data like below-
Step-5 Get back to report by clicking "Close & Apply" button.
Step-6 Download the following App from AppStore-
Step-7 Just add the new downloaded visual to your report and put the newly created column to the "Image URL" field as below-
Step-8 Now add the Image visual to all your report pages and tag the Image URL as stated in step-7.
You are all done now. Just Change the Image in your source file keeping the same name and after that refresh your table (PBI_Images my case) and you will see Image changes everywhere in the report.
Finally, if everything works expected, you can first try will all logos from one single folder. If do not work, go for folder per customer as mentioned earlier.

How to combine tabular form and text area in one page?

I have a page, containing tabular data(region type SQL Query (updateable report)). It only updates existing rows using Submit. The wizard created ApplyMRU process. It works fine. But now I would like to place a text area in the same page, which will be bound to different table and will get updated once the same Submit button is pressed. How can I accomplish it?
I've created item for text area, but not sure what type of source I should set. Database column doesn't let me specify table. Also I guess I need a second after submit process, but not sure which one.
Keep your existing ApplyMRU infrastructure for the tabular form, and just define a second PL/SQL process that executes during page submit that will do whatever it is you want with your text area, eg:
insert into notes (id, text) values (:P1_ID, :P1_TEXT_AREA);
Take note of the order of the processes, as you may want to execute one before the other.

Infragistics WebDataGrid column layout not maintained on Insert and Delete

I've come across this weird issue with the Infragistics WebDataGrid control.
When the grid starts, it appears ok, headers on the header row. There are no entries, so the only row displayed below is the "add" row.
I then load data into the grid from my AJAX code-behind. It appears ok. The 3 new rows appear, the "add" row sits below. Everything clean.
I then click the delete "x" in the 2nd row (sidenote: this is a template column and is the first column in the grid, so why it appears at the end I do not know). The AJAX kicks in and the 2nd row is removed. But the grid refreshes odd. It looks like a new column has appeared on the "add" row, which has thrown the other rows and header out.
It is functionally correct, but visually a mess.
NOTE: This also happens when you add a new entry from the "add" row.
FYI - I have followed pieces of Craig Shoemaker's example, however I bind my datasource in the code-behind, amongst other changes. (http://community.infragistics.com/aspnet/articles/webdatagrid-client-side-crud.aspx).
Anyone know what causes this / how to fix it?
Chris,
I tested this and I wasn't able to reproduce this. I would recommend that if you can still reproduce this you post the issue on the Infragistics forums with the code that you are using so that we can look into it further.