Lance Cash

Greenhorn
+ Follow
since Oct 19, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lance Cash

Ok, sorry for the sparse details. I was kinda looking for some generalities to start. Anywho, this is what our current jsf pages are littered with:



I know there is a way to define this so that these things are instantiated by Spring once at startup and used throughout the app. Any direction would be greatly appreciated...even if it is just to point me in the right direction. Thanks. Lance.
13 years ago
JSF
We have a selectOneMenu that we are using over and over in our app with the same selectItems in it, EVERY time. I know there is a way to instantiate this via a Spring bean, but I do not know the way. Could someone possibly teach me the ways of the Jedi masters? Thanks. Lance.
13 years ago
JSF
Ok, so see...you are setting the cityId value in your stateValueChanged() method.

Tim Holloway wrote:



This is what I'm doing in my code. My question is this: If there was already a value in the cityId field and then someone goes and changes the state, then your setting of the cityId to "" will be overwritten by the phase that sets the values from the jsf page, right? If not, what is preventing that from happening? Is that maybe where some of this a4j stuff comes in? Other than that, my code looks very similar to yours. Thanks for your help, Tim. Lance.
14 years ago
JSF
Ok, so what's the answer to the problem at hand?

How exactly are you supposed to accomplish simple tasks like I'm describing, then. A user changes a combo box selection and it subsequently changes a value in some other field on the page?



Thanks. Lance.
14 years ago
JSF
I've got nothing but respect for you, Tim, but...that has to be one of the most ridiculous things I've ever heard. Don't use a VCL to change a value? I must be missing something huge here. How exactly are you supposed to accomplish simple tasks like I'm describing, then. A user changes a combo box selection and it subsequently changes a value in some other field on the page? I don't mean to sound rude, Tim, I'm just perplexed. Thanks. Lance.
14 years ago
JSF
Wow...that's a really loaded question, but I'd like to point you to an article that is excellent for any datatable questions. I think it will have everything you need.

Ultimate datatable How-to

Hope this helps. Lance.
14 years ago
JSF
Well, no takers on this one, huh? I am able to work around the issue by setting a flag in the value change method that the set method then looks at and skips setting the value if the flag is set and then resets the flag. But...that's really lame! There has to be a better way? Thanks. Lance.
14 years ago
JSF
Ok...here's the deal. I have a combo box on a page tied to a ValueChangeListener. When the combo box is changed, the value change method modifies the value backed by an input on the same page. However, after this value is changed in the code, whatever phase is responsible for setting that value from the UI is fired and passes the "UI value" and writes it over what I just changed it to. Is there some way to prevent this phase from executing when you must? Thanks in advance for any help you can provide. Thanks. Lance.
14 years ago
JSF
Alright, well...I figured out how to call the servlet from the backing bean, but it ended up not helping me out. This particular servlet needs to be invoked from the right context in order to execute properly so that it can grab stuff like the user state from the session. When calling it from a bean as I did, that stuff isn't instantiated. But for anyone that may be interested in how to do this in the future, here you go:



I ended up having to call on javascript to the rescue after all via a hidden button invoked by the onclick() method of the outputLink tag.

Thanks anyways, guys.
14 years ago
JSF
It is generating a pdf report of system activity.
14 years ago
JSF
I've been poking around all over the place looking for how one can invoke a servlet from within a backing bean and have come up empty. The most promising code I found was:



The problem is...it doesn't work! I don't know if it is an icefaces issue or what, but I get the following error:


java.io.IOException: Cannot dispatch on XMLHTTP request.



I'm hoping someone out there will have other ideas, and please...no suggestions on how to better design this thing. It's gotta stay a servlet! This isn't the only place this thing gets used. I am open, however to other suggestions on how to call the servlet. Originally, it was being invoked via an outputLink, but now it needs to perform some action as well. I realize that I could create a hidden input button and invoke it with some javascript, but that just seems awfully hokie to me. I would like to present my boss with a more elegant solution than that.

Thanks in advance, everyone. Lance.
14 years ago
JSF
Awesome, thanks. That got it.
14 years ago
Ok...I wrote a simple test class to illustrate a problem I'm having. Here's the flow:

1. User clicks button on frame
2. This starts some long running process and opens a dialog to show the progress
3. When the process completes, status text on the dialog gets updated

The problem is that the components just don't get refreshed like they should. My guess is that there is some kind of threading issue going on? I'm not sure at this point. Any help is GREATLY appreciated. Thanks in advance. Lance.



By the way, it may appear to work the first time you run it because the text will change from blank to "Not to be". It should be blank => "To be" => "Not to be". Also, if you dispose the dialog and click the button again, nothing will change. It is "Not to be" when you click it and "Not to be" after the process runs. Thanks, again. Lance.
14 years ago
Any other takers?...
14 years ago
Well, this is an alternate approach I could go to if I must...but I'd REALLY just like to get mine working correctly. Thanks for the link, though!
14 years ago