This question already has answers here:
primefaces keyup or other ajax event delay
(4 answers)
Closed 3 years ago.
I set up a PrimeFaces p:timeline, after each zoom in or zoom (event : changed) start method that read some database. i have a issue with this operation, users mostly zoom fiew levels in. So they click button for example several times in a row. For example they would like zoom from days to minutes, so they click button 4, 5 times in a row. After every click starts methods that read a database, and this is an issue for me. This causes system delays. Is it possible somehow to wait with event :changed until user stops zooming?
Problem solved, solution: add a ajax delay to rangechanged event:
<p:ajax event="rangechanged" delay="#{schedulerControler.delay}" listener="#{schedulerControler.update}" />
Bean:
private long delay = ((long) (100 * 10));
Related
This question already has answers here:
Pure Java/JSF implementation for double submit prevention
(3 answers)
How to do double-click prevention in JSF
(9 answers)
Closed 2 months ago.
I have tried different solutions but what I want to achivie is:
When you press the button (a tag / h:commandlink ) I want to disable the button or do no action at the second click because the first one is loading. Right now I have a issue that you can double click on the button and it can give me error.
I have this code:
<h:commandLink id="btn" styleClass="link"
onclick="test()"
action="#{use.enterAgentMode(user, myBean.guardEnum)}">
</h:commandLink>
for example is it possible to create a variable and set it to true/false and set condition inside of action=... if true do the code else nothing
I also tried with JQuery and document.getElement to set attr.disabled true but did not work.
I saw it disabled with inspect but it was still clickable
I have tried different stuff, tried to add some debounce on the button..
any advices please
This question already has answers here:
Pure Java/JSF implementation for double submit prevention
(3 answers)
How to avoid re-execution of last form submit action when the page is refreshed?
(1 answer)
Closed 1 year ago.
Hello I have a form in my webpage. I search and data comes to my table. if I click to a row, redirect to another webpage. if I want to return back browser ask to me :
Confirm Form Resubmission
This webpage requires data that you entered earlier in order to be properly displayed. You can send this data again, but by doing so you will repeat any action this page previously performed.
Press the reload button to resubmit the data needed to load the page.
ERR_CACHE_MISS
I use primefaces 8, javascript:history.back()(for back to previous page).
If I open the developer tools(F12) problem is disappering interestingly.
This question already has an answer here:
BotFramework Get count of button click ( OpenURL)
(1 answer)
Closed 5 years ago.
Is there any way to track HttpAction buttons within the bot framework?
I have a button to links off to a website, and need to track how often that button is clicked.
If you handle any callbacks, you can count them and store into IBotData.
If you are using the actionType OpenUrl this is impossible. The action will be handled by the channel and there will be no message send to the bot.
This question already has an answer here:
How to decrease request payload of p:ajax during e.g. p:dataTable pagination
(1 answer)
Closed 6 years ago.
I am facing such a problem. I want to refresh one internal element of a h:form, a p:dataList, and in order to do it I have
<p:remoteCommand name="updateSet" update="import-statuses-admin-list" process="import-statuses-admin-list"/>
Function updateSet is called in every 5 seconds. The thing is that, there are some other elements in my form and they are also sent, eg.
<h:selectOneMenu value="#{importXmlManagementBean.statusFilter}" id="statusFilter">
I'd rather have only this list p:dataList submitted, without sending all form.
Is it normal behaviour or I am missing something?
Add to remoteCommand the attribute update with the id of the datalist you want to update, and in the process specify the same.
Today we encountered a strange problem.
We have a XPage with some buttons, who id opened in editMode and bind to backend Notes Document.
We can press the buttons and the values are updated to the backend document. Via a partial refresh we see the new values.
So far so good.
But.. when we leave the XPage open for, let say 1 minute, without doing anything. After this period we try to click a button, we noticed that the button became unresponsive.
Is there a cause for this behaviour??
Never seen it happen in a minute, but there is a timeout setting in the server INI that defaults to 30 minutes, I think.
I see the same problem, but, not after a minute, but a few hours. I have an onclick event tied to a radio button and after a period of time, if I return back to browser clicking on the radio buttons does nothing...
Have you tried:
https://openntf.org/XSnippets.nsf/snippet.xsp?id=extend-partial-refresh-timeout
XSP.submitLatency = 120*1000;