In my Person components in my React application, I would like to add links on the names of the people it renders.
I.e. when the displayName is clicked on, the user is sent to the profile page in Delve of the person it clicked on. For example https://contoso-my.sharepoint.com/_layouts/15/me.aspx/?mail#contoso.com
I was actually hoping this was a setting on the component or similar, but I see that it's not. Is it possible to achieve this using a template?
I have already set up atemplate, referring to my other thread here: Working example for Graph Toolkit using SharePoint spfx, React and Get component with template.
Please advise.
Related
I'm currently implementing a favorites feature on a website and am planning how best to design this feature in React. I am quite new to React.
On the website there is a left side nav bar. This side bar contains links and also has a dedicated section for 'favorite' projects.
To the right of the nav bar there is the main section. One of the views in this section is a list of projects a user has created. There will be a grey colored star (think of gmail) that users can click on which then makes the project a favorite. When the star is clicked it turns yellow, the database is updated, and you will see it appear in the left nav bar.
So a few questions about this React design:
How to identify projects that have been previously chosen as a favorite?
Should I have the project list database query identify favorites (id=2, favorite=true)?
I will have 2 sets of React props/state, one for favorites, one for the projects list, should I use the favorites to look for a match as I loop through the main projects list?
How to design the component structure?
I suppose that the decision in question 1 might help decide this?
Should the state of both the favorites list and projects list be held in a parent component 1 state in the favorites component and 1 state in the project list page component (however if it's the latter I don't think I can compare the two?)
Hopefully I'm asking this question in a clear manner and as you can see I'm looking for a best practice of how to design the components and where/how to store the project info of both favorites and list of projects on the main page.
Thanks.
I think it is better to use Redux to implement the favorite feature.
Please reference the below URL.
http://react-material.fusetheme.com/apps/contacts/starred
You can dispatch action like below.
This is the action.
This is the api.
The starred contact is added or removed here.
I hope this will help you to design the component.
Am new to Adobe Experience Manager. Your input on below question is highly appreciated!
All I am trying to do is: Refresh author page after making an update to AEM component. The component is built with React.
Open the component dialog
Change the value (for ex: Label)
Click done from dialog
Am expecting author page to load automatically
Please share your inputs. Thanks a lot!
The component doesn't refresh the entire page on save unless you explicitly configure it to. You can probably make use of the cq:editConfig for that. The cq:editConfig needs to have a child node cq:listeners with the property afteredit. Sample structure below
Some info around the edit config can be found in this blogpost.
Currently the list component just shows all items (links) but I'm trying to find a way to hide a certain links, based on the logged in user role.
It seems that [Plugin:Equals] and [Plugin:NotEquals] tags allow us to conditionally show/hide the links, so I think this is probably the approach can try. But when it comes to getting the user access role/group info, I feel a bit stuck.
For now, I am only able to find the following fields that are available for use:
${wp.user.cn}
${wp.user.sn}
${wp.user.uid}
${wp.user.preferredLanguage}
And the online document doesn't say much either. https://www.ibm.com/support/knowledgecenter/SSYJ99_8.5.0/dev-theme/themeopt_el_bean_user.html
So is it possible to get the assigned user access group via wp.user? Or perhaps there are other ways to show/hide the links in the list component?
Not via wp.user you would need to use the access control model, but would be better using the attribute based security
WCM Security will hide any links the current user doesn't have access to - be it a Site Area, Content Item / Link. Check your security on the objects which shouldn't be showing. You'll most likely find you haven't restricted access.
To run analytics javascript on every salesforce page I want to insert Javascript in every page.
So far I read about a couple of different methods:
home page component
a HTML Home page component (need to customize UI to show the components on every page)
limitations: does not work for Chatter, Reports and Setup
possible issue: these comments indicate problems with 'winter 13'
Custom Button with Javascript
(don't know much about this yet) sound like one has to create/assign the buttons to object-types)
Custom APEX controller?
How would this work?
Visualforce page ??
How would this work?
To my understanding it would be possible to replace everything with visualforce pages, but this is obviously not very elegant/maintainable.
I'm curious to see what other methods there are, in partciular by modifying the controller?
What other things to consider (downsides, risks) with the presented methods?
Sidebar component sounds best suited for that to be honest.
Any button/link you'll add to object detail pages will both require clicking on it(!) and won't work on "tab view", "new record" or "edit" pages. You could override most of them with VF pages but that's A LOT of work and there's no way you'll be able to customize UI of these special places: Chatter, Console tab, Reports,Dashboard.
I'm not sure what do you mean by "modifying the controller", there's no such global thing you'd have access to.
There's option of embedding a small VF page into page layout of every detail page but it's equally limited in terms of maintenance and not being present on the new/edit pages.
There are better analytics options for Force.com Sites (not the least of them being the <site:googleAnalyticsTracking/> tag). You should also receive a monthly newsletter (typically with 2-3 month's delay) summarizing usage of your Salesforce instance, user adoption, areas to explore etc. If you don't - check your User's "receive salesforce newsletter" etc settings.
how to display dashboard using visual force page in sales force.please let me know.
No, at this point there is no builtin component to show a dashboard in VF page. You essentially have two alternatives:
Do your own visualization, I found extJS of great help and I think some people use jQuery Flot plugin for some basic visualisation
A hack, every dashboard has a unique URL, something like https://naX.salesforce.com/01Z700000xxxxx, just create a visual container like iframe or such and reference the content from that URL