i am developing an application over Sharepoint 2010, I am using ECMAScript Client Object Model, so from one applications page using SP.UI.ModalDialog.showModalDialog(options) I am openning another page. From this second page I want to send the information the user inserts back to the parent page. HOw can I do this?.
Thanks a lot for any comments !
You can pass callback function in options of the showModalDialog method. This callback function takes two parameters, a dialogResult and a returnValue of type object that can contains any data.
http://msdn.microsoft.com/en-us/library/ff410058.aspx
When you close your modal dialog with method commonModalDialogClose you can pass result and object parameters and use them in your callback function in the parent window.
http://msdn.microsoft.com/en-us/library/ff409682.aspx
Related
Are there any Documentum Webtop developers on here that know how to launch the DocList component within a simple container such as dialogcontainer ? I'm trying to implement some custom functionality for one of the screens in my Webtop-based application so that when the user clicks on the link for a folder, the DocList component is invoked to display the contents, then after the user is done looking at them, she can click the OK button provided by the container to return to the previous screen...
I've tried a couple different ways to do this. My first attempt was to use a dmf:link tag to call a new component I defined called doclistcontainer to contain the doclist component. My second attempt was to use a dmf:actionlink tag that called an action I defined which executes doclist within a container. In both cases, I end up with a blank screen, generic title, the OK button doesn't do anything... When I run a debugger on the code, I can see that the DocList behavioural class is being called despite the blank screen being displayed. What am I doing wrong?
Sheldon
I have a visualforce page that uses a dynamic component to render some input fields. when a user hits the submit form button, I consistently receive a 'Not serializable: Component.apex.outputPanel' error.
Question is how best to use a dynamic component to render and bind some input fields so the record can then be submitted ? The variable I want to process on submit is declared in the page controller, but I cant get around the serialization error. Any suggestions most appreciated.
Cheers,
CH
Update:
this 'unable to submit a form while dynamic component rendered' remained a problem, so in the end I chose a different approach and whilst still used dynamic component, I avoided submitting the view state per standard salesforce approach, and instead submitted via a javascript remoting function that stringified all dynamic input fields client side, submitted to function which then parsed these out into a new sObject and performed DML. Done.
I am trying to incorporate a html menu within access form. How would I get the feedback (on what the user selected within the web page) from the webpage into Access. I am using Access 2007, MS WebBrowser component.
any help would be appreciated
There is no official way to call the hosting form or initiate any activity on Access from within the WebBrowser.
However, there is one nifty trick which I use. After the document is loaded you can setAttribute of some element to the Access form. htmlDoc.all.formDiv.setAttribute "outerForm", Me
Then you can reference properties and methods of the form from within the WebBrowser.
document.all.formDiv.outerForm.Application.DoCmd.Close(2,"webForm")
EDIT:
Oddly, it seems that the reference remains null when as I add the <META http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> tag. Seemingly, the properties are more strict now, and setAttribute is expecting a string.
The next option is to pass the Access Form ('Me') to a variable in the WebBrowser. However it doesn't look like the global variables or functions are directly exposed.
This, though, can easily be overcome by adding a function to the prototype of HTMLBodyElement which passes its argument to a global variable, and can return any class as well.
In the html page you'd have this:
var frm = null;
HTMLBodyElement.prototype.setForm = function(f){frm = f}
From Access simply pass the reference down: htmlDoc.document.body.setForm(Me).
I am converting code that originally ran as remote signed jar files in Firefox to use XULRunner instead. There are several reports that are implemented as web pages with an output option. Options include an HTML page or a report viewer that is written in XUL and Javascript.
When the user submits the form, and the report viewer is selected, then I need to open a chrome window. Obviously this cannot be done directly for security reasons. I want to provide a function or use some sort of message passing method to signal to the containing chrome what needs to happen.
Can this be done and if so how? Things I am considering:
1) Adding a function to the content window's window or document object
2) Some sort of message passing function
3) Some sort of customer event send/receive
4) A special URL form with a handler such as repviewer://repname/parameters
There is a quite elaborate article on this topic on MDN. The best way to achieve this without jeopardizing security is to send a generic event from your web page. The top XUL document should call addEventListener() with the fourth parameter set to true which will allow it to receive such untrusted events. Data can be passed through an attribute of the event target, the XUL document can then inspect that attribute.
I want to modify the login page of Sharepoint 2010 to change the normal flow during page submit. I want my custom function to be called, Validate it and go to actual submition of the page based on the validation result.
I have tried calling my custom function using onclientclick in the "asp: Button" tag. The custom function gets invoked, but I am unable to make the flow complete by sumbitting the login page. Once the custom function gets executed, the whole execution is stopped.
Please help me in solving it.
Thanks in advance.
I solved it my self. As mentioned I had added an extra submit button. SO when a user clicks the 'Sign In' button the custom function is called. On its success I made the original asp:button to click.