Instead of relying on the filter, try just looking in the session:
session.getAttribute("edu.yale.its.tp.cas.client.filter.user");
If the user has a CAS session, that value should be in the...
Type: Posts; User: jacobmattison; Keyword(s):
Instead of relying on the filter, try just looking in the session:
session.getAttribute("edu.yale.its.tp.cas.client.filter.user");
If the user has a CAS session, that value should be in the...
One option is to simply make the home page public (i.e. do not put it behind the CAS filter). Then check on the home page for the CAS ID in the user's session. If they've gone to some other...
Yeah, I get you.
Well, you can't, really. The nature of a command or "form-backing object" is that it's just that -- a single object that contains the data from a form.
So, your options...
Can you give an example of what you mean by a complex form field?
Yes, there is only one command object, but it can certainly have nested objects, so that you can bind a text box to, for example,...
That's not bad. Yet another approach would be to specify a short server timeout, but to have Javascript on each page that pings the server and tells it to refresh the session. That way you'll never...
You can place javascript on each page to catch the onUnload or onBeforeUnload events, but you won't necessarily know whether the page is unloading because the user is going from one page to another...
Ah, I get it. Yeah, you're screwed. :)
It seems like an approach that risks throwing out the benefits of IoC, but without knowing more about what specifically you're doing I'm not sure I can...
If so, then I'm not understanding what the problem is. The case for a factory is where you want entity objects that need beans injected. The entities are created on the fly based on current needs,...
If I'm understanding you, this sounds like you should use a factory object -- the factory is a singleton, with the various beans injected into it, and it's job is to instantiate your domain object...
First of all, Spring has a lazy list implementation called Autopopulating List, if you want to stay Spring-specific.
Rather than monkey with the list EL resolver, perhaps another approach would be...
Can you wrap the object in a custom class of your own, which will take a collection as a property and then call add() on the wrapped object as many times as necessary?
Make your class implement the interface ApplicationContextAware, which will mean you have to add a setApplicationContext method. Then, as if by magic, Spring will detect that you have implemented...
There's no easy way to answer that question. Or perhaps there are several good answers.
A perfectly reasonable answer is that Spring is best for projects where your project team has expertise in...
I'm not sure I follow you. ModelMap absolutely implements Map interface (one very effective way to implement an interface is to inherit from a class that implements that interface-- in this case...
The "Simple" part of SimpleFormController is that you don't need to (and should not) override handleRequestInternal -- if you do, the code in the superclass that actually calls formBackingObject()...
Two things --
First, you need to override the formBackingObject method in the controller, so that it has a way to get a new EmployeeBean to bind the form data to. This will probably just be...
Thanks for replying.
I'm not sure I understand your suggestion. Somebody somewhere needs to say
myPerson.ContactInfo = new ContactInfo()
before the form can bind to fields within...
If I have a form-backing object that has a complicated object tree -- say a Person that has a Contact Info object that has an Address object that has a bunch of Strings -- it seems that the object...
Easiest way is to check which button comes through in the request parameters. If button1 is clicked, there'll be an item in the request parameters with a key of "button1" and a value of "Do Print".
It looks as though in your JSP you're trying to display something called MQDetailForm.requestStr, which, in the version where you extend the parent form object, simply doesn't exist. So why would...
Agreed. Specifically, it looks like you need a projectService set as a property on your controller, and it isn't being set.
It sounds like the poster wants to give clients the ability to modify the templates on-the-fly via a web interface.
Certainly a java class can save text to a file anywhere on the file system; it...
I don't register any custom property editors to handle enums. They "just work" -- i.e. Spring is smart enough to turn a String value into myEnum.valueOf(value). Are you seeing something different?
Please post the relevant part of your dispatcher servlet XML configuration.
Yes, that seems like a reasonable design, and not inconsistent with IoC.