Excel Add-in for custom ribbon tab to include controls from MSIP.ExcelAddin - excel-addins

I'm trying to build an Excel add-in too distribute a company specific tab for the Ribbon.
In the ribbon I want to include the Sensitivity-control from office365 Sensitivity app (MSIP.ExcelAddin). It seems like this come both as a regular MS add-in, with mso-controls, and as a 3rd party add-in, with x1-controls.
I can successfully build and distribute a custom ribbon using the built in Ribbon-customizer, *.exportedUI file, I can user either the group or the control from of the 3rd party add-in.
The MSO-version doesn't works, that is also the case in the original Home-tab.
<mso:cmd app="Excel" dt="0"/>
<mso:customUI xmlns:x1="MSIP.ExcelAddin" xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">
<mso:ribbon>
<mso:tabs>
<mso:tab id="mso_c1.CD9101F" label="3rd Party Tab" insertBeforeQ="mso:TabInsert">
<mso:group idQ="x1:adxRibbonGroup_f46a9e941d544d01ad8b43917c503243"/>
<mso:group id="mso_c2.CD9101F" label="My Group" autoScale="true">
<mso:control idQ="x1:adxRibbonMenu_b0e02808fb2f409f90503955cef756aa" visible="true"/>
</mso:group>
</mso:tab>
<mso:tab id="mso_c3.CD96023" label="MSO Tab" insertBeforeQ="mso:TabInsert">
<mso:group idQ="mso:GroupClassifyLabelProtect"/>
<mso:group id="mso_c4.CD96033" label="My Group" autoScale="true">
<mso:control idQ="mso:ClassifyLabelProtect" visible="true"/>
</mso:group>
</mso:tab>
</mso:tabs>
</mso:ribbon>
</mso:customUI>
However, when doing the same in my add-in project i can't get it to work.
<customUI xmlns:x1="MSIP.ExcelAddin" xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon>
<tabs>
<tab id="mso_c1.CD9101F" label="3rd Party Tab" insertBeforeMso="TabInsert">
<group idQ="x1:adxRibbonGroup_f46a9e941d544d01ad8b43917c503243"/>
<group id="mso_c2.CD9101F" label="My Group" autoScale="true">
<control idQ="x1:adxRibbonMenu_b0e02808fb2f409f90503955cef756aa" visible="true"/>
</group>
</tab>
<tab id="mso_c3.CD96023" label="MSO Tab" insertBeforeMso="TabInsert">
<group idMso="GroupClassifyLabelProtect"/>
<group id="mso_c4.CD96033" label="My Group" autoScale="true">
<control idMso="ClassifyLabelProtect" visible="true"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
In the first Tab, holding the 3rd Party Controls I get an empty tab.
The second Tab shows only the single and inactive control in My Group.
Do I do something wrong when defining or referencing the namespace for the 3rd party add-in?

You can place your custom ribbon UI into a custom tab or group by specifying the namespace. The key is specifying the same unique namespace in the <customUI> tag. Then, controls can reference this namespace by using idQ. The idQ property of controls exists to enable multiple add-ins to share containers, such as custom tabs and groups, but not placing custom controls from other add-ins into yours.
BTW Do you get any UI errors in the Office application?
By default, if an add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom ribbon does not appear, or why a ribbon appears but no controls appear. Read more about that in the How to: Show Add-in user interface errors article.

Related

eclipse plugin issue with welcome screen

I have written a eclipse plugin which will customize the eclipse welcome screen.
Below is the xml
> <?xml version="1.0" encoding="utf-8" ?> <introContent>
> <extensionContent id="comregistrationplugin-introExtension"
> style="css/sample.css" name="Sample Extension" path="overview/#">
> <group style-id="content-group"
> id="comregistrationplugin-introLink-group">
> <link label="Registration/Signup" url="" id="comregistrationplugin-introLink" style-id="content-link">
> <text>Click here to login.</text>
> </link>
> </group> </extensionContent> </introContent>
Once I click on the link, it opens up the url specified on the link in the web browser.
The url that I use is a sso url which will open up a login page . Once the user provides the email address the user will be logged in and and the api will return a response.
I need a way to capture the response without showing the response on the users browser. For ex, once the response is received I need a way to capture the response in the plugin and show a generic success message on the users browser.
Or is there a way to read the cookie once the login succeeds ?
You might be able to find the corresponding editor, and grovel through it to find the Browser and install your own listener. But you might be better off creating your own browser instance, either through a dialog or as a separate editor, so you can control the setup. I implemented something like this for the Eclipse User Storage Service.

How to automatically load a report on home page after logged in Jasper Server Community

In Jasper Server Community Edition, I want to load a report automatically without clicking on any report when I logging. I tried to add below code to home.jsp page as jasperSoft documentation says.but it is not working.
Please help me with this.
Code that I added to home.jsp :-
<%
<authz:authorize ifAllGranted="ROLE_REPORT_HOME">
<c:redirect
url="http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2Freports&reportUnit=%2Freports%2FSample_Dash_Report&standAlone=true"/>
</authz:authorize>
%>
Please make sure to follow all the steps in the tutorial, as you probably missed to add user role to the user you want. Also, make sure to have sample data as you're referencing report from sample data.
Setting a report as the home page:
The following example shows how to set a report as the home page based on a role. This example uses the 01. Geographic Results by Segment Report.
First, set up the role and create a sample user:
a. Create the role you want to use, for example, ROLE_REPORT_HOME.
b. Create a user HomeUser and add ROLE_REPORT_HOME to HomeUser.
Open the file \WEB-INF\jsp\modules\home\home.jsp in an editor and add the following lines:
<authz:authorize ifAllGranted="ROLE_REPORT_HOME">
<c:redirecturl="http://localhost:8080/jasperserver-pro-601/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Fpublic%2FSamples%2FReports&reportUnit=%2Fpublic%2FSamples%2FReports%2F01._Geographic_Results_by_Segment_Report"/>
</authz:authorize>
To find the URI for the report you want to use, open the report in the repository and copy the URI.
Save the modified file and restart the application server to see changes.
Log into JasperReports Server as HomeUser. The library page is displayed.
Go to Jasper server installation directory and search for jasperserver-servlet.xml (C:\Jaspersoft\jasperreports-server-cp-6.4.2\apache-tomcat\webapps\jasperserver\WEB-INF\jasperserver-servlet.xml)
Under bean id = "homePageByRole" we have to make changes. For that, search homePageByRole word inside the jasperserver-servlet.xml file.
Under tag ,we can give a report link we need according to the user roles. But make sure you should add amp; as after each & mark. Otherwise it will give an error!
Example:-
Original report link from the address bar in browser when report opened using jasper server is;
http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2FMy_Reports&reportUnit=%2FMy_Reports%2FDashboard_Report_Landscape&standAlone=true
But the link we should put under is;
ROLE_USER|redirect:/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2FMy_Reports&reportUnit=%2FMy_Reports%2FDashboard_Report_Landscape&standAlone=true
check how we add as amp; after every & mark. Also we can set user role. In my case I set user role as ROLE_USER.
Whole code snippet is;
<bean id="homePageByRole" class="java.util.ArrayList">
<constructor-arg index="0" type="java.util.Collection">
<list>
<value>ROLE_ADMINISTRATOR|redirect:/flow.html?_flowId=searchFlow</value>
<value>ROLE_USER|redirect:/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2FMy_Reports&reportUnit=%2FMy_Reports%2FDashboard_Report_Landscape&standAlone=true</value>
</list>
</constructor-arg>
</bean>

Open minicart box after click addtocart button

I have to open minicart box after addtocart button click. Is it possible to using section.xml? Anyone know about sections.xml usage in magento2?
What are exactly those sections?
A section is a piece of customer data grouped together. Each section is represented by the key that is used to access and manage data and data itself. Magento loads sections by AJAX request to /customer/section/load/ and caches loaded data in the browser local storage under the key mage-cache-storage. Magento tracks when some section is changed and load updated section automatically.
How do you define a section?
A section defined in di.xml file by adding a new section into sections pool
<type name="Magento\Customer\CustomerData\SectionPoolInterface">
<arguments>
<argument name="sectionSourceMap" xsi:type="array">
<item name="cart" xsi:type="string">Magento\Checkout\CustomerData\Cart</item>
<item name="directory-data" xsi:type="string">Magento\Checkout\CustomerData\DirectoryData</item>
</argument>
</arguments>
So here two new sections are registered cart and directory-data. Magento\Checkout\CustomerData\Cart and Magento\Checkout\CustomerData\DirectoryData implements Magento\Customer\CustomerData\SectionSourceInterface and provides actual data as result of getSectionData method.
How are the section updates triggered?
Magento assumes that customer's private data is changed when a customer sends some state modification requests (POST, PUT, DELETE). To minimize the load on the server, developers should specify which action (or request) updates which customer data section in etc/section.xml.
<action name="checkout/cart/add">
<section name="cart"/>
</action>
Action name is an action key pattern. When a user calls to action that matches specified pattern Magento will detect that the corresponding section is outdated and loads it again. If the action name is * that means that section will be updated on each POST and PUT request. If section tag is missed then all sections will be updated.
So conceptually this is wrong to update mini cart when you rich cart page. At this point, the mini cart (or cart section) already should be updated.
You can find more information about Customer Data here
There is already a full-fledged free extension available on Magento's marketplace and Github
magento: https://marketplace.magento.com/ambab-module-slidingcart.html
Github: https://github.com/ambab-infotech/slidingcart
This might help someone.
Reference URL: https://roshanyadav007.wordpress.com/2020/01/24/sliding-cart-extension-for-magento-2-magento-2-3-x/

How to configure "accept Terms and Conditions" on Keycloak registration page

I use Keycloak 1.7.0-Final. The user must agree with Term and Conditions at registration.
I enabled "Terms and Conditions" in Authentication > Required actions, But nothing is shown on the registration page.
Also, I cannot find where to configure specific Terms and Condition files for each language.
Could you help?
Thank you.
By default existing users cannot have this page. You need to configure "Terms and Conditions" as "Default Action", then this will be applied by default for all new users.
For existing users, you need to put it manually unser "Users" > "Required actions".
Dont forget to customize the terms page under //themes/base/login/terms.ftl
You will see terms and conditions once the user has filled in the registration form and submits registration. You will have to override the terms.ftl (build your own theme) page if you want it customized and add your own messages locale - see Keycloak Docs - Themes ...
Enable terms and conditions
Regularly you must enable "Terms and Conditions" in Authentication > Required Actions as Enabled and Default Action. By default, this will show a dedicated page after the registration form page, using the template terms.ftl.
Using a checkbox for accepting terms and conditions in the registration page
For this purpose you must specify terms and conditions as Enabled, but not a Default Action. Otherwise you will see the dedicated page using terms.ftl. The problem here is that Keycloak has not a way to enable a checkbox to accept the terms and conditions in the registration page.
Nonetheless, doing a little of reverse engineering I found that when you accept the conditions the user will have an attribute called terms_and_conditions:
In order to reproduce this, you just need to create a custom attribute, named terms_and_conditions, with a numeric value, that seems to be the current time (Date.now()). Being that said, you need an HTML like:
<form>
<!-- other inputs -->
<div>
<input
type="checkbox"
id="terms"
name="user.attributes.terms_and_conditions"
value="<generated value, e.g. 1668029792010>" />
<label for="terms">I accept the terms and conditions</label>
</div>
<div>
<button type="submit">Create user</button>
</div>
</form>
This approach should also be valid if you create that user using the API.
i18n
If your are using a checkbox in the registration page, you can use the standard internationalisation strategy: using the messages properties files. It would probably have a link that reference the content of the "terms and conditions" in the current language. To get the lang code to construct the URL use ${locale.currentLanguageTag}.
Show a page for each language
On the other hand, if you want to use the typical Keycloak strategy using terms.ftl, then you must use the same layout as always and the text will change using the internationalisation.
But if the content of the terms and conditions is very long, then it should be better to create pages for each language, e.g. terms-en.ftl, terms-fr.ftl, etc. These ftl files will only contain the content in the corresponding language and they will be loaded using a code like:
<#include "terms-fr.ftl" />
e.g.
<#if (locale.currentLanguageTag!"en") == "en">
<#include "terms-en.ftl" />
<#else>
<#include "terms-es.ftl" />
</#if>
I hope this helps
You can use Keycloakify to create a theme.
Here is the section related to customizing Terms and conditions.

How do I remove "Remember my changes" on tableau toolbar?

I managed to remove "share" functionality using serverside script
using
tabadmin set vizqlserver.showshare false
Manual:
http://downloads.tableausoftware.com/quickstart/server-guides/en-us/server_admin7.0.pdf
:customViews=n on your URL or
<parameter name="customViews" value="n" />
in your object definition will also get you there without having to turn things off globally.