.webpart file EmptyMessage Property changes not reflecting - sharepoint

we are facing an issue where a custom webpart is alreay deployed in sharepoint and when we are trying to update its EmptyMessage Property and redeploying it, its not reflecting in UI,however, we can see the .webpart file has updated with new value. here is the code snippet of .webpart file
<property name="TitleUrl" type="string" />
<property name="EmptyMessage" type="string">Currently there are no features available. Please check back.</property>
<property name="ShowBestBets" type="bool">True</property>
<property name="ShowViewDuplicates" type="bool">True</property>
<property name="AllowHide" type="bool">False</property>
We're using ctx.ClientControl.get_emptyMessage() to read this property value.

This is by design.
[filename].webpart is just a template for web part instances in the pages. Existing pages save their web part parameters once the web parts are added in the pages. Web part properties in a particular page have no link back to the .webpart file.

Related

How to get only List of all properties of User through Graph API

I am working on CRUD operation of User on Azure AD. I will use Java to handle it.
My requirement is I want one Graph API reference or any other utility through which I will get list of Users all properties like 'accountEnabled', 'displayName', 'mailNickname', 'userPrincipalName' ,'passwordProfile' .... there are so many.
I am trying to get from below API:
https://graph.microsoft.com/v1.0/$metadata
But here, I am getting huge data in which User properties are also present.
Below is piece of response from above API:
<EntityType Name="user" BaseType="microsoft.graph.directoryObject" OpenType="true">
<Property Name="accountEnabled" Type="Edm.Boolean" />
<Property Name="ageGroup" Type="Edm.String" />
<Property Name="assignedLicenses" Type="Collection(microsoft.graph.assignedLicense)" Nullable="false" />
<Property Name="assignedPlans" Type="Collection(microsoft.graph.assignedPlan)" Nullable="false" />
<Property Name="businessPhones" Type="Collection(Edm.String)" Nullable="false" />
<Property Name="city" Type="Edm.String" />
likewise there are so many tags
Can anyone know how to get it?
Any help is much appreciated!!
The $metadata document has a list of all entities like users and groups and I don't think there's a way to scope it down to just users. If you're not interested in parsing it, maybe look at the Graph SDK and use reflection? The SDKs are generated from the Graph metadata so for example the Java SDK has all these properties on the User class - https://github.com/microsoftgraph/msgraph-sdk-java/blob/dev/src/main/java/com/microsoft/graph/models/generated/BaseUser.java#L201
You can check the microsoft graph github organization page for SDKs in other languages.

How to access Backoffice in Junit Tenant

We can access HMC in JUnit tenant by hitting the below URL
https://localhost:9002/hmc_junit/hybris
which is defined in tenant_junit.properties like this hmc.webroot=/hmc_junit
But I havn't seen anywhere URL to access Backoffice in JUnit Tenant.
Can anybody help me please to access Backoffice in JUnit Tenant ?
I was looking for it everywhere as well, couldn't find any documentation in the wiki... It doesn't seem to be officially supported but here is what I found.
Under Hybris 6.3 there is no junit context path for the backoffice application. Here is how you could add one :
Create a file named : local_tenant_junit.properties under your configuration folder, it should contain :
backoffice.webroot=/backoffice_junit
Create a file for customization inside your config folder customize/ext-backoffice/backoffice/web/webroot/WEB-INF/backoffice-spring-filter.xml. Copy the content of the original file and update the backofficeFilterChain bean. We want to use the dynamicTenantActivationFilter instead of the tenantActivationFilter) :
<bean id="backofficeFilterChain" class="de.hybris.platform.servicelayer.web.PlatformFilterChain">
<constructor-arg>
<list>
<ref bean="log4jFilter"/>
<ref bean="dynamicTenantActivationFilter"/>
<ref bean="backofficeRedirectFilter"/>
<ref bean="sessionFilter"/>
<ref bean="backofficeDataSourceSwitchingFilter"/>
<ref bean="backofficeCatalogVersionActivationFilter"/>
<ref bean="backofficeContextClassloaderFilter"/>
<ref bean="backofficeSecureMediaFilter" />
</list>
</constructor-arg>
Execute ant clean all customize
Check that in bin/platform/tomcat/conf/server.xml you now have a new context backoffice_junit
Start your server, you can now access the backoffice application for master and junit tenant
For Hybris 6.7, to me the following steps were sufficient:
in config/local_tenant_junit.properties , add
backoffice.webroot=/backoffice_junit
ant server
this puts the endpoint into ${tomcat.webapps} in server.xml template resulting in:
<Context path="/backoffice_junit"...
being added to your bin/platform/tomcat/conf/server.xml
Then when you open https://localhost:9002/backoffice_junit , the DataSourceSwitchingFilter gets current tenant from a ThreadLocal and activates its dataSource.
Config values inside the junit local properties that worked for me:
backoffice.library.home=${data.home}/junit
backoffice.webroot=/junit_backoffice
For more info see:
https://help.sap.com/viewer/5c9ea0c629214e42b727bf08800d8dfa/1811/en-US/c7e1bf2832414c8ea15c001d5cf1defd.html

Hybris HAC Update Scenario

I wrote an interceptor in one of my projects to intercept all the requests. So usually in a spring project i will do normal build and start the server and my changes related to an interceptor will start reflecting. However this doesn't seem to be the case with a hybris project.
Do I need to do update in hybris hac as well? And if I do then out of the available below mentioned options which options do i need to choose and why.
1. Update running system
2. Clear the hMC configuration from the database
3. Create essential data
4. Localize types
Thanks,
Ashish
To answer the second part of your question, I have listed at least one reason for selecting each type of options. Hope this helps.
Update running system - Required when hybris type definition changes. For example, changing the content of file <extnesion-name>-items.xml
Clear the hMC configuration from the database - If you have chosen to persist hmc configuration in the Database and changing it. For example, changing content in the file hmc.xml
Create essential data - If there is a change in the content in the impex files which follows the naming pattern of essentialdata*.impex.
Localize types - If there is a change in the properties files for localizations. for example changing the content in file <extension-name>-locales_en.properties
Assuming you've not made any changes to any underlying data objects (Jalo items) then you won't need to run an update in the hybris hAC.
You should just be able to make your changes, run ant clean all from the platform and then start up the hybris ECP instance and your changes will be visible.
If this is a normal Spring MVC interceptor, then it should work fine.
Have you checked your spring configuration in the storefront extension you are working from?
For example, take a look at the accelerator Spring MVC configuration file:
hybris/bin/ext-template/yacceleratorstorefront/web/webroot/WEB-INF/config/spring-mvc-config.xml
This has some examples where this is used out-of-the-box:
<mvc:interceptors>
<ref bean="beforeControllerHandlerInterceptor" />
<ref bean="beforeViewHandlerInterceptor" />
<ref bean="csrfHandlerInterceptor" />
</mvc:interceptors>
As an example, the default before controller handler interceptor is defined as:
<!-- Interceptor that runs once per request and before the controller handler method is called -->
<alias name="defaultBeforeControllerHandlerInterceptor" alias="beforeControllerHandlerInterceptor" />
<bean id="defaultBeforeControllerHandlerInterceptor" class="de.hybris.platform.yacceleratorstorefront.interceptors.BeforeControllerHandlerInterceptor" >
<property name="beforeControllerHandlers">
<ref bean="beforeControllerHandlersList" />
</property>
</bean>
which references:
<alias name="defaultBeforeControllerHandlersList" alias="beforeControllerHandlersList" />
<util:list id="defaultBeforeControllerHandlersList" >
<!-- List of handlers to run -->
<bean class="de.hybris.platform.yacceleratorstorefront.interceptors.beforecontroller.SecurityUserCheckBeforeControllerHandler" />
<bean class="de.hybris.platform.yacceleratorstorefront.interceptors.beforecontroller.RequireHardLoginBeforeControllerHandler" >
<property name="userService" ref="userService"/>
<property name="redirectStrategy" ref="redirectStrategy"/>
...
</bean>
<bean class="de.hybris.platform.yacceleratorstorefront.interceptors.beforecontroller.DeviceDetectionBeforeControllerHandler" />
...
</util:list>
So you could either override this using the alias with your own implementation, or add additional controller handlers to the list.
As there is no change to the underlying data model - this is just wiring up Spring MVC related classes - no need for an update system or anything like that. Just an 'ant clean all' to recompile to pick up your new interceptor classes, and server restart to pick up the change in the Spring cornfiguraton.

How to REpublish Custom Task Forms (InfoPath) to SharePoint 2010 State Machine Workflows

I am new to SharePoint. Sorry if answer to my question is obvious.
I've create Custom Task Form in InfoPath and publish it (File/Publish/Network Location [Form Template Path and filename='MYPROJECT/Forms/ApprovalForm.xsn'; Form template name='ApprovalForm'], in the next window I've cleared Public URL according to the article http://www.codeproject.com/Articles/195348/SharePoint-2010-State-Machine-Workflows-with-Custo).
After it I've added module Forms, and added ApprovalForm.xsn from the existing items.
My xml files:
Elements.xml
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Workflow
Name="Order New Server"
Description="My SharePoint Workflow"
Id="482cbc86-b717-4981-a49a-3cf4c89e9399"
CodeBesideClass="Myproj.OrderNewServer.OrderNewServer"
CodeBesideAssembly="$assemblyname$"
TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160">
<Categories/>
<AssociationData><Data></Data></AssociationData>
<MetaData>
<AssociationCategories>List</AssociationCategories>
<Task2_FormURN>urn:schemas-microsoft-com:office:infopath:ApprovalForm:-myXSD-2012-03-09T14-11-55</Task2_FormURN>
<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
</MetaData>
</Workflow>
</Elements>
Feature.Template.xml:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Receiverlass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver">
<Properties>
<Property Key="GloballyAvailable" Value="true" />
<Property Key="RegisterForms" Value="Forms\*.xsn"/>
</Properties>
</Feature>
My form work fine, but when I make changes and republish it, it doesn't update (I see old form).
What I tryed:
IISReset
Clear all cookies and cache in IE
Retract solution, restart VS2010, reboot computer.
Change assembly number, guid.
I have no ideas, what can I try for republish my form with changes.
Thank you in advance for any suggestions.
PS: sorry for my writing. English is not my native language.
PPS: when I save new Form to new location and add it to the project, it works.
I've found how can I republish changes. But it seems more like crutch than solution, but it works: After republishing InfoPath form, I delete file from project (DEL on ApprovalForm.xsn in Solution explorer) and after it add it again. (Add/Existing Item). And then redeploy! Hurray!

MOSS Minimal Publishing Site Definition

I'm using the MOSS Minimal Publishing Site Definition from codeplex.
I want to change the default.aspx page to be a publishing page by default, rather than a WSS page as it is currently in this site definition.
Is that possible?
To implement this in the web UI:
You need to create a new page within your publishing site, and then set that page as the 'Welcome' page within Site Settings.
Essentially this will overide the default.aspx and use your new publishing page as the initial opening page for your site.
To implement this for a site definintion:
You need to create a feature which deploys an instance of your initial page to the pages library and then sets the welcome page using the object model (probably using a FeatureReceiver).
More info on how to do this here:
http://www.devexpertise.com/2009/02/02/setting-the-welcome-page-in-wss-30/
You can use the following also (the example is with FeatureStapling):
<!-- Publishing feature -->
<FeatureSiteTemplateAssociation Id="22A9EF51-737B-4ff2-9346-694633FE4416" TemplateName="TEMPLATENAME#NUMBER">
<Property Key="ChromeMasterUrl" Value="~SiteCollection/_catalogs/masterpage/YOURMASTERPAGE.master"/>
<Property Key="WelcomePageUrl" Value="YOURDEFAULTPAGE.aspx"/>
<Property Key="PagesListUrl" Value=""/>
<Property Key="AvailableWebTemplates" Value="ALLOWED_TEMPLATES"/>
<Property Key="AvailablePageLayouts" Value="PAGELAYOUTS"/>
<Property Key="AlternateCssUrl" Value="" />
<Property Key="SimplePublishing" Value="true" />
</FeatureSiteTemplateAssociation>

Resources