I've build a custom form which action redirects to a confirm page. In the controller of this page I get the POST values via $request->request->get('fieldName');
To enhance the user experience I'd like to stay on the same page as the form and add a success message to the page. I guess this can be done via AJAX? I tried to follow this guide since it kind of seems to describe what I'm trying to achieve, but I struggle to understand the custom component part. It seems this is only for the backend?
Any help would be appreciated.
The guide you shared is about the administration, if you want to add your functionality to the storefront instead you should be able to follow this guide.
For an overview of how the administration and storefront differs, you can read up the concepts behind those two areas here.
Related
I read through all the dev docs stuff at https://developers.facebook.com, but I found no simple solution to solve that one simple question. I want to display my own posts detail at my website. Is that even possible?
This is possible using IG Basic Display API and the GET /{user-id}/media endpoint
You will need to build a Login flow which is described in the Get Started guide
https://developers.facebook.com/docs/instagram-basic-display-api/getting-started
https://developers.facebook.com/docs/instagram-basic-display-api/reference/user/media
I am currently working with The SharePoint Graph API.
This is the scenario I need to achieve:
Somehow call page by name not ID
If page called my_page_name.aspx exists
update it
else
create the page
As far as I can work out, there is no update page end point in the documentation here:
https://learn.microsoft.com/en-us/graph/api/resources/search-api-overview?view=graph-rest-beta
The only thing I can think of to do it the following:
Call the page by name
delete it
create a new page with the same name with the new content I want to update
Any help on how I achieve what I need would be great
Yes, As of now we don't have any 'Update Page' endpoint feature and there is already a uservoice for this here. Please upvote this uservoice so that this feature could be developed in future. And also remember that since the pages endpoint is in beta these are subjected to change and its not recommended to use for production purpose.
So i have been struggling with this one question some time now:
How to handle details Page or deep linking on the Frontend.
So, say, we got a paged collection endpoint with user entities in it and a React App consuming the endpoint.
The flow would be, user authenticates, gets collections, clicks on an item and is either:
Redirected to a new Url say: webapp.com/users/userid
A modal opens with the user details.
Say we got a scenario were two people working with the webapp, Person 1 wants to share a link with Person 2. Person 2 should do some updates on a specific user, which is identified by the link.
The link should be something like : https://www.webapp.com/users/{slug or id}
With Option 2 this functionality is not mappable.
With Option 1 we got to expose the ids in the response to identify the resource, which may work, but we would still need to hardcode the url, as the findById method is not exported as a Uri Template.
So, my Solution would be to add a slug for the resources, implement a search method by the slug, and then get the user, if found, by its self-link.
Sounds like a good solution for me, but on the other hand, I would have to add an extra frontend id(the slug here) which would need to be also unique, to the database model.
So how do you guys handle a problem like this, or is there anybody using spring data rest in this way or in production mode where you have the handle situations like this?
Should mention that this isn’t a primary problem with spring data rest but rather with hateoas itself.
thanks in advance
Florian
You don't need to hardcode URL template. Spring data rest will generate links for each resource.
You can refer to it from front end by some format like: {your_user_object}._links.self.href
I'd like to be able to post link posts on a blog exactly the same way as if you were to go on the regular user interface and choose a "link" post and paste in a URL. It automatically grabs the image, sizes it, sets the title and a body/caption.
How do I go about doing this with the tumblr.js api wrapper?
I already have the API working so I do not need to know how to connect/post link articles. I am specifically interested in being able to add link posts that look/work exactly like the link posts you make as a regular user on their web interface. Using the API to do a link post just throws in the title. Using a photo post doesn't allow you to do a separate title/body. I'd love it to look like it does on the website when you paste in a link post and have the tumblr api/feed return it the same way too.
I got a response via github issues that explains that what I was attempting to accomplish is not available via the API. It can only be done using a tumblr client.
https://github.com/tumblr/tumblr.js/issues/41#issuecomment-135588952
I have a requirement where the portal application that is being developed in jsf 1.2 and spring 2.5 will be launched from within an ipad app. After the user logs into the ipad app, the user click on the portal link available and the ipad app in turn will be passing the user credentials through a get request url which i will have to validate and redirect them to home.xhtml page if the validation is successful else i will have to redirect them to error page. I have been searching in google a lot to see how this can be implemented. Finally i found that it requires a phase listener to implement this but I am not sure how this can be done or if there is any other way. Please tell me how can this be done using phase listener (if possible with an example). Also suggest me if i can use any other means to do this. Any help is much appreciated.
Thanks in advance.
I found a way to implement this. I am giving the solution that i used so that it might help some one else.
I am using a servlet filter to get the parameters from the URL and then i am validating the credentials with the data stored in the DB. Then if the credentials are valid i am redirecting the user to the home page. If the credentials are invalid then i am redirecting the user to error page. Done.