Create a hyperlink that will expire after one click - java

I am creating an hyperlink that will be send to user mail(gmail in my case). I want to expire the link after user once clicked in it(I don't want the user to click more than once).Once user clicked on the link it will trigger subsequent mail to manager. Here I also want similar functionality.
Note: link has some encrypted data too.It should remain intact.

I solved the issue.Instead of relying on session.I am using last update value in DB to check the life of hyperlink.

Related

Continue after user done captcha Selenium

I am automating something for a website and at some point, the user has to manually fill out a captcha. How would I wait until the user correctly finishes the captcha to continue?
There are some of things you can do depending upon how your page behave that you are automating, its hard to exactly say with out looking at the page
If your save button does not enable until user put the captcha you can run a for loop and only break if the button is enabled
If your save button does not let move forward without putting the captcha and that check its doing at java script lever without reloading the page, you can just keep clicking the button in a for loop with a wait after each click.
You can also check the textbox where user put the captch in a for loop and can only break the for loop when user type certain number of char.
these are some ideas.

In ADF Page refresh

I have three tables in a page. When I click on a button, I update only one of the tables. But since I use request scope on button event, the page reloads fully and updated value gets lost. Can you suggest a solution, so that my data will be displayed after button event.
Have you tried to set partialSubmit="true" in your button? If you set this attribute, you must set in each table a PartialTriggers to the button.
I hope help you.
Marcos.
The data has to be in the viewScope/pageFlowScope depending on whether its in a bounded taskFlow or not.
And in your button event you need to update the data in the viewScope/pageFlowScope and then bind your tables with those data.
All the event handlers can be in backingBean scope and not necessarily be in requestScope.

Check there is one checked checkbox before display confirm dialog Wicket

I intended to give user a chance to confirm their action by adding JavascriptEventConfirmation as the example from this tutorial :
https://cwiki.apache.org/WICKET/getting-user-confirmation.html
However, I want to be able to check first if there is at least one checkbox (out of mulitple) is being checked before displaying the confirmation dialog.
How can I achieve this?
Note that the confirmation is implemented via a simple javascript snippet that is added to the button tag's onclick attribute.
To add the verification, just change the generated snippet to fit your needs.

Storing inputText values when "jumping" from one controller to another

I have the following mask/view:
After entering the name and description, I can add a list of existing attributes by clicking on "Add existing" button.
This opens another mask/view, where I can select from a list of existing attibutes. This (new) mask/view has it's own controller and model too.
When I'm finished with the selection, I have another button that bring me back to this mask.
The problem is that when I come back the name and description fields are empty.
This happens because when I click the "Add existing button" the controller/model of this mask is not called and the values are not stored.
How can avoid this and have the values stored?
Thank you for any help
Francesco
This only works if the new view is inside the same view. E.g. when it's an overlay dialog which is presented by a hidden <div> and not a plain window.open() popup window. This way the beans will have access to each other and you will be able to execute ajax updates instead of submitting/refreshing the entire page.
This is pretty complex to homegrow if you're not that familiar with HTML/CSS/JS. I suggest to look at a component library which offers such a component like RichFaces' <rich:popupPanel> and PrimeFaces' <p:dialog>.
You can store data in session or conversation bean.
Session bean approach have huge drawback when user works in multiple tabs/windows - he uses only one session bean, so he overwrites what he did in other windows.
Conversation scoped bean solves this. But conversation scope was not in javaEE 5, its in CDI (part of EE6).

Web Apps: Closeable Announcements/Info/Tooltip boxes

I want to understand how to implement an announcement/info box system that displays
a box for the user with information.
The user can do nothing or close the box, but then it will never be seen again.
E.g. Facebook home page. Box asking for Translators.
if you leave it then its always there.
But if you close it, it never appears again.
Does this mean that a Boolean value needs to be used and checked
for announcement/info boxes?
I'm looking for a pseudo way with database tables to do this?
This info goes into a portal page personalization attributes table for that user.
Each portlet will have Display set to True or False for each user.

Categories