I want to implement Paytm payment gateway, I have a payWithPaytm button. On paytm documentation there is this method which has to be executed. On click of button, how to call this method from AngularJs. I am using ionic1.
I can think of one option i.e. to override
shouldOverrideUrlLoading(WebView view, String url)
above method. Is there any other way I can achieve this, I am newbie in android development.
I found answers on google like this but they are using layout file to create the buttons and attaching on click method on this but I have html and angularJs.
Related
Actually when i click login button then it goes to http://localhost:8080/login/auth page and i am not finding any auth.gsp to edit the template of login model.I have used spring security and how to change it??
You can override auth.gsp by creating your own as /views/login/auth.gsp
Also see this useful tutorial.
I have an iframe inside a jsp which is for processing payment using a third party payment provider.
When I get the response from payment provider, I use another jsp file just for breaking out of iframe (using javascript, as I could not find anything to do this in jsp, and probably there is no such way to do it in jsp AFAIK).
Now, the problem for me is the error scenario. When I receive some error from the payment provider, I want to display that on top of the page where I am redirecting to after breaking from iframe.
We use flash attributes for dispalying the error messages while doing redirect from spring mvc using redirect:.
But I am not sure how to do that when using a browser redirect.
One solution (Post/Redirect/Get pattern) I could think of is to append the error respone in the url which I am using in the redirect from breaking out of iframe.
But this would require changes to our jstl tag files and that will be different from the design of our existing code.
Can anyone point me to some better solution for this?
I ended up using session variable.
So just added a session variable in controller, and before the view was passed on from the last controller, copied the session variable into the redirect flash attributes and then it worked. I know this may not sound good enough, but that's how I had to make it work.
I have to work with Liferay in work atm, and absolutely new to that (shit).
I successfully created a custom hook I can call via http://localhost:8080/c/portal/myhookname
and it shows me what I wanted to reach with my Action.
The problem now is, when I call this path, I have to login first to get the content.
But later a machine will call this path, and it doesn't matter if the person calling this path is a guest or something else.
So I tried to find something, to give access for everybody on this hook.
The BlablaAction.java is extending from BaseStrutsAction and returns the jsp in it's execute method.
Please somebody can help me.
You can use portal property auth.public.paths to allow public access to custom struts path.
auth.public.paths=/portal/myhookname
You can override/extend this portal property in plugin-hook itself. Refer to link
I am working on a spring web MVC project with Thymeleaf integrated for presentation layer. I need to pass data to a fragment on the page displayed after log in successful which I am redirected according to spring security configuration.
Has anyone found a way to pass data to a page right after log in successful or to a fragment from the controller?
So essentially wha i have done is create a /succes_login that gets called and then renders fragment as per here: http://www.thymeleaf.org/whatsnew21.html#spfrag
Hope that helps, let me know and i'll investigate further.
I am brand new to Spring web MVC. I am trying to create a simple 1 paged site that will check the users browser and display the current theme for that browser.
If its a mobile app, I need to allow the user a button to switch to the regular site.
Also the current theme for mobile and non-mobile is stored in a database, which includes the start date, end date and the theme name. The theme name is the folder where the theme's resources are located.
Being a beginner I have never used themeresolver.
Your help is much appreciated.
ThemeResolver is reasonably straightforward to implement.
You won't be using the setThemeName() method, so have it throw an UnsupportedOperationException. Your resolveThemeName() method would:
Get "User-Agent" request header and determine the appropriate theme.
Run a DB query (you may want to cache this).
Return theme name.
You'll then need to declare your implementation under 'themeResolver' name in your application context.