Win a copy of Spring Boot in Practice this week in the Spring forum!

Efrat Bar-Nahum

Ranch Hand
+ Follow
since Jan 19, 2006
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 Efrat Bar-Nahum

Hi Rajani,

Thanks for your answer.
The thing is that the command button is not pressed, so I can't use the onclick function.

To make things clearer, here's the full scenario:
1. The user changes the values in some of the configurable fields. The user can submit the changes by pressing the command button.

2. If the user submitted the changes (now the new values are written in the DB), the user can navigate to another page. No Alert will be shown.

3. If the user didn't submit the changes (meaning - the command button WAS NOT PRESSED), but he still wanted to navigated to another page (by selecting an item from the menu, navigation tree or entered a new URL manually) - This is the case that I'm talking about.
If this is the case, I would like to alert a warning message.
I know that I can use the onunload function, the thing is that I don't know how to cancel the unload (if that's what the user chooses to do in the confirm dialog).


Any idea?
Thanks,
Efrat
15 years ago
JSF
Hi Rajani,

Thanks for your reply.
This solution sounds good, but it doesn't solve my problem.
The command button is pressed when the user wants to submit the changes.
Only if the user DID NOT press this button, and decided to leave the form, I want to alert.

did something like this:



where checkValueChanged is defined as follows:





When the user presses the OK button of the confirm dialog, the new URL is reloaded, when cancel is selected, the current URL is reloaded.
But the problem is that I don't want to reload the current page, I want to do nothing, because if the current page is reloaded I lose all the changes that were made.
How do I stop the new page from reloading without reloading the current page again?

Thanks a lot,
Efrat
15 years ago
JSF
Hi,

I have a web application using the JSF framework.
Some of the pages have editable parameters & a "Set" commandButton.
If one of these parameters was changed and the set button wasn't pressed, I would like to alert the user before the page is unloaded.
If the user chooses to discard changes the new URL will be loaded.
But if not - I would like to leave the current page unchanged (without reloading it, to keep the changes).
How can I do it?

Thanks a lot,
Efrat
15 years ago
JSF
Hi all,

I don't know if this is the right forum for me, but I'll give it a shot...

I have a web application, written with JSF.
I want my web application to always behave according the principle: "Abort unfinished events, if there's a newer one in the queue".

For example - if the user pressed a link, and then pressed another link, before the first request was being handled, I want to delete the first event from the events queue, and handle only the new one.

(In a4j there is a tag ignoreDupResponses that is doing something similar, but I want to do it in jsf, in page or application context).

Any idea how to do it?
15 years ago
JSF
Hi,

I have a web application, and I'm using j_security_check (JAAS).

I have a second Java desktop application that also uses JAAS (and using the same Login Module).

Both applications have the same users (principals & roles).
When I log in to each of them, the login process works fine.

Now, from the java desktop application I want to launch a web browser and open my web application.
I don't want to get to the login page, since the user was already authenticated & authorized when he logged in to the java application.

So I'm trying to pass the user name & password to the j_security_check via the URL.
My URL is:


But I get an exception:

HTTP Status 408 - The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser


The strange thing is, that if I open a browser with the URL of the login page (http://localhost:8080/EM/), and then change the URL to the above one (with the username & password), it all works fine. The user is authenticated & authorized.

What am I doing wrong, and how can I fix the problem?

Thanks,
Efrat
15 years ago
Hi,

I have a web application, and I'm using j_security_check (JAAS).

I have a second Java desktop application that also uses JAAS (and using the same Login Module).

Both applications have the same users (principals & roles).
When I log in to each of them, the login process works fine.

Now, from the java desktop application I want to launch a web browser and open my web application.
I don't want to get to the login page, since the user was already authenticated & authorized when he logged in to the java application.

So I'm trying to pass the user name & password to the j_security_check via the URL.
My URL is:


But I get an exception:

HTTP Status 408 - The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser


The strange thing is, that if I open a browser with the URL of the login page (http://localhost:8080/EM/), and then change the URL to the above one (with the username & password), it all works fine. The user is authenticated & authorized.

What am I doing wrong, and how can I fix the problem?

Thanks,
Efrat
15 years ago
Hi,

I handled the first issue by putting the jars in the server side and referencing them from the applet tags.
Now I'll move to the second issue - the security...

Thanks a lot,
Efrat
15 years ago
Hi Manuel,

I didn't understand the manifest part.
Can I add the other jars (the ones that are located in lib/ext) to the manifest of my web-application's jar?
What is the way to do it? (I couldn't understand from the links that you sent me.)

Thanks a lot,
Efrat
15 years ago
Hi,

I have a web application, that I want to run from a remote machine. (by giving the server's IP: http://server-IP:8080/myApp).

I want to run applet from myApp.
When I did it locally (server & client on the same machine), I had to change the java.policy, and put the required jars in the jre/lib/ext.

Now, I want to run the applet from a remote computer without having to change the java.policy or put the jars manually.

What is the way to do it??

Thanks a lot,
Efrat
15 years ago
Hi,

I want to assign a multi keyboard accelerator to a JMenuItem.
(I want that the shortcut will be something like: Ctrl+P,M).

How can I do it?

Thanks,
Efrat
[ August 22, 2006: Message edited by: Efrat Bar-Nahum ]
15 years ago
Hi,

I am using the printerJob.printDialog() to print tables (I implemented a print method).
The problem is that when the table has many entries printing takes very long time (printing table of 100 entries might take a couple of minutes).
I am using the SwingWorker when printing in the following way:


My question is: Is there a way to send a print job in the background, but in the meanwhile, while it is being processed, keep on working?

Thanks,
Efrat
15 years ago
Hi all,

I'm using the printerJob.printDialog() to print tables and maps. (I implemented my own PrintableTable & PrintablePanel classes).
Today I play with the scale to make sure that everything fits into one page.
I would like to give the user the option to choose weather he wants to print in the actual size, or to fit to the page size.
For that I would like to add a radio button to the standard Print dialog.
Any idea how to do it?

Thanks,
Efrat
15 years ago
Ok, I might try that.
Again, thanks a lot for all your help!!

Efrat
16 years ago

Kartik, thanks a lot for you help.

I'll try to look for another solution. (Can you think of any other way to deal with the given login parameters before they are passed to the login module?)
16 years ago
Yes, I am using Jboss/Tomcat...
Any idea how to solve the problem?

(When I'm using <url-pattern>j_security_check</url-pattern> I get a deployment exception)

Thanks,
Efrat
16 years ago