Where to change data for a "list" datasource in dashcode? - iphone

I created a new project in dashcode and it automatically generated a mobile web app for me with a list and sample datasources. I see two datasources, one is labeled as "datasource" and the other is "list". However I can see that the actual data in datasources is in a js file, everything is good but where is the actual data stored for "list"?
The sample application came with a bunch of data for "list" and I am unable to change it. Any ideas?

When you click on "DataSource" under Data Sources, you'll notice that the top line displayed is URL. It is assumed that the DataSource you'll be using is on the web somewhere (there's a way to maintain the datasource locally on the iphone but I'll get to that in a minute). So, "publish" you xml|rss|atom|etc. data on a web site somewhere and enter the appropriate URL. When you press return or hit the refresh arrow, if the URL is correct, DashCode will parse your data file and the DataSource and List items will reflect your xml structure).
Then using DashCode create the bindings between your data and your DashCode template.... I whiz right by this because there is an excellent tutorial at the apple developer website at: http://developer.apple.com/safari/library/documentation/AppleApplications/Conceptual/Dashcode_UserGuide/Contents/Resources/en.lproj/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004692-CH1-SW1
If the above link fails, go to "developer.apple.com" and from that home page search for "DashCode". The intro document should be the first link returned.
This intro walks you through writing DashCode applications including working with DataSources and binding to your templates.

Related

Confluence Plugin: How to create space and pages programmatically from imported CSV?

I want to add a button to the system.header/left, which I already did. And when I click that button, I want a file picker popup to choose my CSV.
From the CSV content, I want to create space and pages.
I've browsed through the documents and tutorials, but I can't find anything alike.
Could you point a direction or steps for me? At least, point me to something relevant?.
Here's a short overview:
Your button will trigger a JavaScript.
That javaScript will open a dialog window containing the form elements allowing the file upload
The target of that form will be either a servlet or rest-endpoint
inside your plugin. Let's assume it's a servlet.
The servlet will
take the submitted file, split it using the defined separator and
create the page structure using the confluence API calls.
And forward to the start page of your new Space.
I'd suggest that you start with the servlet.
Provide a couple of lines of test data, to check if your code creates the page structure as expected.
Once this works, add the file handling part (from a dedicated html) and pass the data to your existing function.
Now, you have the backend and the frontend, so rendering the dialog when your button is clicked, is pretty straight forward.
Make sure to display the button only if the current user has the right to create a space.
Stuff that might help you:
confluence servlet module: https://developer.atlassian.com/server/confluence/servlet-module/
reading a CSV in java: https://www.baeldung.com/java-csv-file-array
Uploading a file in Java: https://www.baeldung.com/upload-file-servlet
How to create a new Space using Java API: https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-create-a-Confluence-Space-with-Java-API/qaq-p/491588
Confluence API: SpaceManager: https://docs.atlassian.com/atlassian-confluence/6.6.0/index.html?com/atlassian/confluence/spaces/SpaceManager.html
Confluence API: PageManager: https://docs.atlassian.com/atlassian-confluence/6.6.0/index.html?com/atlassian/confluence/pages/PageManager.html
Hope this helps.

Where does orbeon form saved?

I am a new user of orbeon and am trying to some exercise with orbeon's code. I have downloaded orbeon source code from git. I have made a war file (with ant orbeon-dist-war) and placed it in tomcat. Everything is working fine. Then I follow the tutorial and make "my-bookcast" application mentioned there.I found the application source code at "/WEB-INF/resources/apps/my-bookcast" and I know which database is used and where the data are saved. But my questions are
When I create form using orbeon form builder using the video tutorial mentioned in www.orbeon.com, using mouse and keyboard only where the form saved? How can I see the source code (like "my-bookcast") of the saved form?
Can I use the form along with source code in other application, independent off orbeon?
Update: Can anyone tell me, if I want to see the data stored in exist-db then how can I do this. I heard about oxygen, which can be used as a exist-db browser. In that case where can I found the exist-db related configuration in orbeon to connect with the built-in exist-db?
Out of the box, the form definitions and form data are stored into the embedded eXist database. The source code you can see directly from Form Builder, with "Edit Source".
No.
Regarding the question in your update: you can disable the orbeon-exist-filter eXist security filter in web.xml, then should be able to connect with oXygen either via exist-xmlrpc-servlet or exist-rest-servlet which is mounted on /exist/rest/*.
Graphical view
You can find this icon on Right Top.
After clicking, you will get this popup and that's the source

iOS App-to-App Trasnmission of Data using new Document Support API

Problem:
Building Enterprise Applications of a Suite Nature, and need to be able to pass data from one application to another. Example: App1 is a barcode reader that produces and inventory list. App2 needs a "fresh" copy of the same inventory list information that App1 just produced in order to accomplish its goal of producing purchase orders. The two apps and databases are two large to squeeze together in single app, plus the suite will continue to grow with more and more apps.
Understanding:
I fully understand that "Each" application is in it's own sandbox. However, in reading through the documents regarding the new UIDocumentInteractionController API, it appears that an application can dip outside of the sandbox just a little to "Read-In", "View", or "Open-In" a document that was not apart of the bundle or created within the application.
Data Flow:
I'm trying to keep it simple. I have been using the DocInteraction sample application downloaded from Apple, and another application...called App1 to try and work with a simple text file. In App1, I create a simple txt file, and save it to the documents folder. (But this is still inside the app's sandbox?). in the DocInteraction modified sample, I have been trying to figure a way to "View", "Open-In", or better yet "Read-In" the created txt file. If I can pass a simple txt file between the two, I can include a CSV structure to update the databases on each side when ever the applications are opened.
I have tried to utilize the Launch Options Keys with no luck.
In short, I just can't seem to get my head around:
Where App1's data needs to go?
How to find the data in the other App, say App2?
How do you "Open" the file that exist inside another application's sandbox?
End Result:
I have tried to stay away from the
The Document Interaction docs outline:
Previewing a Document or Presenting Options
Registering Your Support of File Types
Opening Files From Other Apps
Displaying and Printing Quick Look Previews
It is the "Opening Files From Other Apps" that I am most interested with. It directs me to utilize the application:didFinishLaunchingWithOptions: method by passing in dictionary values for the keys. This is where I get lost?? How do I set the keys so that it knows "WHERE" and "WHAT" to look for? And I'm still not clear the proper director that App1 should be saving information to in order for the keys to point to the correct place?
Opening email file attachments and opening pdfs in iBooks can't be the only places where you can utilize this API or else Apple wouldn't have went through all the work, they are already allow to talk from App-To-App.
Note: I'm not trying to get App1 to directly transmit data into App2's files. I don't think that would be allowed by Apple at all! I'm trying to get App1 to zip up its data, save it in proper location, so when user decides to use App2, the data can then be available to App2 by "reading-in" the data.
If someone has a sample application, tutorial, or even a solid idea how to get this working I would really appreciate the help.
-Thanks!
P.S. Somebody with 1,500 or higher reputation please create a "UIDocumentInteraction" tag for stackoverflow!
I got it working last month. Here's my mental model:
App1 creates a file anywhere in its sandbox.
App1 calls docinteraction to display the "Open In" GUI for that file
User picks "Open in App2"
The iOS copies the file from one sandbox to the other and launches App2.
App2 implements didfinishlaunchingwithURL and loads the supplied URL (which is the copy in its sandbox)

open ms doc,docx or image file in browser in c#

I have developed the asp.net mvc application. my one form have the file upload control. so in details view i want to implement the facility to view the uploaded document in browser itself. it should not ask for download and should not open MS office instance to open document. its a user req. It should opens in view mode in browser itself. what code i have to do ? I am using C# as language.
It is not straight forward. For images you can use <img>tag and link to the location in server where you saved the uploaded image. That should work.
However ASFAIK showing the doc/docx things in web page itself is not possible. You will have to employ some third party control to achieve that. Search google to find such controls. May come at a cost.

Zend_Translate Help - Slovak Languege

I need to just translate form error messages in my application.
The application is not multilingual, it is al in Slovak (so I already write labels and stuff in Slovak language), just need to translate error messages.
I have made this method in my bootstrap file:
protected function _initTranslate()
{
$this->translate = new Zend_Translate('gettext',
'/path/to/translation/source-sk.mo',
'sk');
Zend_Form::setDefaultTranslator($this->translate);
}
But how to create the source-sk.mo file? Do I need to download it somewhere from the Web?
First you will need to download the PoEdit software and then you will need to configure it according to this post.
Once you have completed those steps, you will need to create a new catalog file from within PoEdit. In the creation dialog, click on the keywords tab, and then add function names that you wish to scan for in your code. With Zend Framework, this is typically just translate since you are probably using the translate() view helper. However you will want to also include setLabel so that it pulls your Zend_Form labels as well.
After you have created your catalog, you will need to scan your source code for translations. You do this by clicking Update from Sources under the Catalog menu. Once it has completed scanning your source code, it will display a list of all strings that need to be translated. You then go down the list and enter in the translation for each string. Now save the catalog to somewhere within your ZF application, preferably /languages, point your Zend_Translate declaration to this location and you are good to go.
If you adjust any labels or strings later on, you can always reopen the catalog with PoEdit, run Update from Sources again and it will pull all of the new changes for you to translate.