Up to date, working Google apps-script example integrated with spreadsheet? - user-interface

I'm trying to build some kind of GUI on top of/embedded into a google spreadsheet.
I've been crawling through the docs, and sadly, hitting a wall.
I DID find the sample video, at
http://www.youtube.com/watch?v=5VmEPo6Rkq4
Unfortunately, it seems out of date and broken :( Some of the calls are no longer valid.
And, while I think I figured that part out, I cant get the callback handler to be recognized.
It gives me a runtime error of
"Error encountered: Script function not found:
function respondToSubmit(e) {
/* full body of function here*/
}"
The odd thing is, for supposedly not finding it, it does a good job of printing out the whole function body.
It doesnt seem to be an error inside the function itself, because when I make it an EMPTY function, it still gives the same error :(
Could someone please point me to a simple, working example of how to add a UI alongside a google spreadsheet, or equivalent?
Please note that I dont need a general-purpose, standalone application(I think).
I'm just trying to embed some GUI type functions, in one very specific google spreadsheet that I have.

There are examples of simple Spreadsheet UIs using three different approaches in the
Dialogs and Sidebars in Google Apps documentation. They all work today. The third approach, Custom Dialogs, can be implemented using UiService or HtmlService, but that page only shows an example using HtmlService.

Related

How to locate HTML elements in SpreadJS

My company uses SpreadJS to embed an Excel like sheet into a web page. I'm trying to find a way to create automation tests for this, but I'm unable to locate any of the document information due to the following error:
"You need a browser which full supports HTML5 Canvas to run SpreadJS". I've tried several different browsers, all of which are up to date, and yet I still run into the same issue.
Does anyone know a way around this?
Here is an online example. Let say I just want to modify cell A1 and then retrieve its value:
driver = webdriver.Chrome(paht_to_driver_variable) driver.get("grapecity.com/spreadjs/designer/index.html")

Is it possible to get another person's UI in Google Apps Script?

In Google Apps Script when you use the property: DocumentApp.getUi(), it gets the UI of the person who is using it. If you used DocumentApp.getUi().alert(), then it would send an alert to the person who is using the script. I am wondering if there is maybe a way to alert another person's UI in Google Apps Script and not the person who is using the script. Here is a sample of my code:
DocumentApp.getActiveDocument()
.removeViewer(userName.getResponseText())
.removeEditor(userName.getResponseText());
DocumentApp.getUi()
.alert("Your access is being removed.")
Now it would be wonderful and imagine all the possibilities if that were possible! Someone please help!
It is not possible to access the UI of any browser except the one which invoked the function. This is also why time driven triggers cannot display UI modals (they are executing nonlocally).

ClaimCenter Web PCF files UI Labels

I’m trying to automate building of a mapping document between claimcenter gui through to dB. I’ve made some success in this space using the data dictionary however I’ve become a bit stumped when it gets to getting labels for the UI fields
I’ve been looking at the web pcf files and I can see where labels are mentioned for UI fields, for example
label="DisplayKey.get(" VehicleIncident.Audatex.AudatexLV.AudatexReference ")"
I assume this is making a call someplace to get the description and populate it?
Would anyone know where this might be and perhaps where I should look to next?
In properly configured guidewire studio, those should be properly resolved on CRTL+left mouse button on the label in the DisplayKey.get function call.
If they are not then it is resolving them to
modules\configuration\config\locale\display_en_US.properties
If your locale is different then en_US might be something else.

Chasing referrals like ldp.exe in the win32 ldap API

I've been using ldp.exe to guide development of some ldap code for Active Directory. I'm using the win32 API (wldap32). ldp.exe has been extremely helpful in this regard, because in the right pane of the program it shows (more or less) the actual win32 API functions and arguments used to carry out the commands. I find this particularly helpful when crafting calls for ldap_search. If I can get the search to work in ldp.exe, I can directly translate the search to ldap_search.
This was all working as expected until I tried to query a trusted, linked base domain. For example, I login and authenticate to x.net. But I am trying to query the domain y.net which is trusted from x.net.
A search query like (SAMAccountName=mylogin) with BaseDN DC=x,DC=net works in ldp.exe immediately. If I change the BaseDN to DC=y,DC=net it will not work. However, if go to Search Options in ldp.exe and check the box for 'Chase Referrals', the query will work.
Here is the problem. I don't know what checking that box does in terms of win32 API calls. When I query BaseDN DC=y,DC=net with ldap_search directly the return code is LDAP_REFERRAL.
At first, I thought fixing it would be as simple as calling ldap_set_option with LDAP_OPT_REFERRALS, but that doesn't seem to be enough. I've tried settings various other referral related flags like LDAP_OPT_REFERRAL_HOP_LIMIT to larger numbers hoping that is my problem, but nothing seems to work.
I suppose that one possibility is that ldp.exe is actually following those referrals manually with additional function calls (but not actually showing it on the GUI). However, I have not found any good examples of how to do that. If anyone has an example of that, it would be greatly appreciated.
Additionally, I know this query can work because I have access to C# code using DirectoryEntry and DirectorySearcher that works fine in this case.
Does anyone know what is going on in ldp.exe 'Chase Referrals' and how to translate it to the win32 API?
If you see ldp.exe console output, win32 api ldap_search also get's LDAP_REFERRAL. However ldp.exe does follow referrals with additional functions which we don't see in the console as those are not api's.

strutrs2 and ajax(Displaying dynamic value on jsp)

Im pretty new to struts2 and Ajax ,Actually i have a drop down menu in JSP lets say first.jsp, When user select a choice from dropdown menu,I am calling a function of Action class lets say Method1.In this method i am fetching some value from DB(lets say:a,b,c) and one value from java memory lets say d.Then I am forwarding to second.jsp and display all the parameters(a,b,c and d) in tabular format.
Now problem is that the parameter d is dynamic ,this is updating by some other application and if its change then I have to show it on JSP wihout any action.
One solution is I use in second.jsp , so after interval of 10 second again Mehod1 will call and it will fetch value(a,b,c) from db and updated value of d from java memory. and disply it to second.jsp.But in this case i am unnecessary retrieving value from db while my purpose is just to get value d from memory.This is working but this is causing my application to slower.
Can any body suggetst some other solution? or can i do it using ajax and how?
Any other advice? any help is appreciated.try to be more clear, i'm in lack of ideas in this problem, even it sounds like a classic :I have spend hours trying to play around with this but have got nowhere
Okay... What you're asking is a little fuzzy so let me rephrase:
You have a user (USER1) who opens a web page and sees some data.
You have a second user (USER2) (who may be an application) who is able set a value from time to time.
When USER2 updates that value you want USER1 to see it change in their open browser window?
If this is the case you need to understand basic ajax. For that get these demo applications working:
This example uses dojo and perhaps the S2 ajax tag lib I don't remember I prefer not to use ajax tags (as they are deprecated and prefer jquery for ajax):
http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html
This example here shows a very similar application but using jquery, no tag library, upgraded to Spring 3, it still needs polish:
http://www.kenmcwilliams.com/Downloads/
Now that you know how to get data via ajax, look at the request with firebug. You'll see that the request is just like a typical function call, the browser keeps waiting for the data to come back.
What you do is simply not return from the action until new data is provided. This is called long polling see: http://en.wikipedia.org/wiki/Comet_%28programming%29#Ajax_with_long_polling
If you have not written a simple chat program, using just terminal windows I recommend you do so. Two windows per client (client-send, client-receive windows) and you'll need a server program. I remember hacking one together in a few hours using _Thinking In Java 2nd Edition (Later books took out the networking section if I remember correctly). Anyways between understanding client server interaction and long polling will let you get things working. It would be fun to extend the simple terminal based chat application to a S2 ajax chat application. Would make an awesome tutorial! PS: This is just an application of the producer/consumer problem (If you understand that then I guess you don't need to do the fun exercise).
The interfaces would look very pretty if the server was managed by spring. I know there must be nice servers already written but I am not familiar with any, but would love to hear of one.

Resources