I have created an Office add-in for Word Online but I can't get SSO working.
When the add-in is activated Word Online prompts the user for accepting the Add-in permissions, But I can’t get the SSO Token via Office.js.
When getAccessTokenAsync() first is called, I get no response or errors. If I call the function again I get error code 13008. Which indicate that the operation is running, but the result is never returned.
The manifest file is provided with
<WebApplicationInfo>
<Id>00e69b3f-c86c-4764-9e6e-xxxxxxxx</Id>
<Resource>api://localhost:43443/00e69b3f-c86c-4764-9e6e-xxxxxxxx </Resource>
<Scopes>
<Scope>openid</Scope>
<Scope>offline_access</Scope>
<Scope>user.read</Scope>
<Scope>profile</Scope>
</Scopes>
</WebApplicationInfo>
Azure Endpoint v2 registration
The add-in is registered at https://apps.dev.microsoft.com
Platform Web Api:
api://localhost:43443/00e69b3f-c86c-4764-9e6e-xxxxxxxx
Pre-authorized application:
bc59ab01-8403-45c6-8796-ac3ef710b3e3
57fb890c-0dab-4253-a5e0-7188c88b2bb4
d3590ed6-52b3-4102-aeff-aad2292ab01c
Permissions:
openid
offline_access
user.read
Profile
I have granted administrator consent using
https://login.microsoftonline.com/common/adminconsent?client_id=00e69b3f-c86c-4764-9e6e-xxxxxxxx&state=12345
Update:
If the same manifest is sideloaded into Powerpoint online or Excel/Spreadsheet online it can get the token by calling getAccessTokenAsync(), but still not in Word Online
Document Host
<Hosts>
<!--Each host can have a different set of commands. Cool huh!? -->
<!-- Workbook=Excel Document=Word Presentation=PowerPoint -->
<!-- Make sure the hosts you override match the hosts declared in the top section of the manifest -->
<Host xsi:type="Document">
<!-- Form factor. Currenly only DesktopFormFactor is supported. We will add TabletFormFactor and PhoneFormFactor in the future-->
<DesktopFormFactor>
<!--GetStarted information used on the callout that appears when installing the add-in.
Ensure you have build 16.0.6769 or above for GetStarted section to work-->
<GetStarted>
<!--Title of the Getting Started callout. resid points to a ShortString resource -->
<Title resid="dt.GetStarted.Title"/>
<!--Description of the Getting Started callout. resid points to a LongString resource -->
<Description resid="dt.GetStarted.Description"/>
<!--Not used right now but you need to provide a valid resource. We will add code in the future to consume this URL.
resid points to a Url resource -->
<LearnMoreUrl resid="dt.GetStarted.LearnMoreUrl"/>
</GetStarted>
<!--Function file is an html page that includes the javascript where functions for ExecuteAction will be called.
Think of the FunctionFile as the "code behind" ExecuteFunction-->
<FunctionFile resid="dt.FunctionFile.Url" />
<!--PrimaryCommandSurface==Main Office Ribbon-->
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<!--Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab -->
<!-- Documentation includes all the IDs currently tested to work -->
<CustomTab id="dt.Tab1">
<!--Group ID-->
<Group id="dt.Tab1.Group1">
<!--Label for your group. resid must point to a ShortString resource -->
<Label resid="dt.Tab1.GroupLabel" />
<Icon>
<!-- Sample Todo: Each size needs its own icon resource or it will look distorted when resized -->
<!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
<!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
<bt:Image size="16" resid="dt.TaskpaneButton.Icon" />
<bt:Image size="32" resid="dt.TaskpaneButton.Icon" />
<bt:Image size="80" resid="dt.TaskpaneButton.Icon" />
</Icon>
<!--Control. It can be of type "Button" or "Menu" -->
<Control xsi:type="Button" id="dt.LetterButton">
<!--Label for your button. resid must point to a ShortString resource -->
<Label resid="dt.LetterButton.Label" />
<Supertip>
<!--ToolTip title. resid must point to a ShortString resource -->
<Title resid="dt.LetterButton.Label" />
<!--ToolTip description. resid must point to a LongString resource -->
<Description resid="dt.LetterButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="dt.LetterButton.Icon16" />
<bt:Image size="32" resid="dt.LetterButton.Icon32" />
<bt:Image size="80" resid="dt.LetterButton.Icon80" />
</Icon>
<!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
<!--Look at the FunctionFile.html page for reference on how to implement the function -->
<Action xsi:type="ExecuteFunction">
<!--Name of the function to call. This function needs to exist in the global DOM namespace of the function file-->
<FunctionName>ShowDialog</FunctionName>
</Action>
</Control>
<Control xsi:type="Button" id="dt.PhraseButton">
<!--Label for your button. resid must point to a ShortString resource -->
<Label resid="dt.PhraseButton.Label" />
<Supertip>
<!--ToolTip title. resid must point to a ShortString resource -->
<Title resid="dt.PhraseButton.Label" />
<!--ToolTip description. resid must point to a LongString resource -->
<Description resid="dt.PhraseButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="dt.PhraseButton.Icon16" />
<bt:Image size="32" resid="dt.PhraseButton.Icon32" />
<bt:Image size="80" resid="dt.PhraseButton.Icon80" />
</Icon>
<!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
<!--Look at the FunctionFile.html page for reference on how to implement the function -->
<Action xsi:type="ExecuteFunction">
<!--Name of the function to call. This function needs to exist in the global DOM namespace of the function file-->
<FunctionName>ShowDialog</FunctionName>
</Action>
</Control>
</Group>
<Group id="dt.Tab1.Group2">
<!--Label for your group. resid must point to a ShortString resource -->
<Label resid="dt.Tab1.GroupLabel2" />
<Icon>
<!-- Sample Todo: Each size needs its own icon resource or it will look distorted when resized -->
<!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
<!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
<bt:Image size="16" resid="dt.TaskpaneButton.Icon" />
<bt:Image size="32" resid="dt.TaskpaneButton.Icon" />
<bt:Image size="80" resid="dt.TaskpaneButton.Icon" />
</Icon>
<Control xsi:type="Button" id="dt.SignonButton">
<!--Label for your button. resid must point to a ShortString resource -->
<Label resid="dt.SignonButton.Label" />
<Supertip>
<!--ToolTip title. resid must point to a ShortString resource -->
<Title resid="dt.SignonButton.Label" />
<!--ToolTip description. resid must point to a LongString resource -->
<Description resid="dt.SignonButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="dt.SignonButton.Icon16" />
<bt:Image size="32" resid="dt.SignonButton.Icon32" />
<bt:Image size="80" resid="dt.SignonButton.Icon80" />
</Icon>
<!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
<!--Look at the FunctionFile.html page for reference on how to implement the function -->
<Action xsi:type="ExecuteFunction">
<!--Name of the function to call. This function needs to exist in the global DOM namespace of the function file-->
<FunctionName>OpenAccountStatus</FunctionName>
</Action>
</Control>
<Control xsi:type="Button" id="dt.SignonButton3">
<!--Label for your button. resid must point to a ShortString resource -->
<Label resid="dt.SignonButton.Label" />
<Supertip>
<!--ToolTip title. resid must point to a ShortString resource -->
<Title resid="dt.SignonButton.Label" />
<!--ToolTip description. resid must point to a LongString resource -->
<Description resid="dt.SignonButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="dt.SignonButton.Icon16" />
<bt:Image size="32" resid="dt.SignonButton.Icon32" />
<bt:Image size="80" resid="dt.SignonButton.Icon80" />
</Icon>
<!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
<!--Look at the FunctionFile.html page for reference on how to implement the function -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<!-- Provide a url resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Contoso.Taskpane.Url" />
</Action>
</Control>
</Group>
<!-- Label of your tab -->
<!-- If validating with XSD it needs to be at the end, we might change this before release -->
<Label resid="dt.Tab1.TabLabel" />
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
Related
I wrote an VXML file where first when user entered the system he listens welcome audio source, then he needs to enter a number for transferring call to the number that he entered. If a user does not enter a number so call must be transferred to operator with number 2212. But this vxml does not transfer any call, where I have made mistake and how can I fix it?
<vxml version="2.0">
<var name="number"/>
<form id="main">
<field name="phone" type="digits?length=4">
<grammar mode="dtmf" type="application/grammar+regex">[0123456789] </grammar>
<prompt bargein="false" timeout ="60">
<audio src="flash:welcome.au"/>
</prompt>
<noinput>
<transfer name="transferToOperator" dest="phone:2212">
</noinput>
<nomatch>
<transfer name="transferToOperator" dest="phone:2212">
</nomatch>
<filled>
<assign name="number" expr="phone"/>
<transfer name="transferToInputNumber" dest="phone:number">
</filled>
</field>
</form>
dest="phone:2212" may be valid for your platform, but the specification says this should be:
dest The URI of the destination (telephone, IP telephony address).
Platforms must support the tel: URL syntax described in [RFC2806] and
may support other URI-based addressing schemes.
So your attribute should be: dest="tel:2212"
You have made use mistake in your application code with wrong use of tag
See the parent - child relationship of vxml application tag here:
http://help.voxeo.com/go/help/xml.vxml.elements.overview
As per your given application code, you can do like this:
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0">
<var name="number"/>
<form id="main">
<field name="phone" type="digits?length=4">
<grammar mode="dtmf" type="application/grammar+regex">[0123456789] </grammar>
<prompt bargein="false" timeout ="60s">
<audio src="flash:welcome.au"/>
</prompt>
<noinput>
<goto nextitem="transferToOperator"/>
</noinput>
<nomatch>
<goto nextitem="transferToOperator"/>
</nomatch>
<filled>
<assign name="number" expr="phone"/>
<goto nextitem="transferToInputNumber"/>
</filled>
</field>
<transfer name="transferToOperator" dest="tel:2212">
<filled>
<disconnect/>
</filled>
</transfer>
<transfer name="transferToInputNumber" dest="tel:number">
<filled>
<disconnect/>
</filled>
</transfer>
</form>
</vxml>
When the form is initially loaded the multicombo on the form correctly reflects the data that is set up.
However, if I attempt to update the information at runtime, the list of options in the multicombo aren't updated when the form is displayed.
I have them successfully defined as form options, they have a simple 'text' only store. However, I can't seem to find the correct set of properties and method to actually update the multicombo from the C# code as needed.
I've noticed this as well. You can set the Ext.net.ListItems on page-load but they are fickle when it comes to setting them dynamically in code-behind. I now always use a Ext.net.Store with any Multicombo or ComboBox that needs to dynamically change.
You can use the Handler events on Focus or BeforeSelect to reload the list.
<ext:ComboBox ID="ComboBoxTransferGroupMembers" runat="server" FieldLabel="Transfer To" EmptyText="Group Members" LabelAlign="Top" DisplayField="Name" ValueField="Id" MarginSpec="0 0 5">
<Listeners>
<Focus Handler="#{ComboBoxTransferGroupMembers}.store.reload()" />
</Listeners>
<Store>
<ext:Store runat="server" OnReadData="StoreTransferGroupMember_ReadData" ID="StoreXferGroup">
<Model>
<ext:Model IDProperty="Id" runat="server">
<Fields>
<ext:ModelField Name="Name" />
<ext:ModelField Name="Id" />
</Fields>
</ext:Model>
</Model>
<Parameters>
<ext:StoreParameter Mode="Raw" Name="Group" Value="#{ComboBoxTransferGroup}.getValue()" />
</Parameters>
</ext:Store>
</Store>
<DirectEvents>
<Select OnEvent="ComboBoxTransferGroupMembers_Select">
<ExtraParams>
<ext:Parameter Mode="Raw" Name="Group" Value="#{ComboBoxTransferGroup}.getValue()" />
</ExtraParams>
</Select>
</DirectEvents>
</ext:ComboBox>
I am new to Adobe CQ5 version 5.6.1 and trying to learn widget creation using ExtJs, so I am doing a few examples. All I am trying to do here is show an alert box on click of a button but not getting it. Here is the code.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="cq:Dialog"
helpPath="en/cq/current/wcm/default_components.html#Title"
title="Title Component"
xtype="panel">
<items jcr:primaryType="cq:WidgetCollection">
<webcastAtAGlanceTitle
jcr:primaryType="cq:Widget"
fieldLabel="Title"
maxLength="{Long}25"
name="./webcastAtAGlanceTitle"
xtype="textfield"/>
<selection
jcr:primaryType="cq:Widget"
defaultValue="pageProp"
fieldLabel="Configuration Options"
name="./selection"
type="radio"
xtype="selection">
<options jcr:primaryType="cq:WidgetCollection">
<pageProp
jcr:primaryType="nt:unstructured"
text="Page Properties"
value="pageProp"/>
<RTE
jcr:primaryType="nt:unstructured"
text="RTE"
value="RTE"/>
</options>
</selection>
<testbutton
jcr:primaryType="cq:Widget"
autoWidth="{Boolean}true"
fieldLabel="test button"
text="Ok"
xtype="button">
<listener
jcr:primaryType="nt:unstructured"
click="function(){alert("Hello World","All set!!!");}"/>
</testbutton>
</items>
</jcr:root>
I am sure this is pretty simple to implement. Appreciate the inputs.
Thanks !
This doesn't need a listener at all. Alternatively, you can use the handler property to specify the function that needs to be called when the button is clicked.
<testbutton
jcr:primaryType="cq:Widget"
autoWidth="{Boolean}true"
fieldLabel="test button"
text="Ok"
xtype="button"
handler="function(b, e){alert('Hello!!');}" />
The b and e are the button and event objects respectively, that are passed to the handler. For further reference check this Button API.
And for the listener part, the node name has to be listeners instead of listener. That should work.
<testbutton
jcr:primaryType="cq:Widget"
autoWidth="{Boolean}true"
fieldLabel="test button"
text="Ok"
xtype="button">
<listeners
jcr:primaryType="nt:unstructured"
click="function(){alert("Hello World","All set!!!");}"/>
</testbutton>
I am looking at picking a date in Primefaces Mobile with "calendar" component:
<p:calendar value="#{bean.date}" pattern="MM/dd/yyyy HH:mm" />
The calendar pops up but it looks very odd. It overlaps the page content in a transparent way.
Is there a work around for this issue? Or a way to get it pop up correctly inside a dialog? Maybe to combine another framework with Primefaces?
By the way, the dialog seems not to work too in Primefaces Mobile.
Thanks
Primefaces Mobile is really great and is still under development but it doesn't implement Jquery mobile extensions like "datebox". I find a way to combine both. I included the jquery-datebox library in the header of a JSF page (see link):
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:pm="http://primefaces.prime.com.tr/mobile"
xmlns:p="http://primefaces.prime.com.tr/ui"
contentType="text/html">
<pm:page title="Faces">
<f:facet name="postinit">
<h:outputStylesheet library="css" name="jquery.mobile-1.0b3.min.css" />
<h:outputStylesheet library="css" name="jquery.mobile.datebox.min.css" />
<h:outputScript library="primefaces" name="mobile/mobile.js" />
<h:outputScript library="js" name="jquery.mobile.datebox.min.js" />
</f:facet>
<!-- Main View -->
<pm:view id="main" swatch="b">
<pm:header title="Hello">
<f:facet name="left">
<pm:button value="Back" icon="back" role="back"/>
</f:facet>
</pm:header>
<pm:content>
<h:form id="myform">
<h:outputText value="Input: " />
<h:inputText id="input" />
</h:form>
</pm:content>
<label for="mydate">Date: </label>
<input name="mydate" id="mydate" type="date" data-role="datebox" value="#{mybean.date}"
data-options='{"mode": "calbox"}' />
<div data-role="fieldcontain">
<label for="slider">Duration: </label>
<input type="range" name="slider" id="slider"
value="#{mybean.duration}" min="1" max="10" />
</div>
<pm:content>
<h:form id="Form">
<pm:field>
<h:outputLabel for="duration" value="duration: "/>
<pm:slider id="duration" min="1" max="10" value="#{mybean.duration}"/>
</pm:field>
</h:form>
</pm:content>
</pm:view>
</pm:page>
</f:view>
The datepicker works well but both sliders inside and outside a pm-view (see the code) are displayed like normal inputs!
Any suggestions? Thanks
PS: #administrator: a new tag is needed: "Primefaces-mobile"
How to work in Winforms Crystal Report with Object Data Source?
So far I have found web-links to use Crystal Report with DataSets or Databases directly.
Can anyone show me how to do it like this?
its the same as before...
reportDocument.SetDataSource(List1);
<CR:CrystalReportViewer ID="crvmyDataReport" runat="server"
ReportSourceID="crsmyData" EnableDatabaseLogonPrompt="False" DisplayGroupTree="False"
EnableParameterPrompt="False" ReuseParameterValuesOnRefresh="True"
BorderStyle="Solid" BorderColor="Black" BorderWidth="1px" />
<br />
<CR:CrystalReportSource ID="crsmyData" runat="server">
<Report FileName="myData.rpt">
<DataSources>
<CR:DataSourceRef DataSourceID="odsmyData" TableName="myData" />
</DataSources>
</Report>
</CR:CrystalReportSource>
<asp:ObjectDataSource ID="odsmyData" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="myDataQuery"
TypeName="myDataAppTableAdapters.myDataTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="tb1" ConvertEmptyStringToNull="False"
DbType="String" Name="p1" PropertyName="Text" />
<asp:ControlParameter ControlID="tb2" ConvertEmptyStringToNull="False"
DbType="String" Name="p2" PropertyName="Text" />
<asp:ControlParameter ControlID="tb3" ConvertEmptyStringToNull="False"
DbType="String" Name="p3" PropertyName="Text" />
<asp:ControlParameter ControlID="ddl1" ConvertEmptyStringToNull="False"
DbType="String" Name="p4" PropertyName="SelectedValue" />
</SelectParameters>
</asp:ObjectDataSource>