Location filter removal from super user and not from admin user - find

I have to remove location filter in super class but it should be present in admin class the data inside location filter i have commented it for super and its working fine but border and location parameter name is common for both how to make it visible only for admin page in gsp

Related

In SailsJS, how do I check in a view partial that a route is active

I have a set of links in a partial that i'd want to change visually depending if the route they go to is active.
Is there a way to check if a route is active from the view?
If I understand correctly, it sounds like you're just looking to see which URL was requested?
The req object, which holds information about the current request, is available as a local variable in all views. So inside your view you can check req.url to determine which URL the user requested. If the view was rendered via a controller using res.view (rather than being rendered directly as a result of a view route), you can also check which controller/action was run by looking at req.options.controller and req.options.action. See the docs on req.options for more info.

How to hook GWT navigation from a userscript?

I'm writing a userscript for a GWT-based site.
My script uses URL of the page as input. It should be update each page of the site with additional information.
Unfortunately, as view changes in GWT are implemented via rerendering (only location anchor in browser address-bar is being changed), clicks on internal links are not recognized as page loads and Greasemonkey does not invoke my script, leaving new views unmodified.
Is there a way to hook in GWT-based navigation from an userscript? I need a way to modify each "change" Gerrit navigates to.
Complete workflow should look like:
User scans through the list of issues
User clicks on a link . (Address bar will assume a location of a change being clicked, for example https://git.eclipse.org/r/#/c/38781/)
Page is modified by userscript to contain information about new view (in our case /c/38781/)
Greasemonkey is only invoked at the first step of this workflow, and I don't know ho to detect second one to be able to trigger the third.
I've tried to observe DOM changes on the page, but my listeners are never called probably due to the fact GWT renders some parts via innerHTML property, without explicit child manipulation.

setting menu item property from another form in oracle

good day, i am working on a system using Oracle Forms Builder. i have 3 forms, MAIN, LOGIN, and REGISTER and a menu form named MENU_MAIN, it is attached to the 3 forms, the first form that will be shown is the MAIN, i made some buttons disabled because the user cant access unless they are registered and login, now my problem is, after they login they are prompted again to the MAIN and i need the button that is disabled to be enabled, how can i do that? am i gonna put the code on the LOGIN? thanks for the response
"am i gonna put the code on the LOGIN?"
Well I honestly don't know which other part of your application can know that a user has logged in, so yes, the LOGIN screen has to handle this.
What should it do? It should set a value in a global variable. Your MAIN screen should interrogate the global variable, probably in a When-New-Form-Instance trigger, and set the buttons' properties accordingly.

Discover which (if any) route will match a given URL from within Controller in ASP.NET MVC2 app

In my master page I have a placeholder where a Html.RenderPartial() will render a collection of (bread)crumbs which are effectively a list of links I build up using action, controller names and RouteValueDictionary's.
I have an action that is called from multiple places to view a short-list and so when building the list of breadcrumbs for this actions view to display. Ideally I'd like to use Request.UrlReferer as the penultimate crumb.
Before unconditionally using this URL I want to check that it will actually match at least 1 route so I can be sure if the user clicks it they will get a view from my app and if they don't I will simply use the home page instead.
Any suggestions how I would go about this?
Take a look at this post http://haacked.com/archive/2007/12/17/testing-routes-in-asp.net-mvc.aspx

iPhone Objective-C: Best way to handle logout user A -> login user B?

I have an application that uses OAuth whose logic is something like this:
If there is a request token for the user that is valid stored, loads a UITabBarController with four views.
Else, brings the user to the login screen.
I realized today that if I am logged into my app, log out, and switch to another user, the data from the first user is displayed until I hit refresh. Also, the tab that was last viewed by the previous user is displayed (which is pretty strange for an application user's point of view).
I thought about removing the TabBarController and creating a new one, but I realized I was not sure how to do that, considering that I set everything up through Interface Builder. (Also, I'm not even sure if that is the best way.)
What is a good way for handling log out of A -> log into B? Also, if you need more information, I'll be very happy to elaborate.
Thank you!
I do it as follows
Login
Load and display the login screen
Load the root view controller in background
Insert the root view controller behind the login screen
Remove/release the login screen after successful login
Logout
Load the login screen and place it on bottom of the view stack (behind the root view)
Remove/release the root view controller (login becomes visible)
... start over at 2) in Login
If you store user specific data in the documents directory, store it in subdirectories
with the user name or id as directory name. One directory for each user.