whit gvnix-2.0.0.M1
the filter (automatic input generated) for search in table persist value after submit or close or reload page
I need clear this
Datatables componentes stores that values using the localStorage feature provided your browser.
Use the localStorage.clear() javascript function to clear the values of your component.
Read more about the localStorage here:
https://www.w3schools.com/html/html5_webstorage.asp
Hope it helps,
If you need DT, I recommend you the latest release of Spring Roo, the version RC1.
http://projects.spring.io/spring-roo/
Hope it helps.
Related
how to refresh the JSF panelgrid whenever data gets updated in db without refreshing the whole page.is there anything can be configured? or i should created a backbean function ? can anyone guide me with a example?
Thanks in advance
Best way is to do so using Push Technology (You can trigger client behavior from the server)
For example PrimePush by Primefaces : PrimePush , but its not perfect yet , supposed to be in 3.5 version (I think)
So for now you can use Primefaces Poll , that way you will check every X seconds if the data was changed and if so, you could update a particular element using the update attribute
I want the fullCalendar to redraw itself (all the structure and events) without reloading the page.
Scenario:
I am using a patch of fullCalendar that supports the Resource View. For a few user actions I want to change the resources. But I don't want to reload the page.
You could 'destroy' and 'render' the calendar as a whole. But that might be cumbersome - especially in older browsers.
$('#calendar').fullCalendar('destroy');
$('#calendar').fullCalendar('render');
If you don't actually need to render the table, but just rerender the events again, you could use the 'rerenderEvents' method:
$('#calendar').fullCalendar('rerenderEvents');
Hopefully this helps!
Use refetchResources: .fullCalendar( 'refetchResources' )
This will fetch and freshly re-render the resource data, per the FullCalendar documentation.
The problem:
"...The problem is that the calendar is initialized while the modal or div is not visible... " based on this link enter link description here
In my opinion, destroy is not needed in this case, only with render you can see the calendar.
My solution:
<script type="text/javascript">
$('#objectname').show(0,onObjectShow);
function onObjectShow(){$('#calendar').fullCalendar('render');}
</script>
You must to be sure that the object(container of calendar) is fully visible. For example, my first mistake was to put this code on "onClick" event, and click event is triggered before show the object container and has no effect.
Solution Based on this reference.
You can also redraw calendar on the fly using below command-
$(window).trigger("resize");
How do we identify the user's web browser in flex ? Based on the browser I have to display some text in my flex application.
Any help would be appreciated.
Thanks
Short answer is to use ExternalInterface to call JavaScript code.
I would take a look at these pages from the documentation for more in depth information:
http://livedocs.adobe.com/flex/3/html/help.html?content=18_Client_System_Environment_7.html
http://livedocs.adobe.com/flex/3/html/19_External_Interface_04.html
http://livedocs.adobe.com/flex/3/langref/flash/external/ExternalInterface.html
Yes, Javascript code gives you access to Navigator object, which inturn can give you the browser details.
Here's an example I obtained on Googling
http://www.tharas.in/2009/12/getting-client-browser-environment-in-flex/
From ActionScript,
var result:String = ExternalInterface.call("eval", "navigator.userAgent");
which gets the value for the browser name, stores it in result.
I have a button on a webpage that has the following added programmatically to its “Attributes” property.
btnDeleteNode.Attributes.Add("onclick", "if(confirm('delete this node?')){}else{return false}");
This works fine but now I need to check to see if the user has selected a node in a tree before asking if they want to delete it. If a node isn’t selected I need to tell the user to select one. My question is, can I do this using the above method (I don’t know java script) or should I use a different approach ?
You can set a flag (using javascript) on selection of any node and check the flag here.
You can use a flag or use from Asp Validators
It is possible to add multiple reCAPTCHAS in one form? I tried doing so, even giving the multiple reCAPTCHAS different IDs, but when I load the page in the browser, only one of them is shown.
Is this by design? I need the two reCAPTCHAS because one is for Login, and the other one is for the Register form, which will be shown on the same page.
Thanks!
WT
Only one Cpatcha is supported in a page at any time. What you can do is use AJAX and lod captcha after the form is loaded.
This might of some help.
After a quick google search, it appears that it's not currently possible. One suggestion I saw was to pop up a modal recaptcha just as the user submits the form. ondemandcaptcha for Ruby.
I was initially lead by this thread to believe there is no simple answer, but after digging through the Recaptcha ajax library I can tell you this isn't true! TLDR, working jsfiddle: http://jsfiddle.net/Vanit/Qu6kn/
It's possible to overwrite the Recaptcha callbacks to do whatever you want with the challenge. You don't even need a proxy div because with the overwrites the DOM code won't execute. Call Recaptcha.reload() whenever you want to trigger the callbacks again.
function doSomething(challenge){
$(':input[name=recaptcha_challenge_field]').val(challenge);
$('img.recaptcha').attr('src', '//www.google.com/recaptcha/api/image?c='+challenge);
}
//Called on Recaptcha.reload()
Recaptcha.finish_reload = function(challenge,b,c){
doSomething(challenge);
}
//Called on page load
Recaptcha.challenge_callback = function(){
doSomething(RecaptchaState.challenge)
}
Recaptcha.create("YOUR_PUBLIC_KEY");
It is now possible to do this easily with explicit recaptcha creation. See my answer here:
How do I show multiple recaptchas on a single page?
It's not too difficult to load each Recaptcha only when needed using the Recaptcha AJAX API, see my post here:
How do I show multiple recaptchas on a single page?
the captcha has an img element #recaptcha_challenge_image element , so after you set the recaptcha in one div say "regCaptch",get that img src attr
,set your other captcha div html to the old one html and then set the #recaptcha_challenge_image src to the src you get , here is a working example
var reCaptcha_src = $('#recaptcha_challenge_image').attr('src');
$('#texo').html($('#regCaptch').html());
$('#recaptcha_challenge_image').attr('src',reCaptcha_src);