How to do remote validation for group in Jquery - jquery-validate

I had used Jquery groups for combine multiple fields.Now i would like to do remote validation for all the three as a group.But it's not working.Can we use the remote..Remote not worked for me.Help would be appreciate.

Related

How can I access a new window when test is running using cypress

I want to visit an url perform some operations then open different url in different tab/window and perform some action in new tab and come back to the previous tab/window and so on. Is this possible in cypress?
Please suggest some solution if possible.
Cypress does not and will not support handling more than one tab/browser, for further read and recipes see: https://docs.cypress.io/guides/references/trade-offs.html#Multiple-tabs
I see two solutions:
Use api request for the operations needed for the external url
Divide the test in different cases
2.1. In before/beforeEach section make preparations needed
2.2. It case for first part in your project
2.3. It case for the different url
2.4. It case for the second part needed in your project
If have some repetitive data that needs to be reused - you can declare it as a variable ouside of the "describe" scope with usual JS code.

Where to put ajax request in Ember tutorial app?

I want to add "Weather: 24C" to the rental-listing component of the super-rentals tutorial app.
Where would be the "best-practices" place to put this ajax request?
Ember.$.getJSON(`http://api.openweathermap.org/data/2.5/weather?q=${location}&APPID=${apiKey}`)
.then(function(json) {
return JSON.parse(json).main.temp;
});
Do I need to add a component, add a model, add a service, add a second adapter, modify the existing adapter? Something else? All of these? Is the problem that the tutorial uses Mirage? I ask this because when I think I'm getting close, I get an error like this:
Mirage: Your Ember app tried to GET
'http://api.openweathermap.org/data/2.5/weather?q=london&APPID=5432',
but there was no route defined to handle this request.
Define a route that matches this path in your
mirage/config.js file. Did you forget to add your namespace?
You need to configure mirage to allow you making calls to outside in case mirage is active; what I mean is using this.passthrough function within mirage/config.js, that is explained in api documentation quite well.
Regarding your question about where to make the remote call is; it depends:
If you need the data from the server to arrive in case a route is about to open; you should prefer putting it within model hook of the corresponding route.
If you intend to develop a component that is to be reused from within different routes or even from within different applications with the same remote call over and over again; you can consider putting the ajax remote call to a component. Even if that is not a very common case usually; it might be the case that a component itself should be wrapped up to fetch the data and display it by itself for reusing in different places; there is nothing that prevents you to do so. However by usually applying data-down action-up principle; generally the remote calls fall into routes or controllers.
Whether using an ember-data model is another thing to consider. If you intend to use ember-data; you should not directly use Ember.$.ajax but rather be using store provided by ember-data and perhaps providing your custom adapter/serializer to convert data to the format ember-data accepts in case the server do not match to the formats that ember-data accepts. In summary; you do not need to use models if you use pure ajax as you do in this question.

EventBus.subscribe() in SAPUI5

I am new to eventBus() function in SAPUI5.
I am using eventBus.publish() in Table.view.js controller to publish data & have used eventBus.subscribe() in MainPage.view.js controller. It is working fine.
But while I try to implement eventBus.subscribe() in another controller ("Feed.view.js"), it is not working. Why is it so?
The cause of you problem is likely one of the following:
You are not using the same EventBus in all cases (e.g. in one case
you use the sap.ui.getCore().getEventBus(), and in another case you
use your component's oComponent.getEventBus())
You are not using the same channel
You are not using the same event ID
Please check this, and if it doesn't help post more of your code.

registerEvent in joomla

I have 2 small plugins:
In Authentication group and works on onUserAuthenticate event
In System group and works on onAfterRoute event
As 2 plugins i need to install 2 zip-files. Is it possible with registerEvent function create 1 plugin?
Mhm... on my opinion you should keep two different plugins.
Infact you could call a plugin from another, but what if the user just installed one and not the other?
Moreover, you can trigger an event, not a single plugin.
This means that you'll trigger all the plugin linked to that event, not just your.
IMHO you should use two plugins or you can get some errors that will be a nightmare to debug.

Wicket: (how) can I associate an AjaxCheckBox to the CheckGroupSelector?

I have a problem similar to this question: Wicket: can Checkgroup be Ajax enabled?
I'm using a ListView where each Item has a checkbox. I also have a "select all" checkbox. I am using a CheckGroup, CheckGroupSelector and Check and everything works great. Now there is a new requirement to change the state on some other controls on the page when the checkboxes are updated.
Nicktar's suggestion in the above linked question was the first that came to my mind, too, but I haven't been able to find out how it is possible to use AjaxCheckBox with CheckGroup/CheckGroupSelector. According to the doc you have to use Check.
But in this mail from 2008, Igor Vaynberg also states that it is possible to use AjaxCheckBox in a CheckGroup.
I tried it with just replacing where I used Check with the AjaxCheckBox, but it didn't work, the CheckGroupSelector didn't find the checkboxes anymore.
I also looked into using the onSelectionChanged method in CheckGroup, but I'd like to avoid using this as it triggers another roundtrip to the server, as far as I understood.
Can someone give me a hint? Or is there another nice solution for this?
By the way, I'm using Wicket 1.4.
Why can't you add an AjaxFormChoiceComponentUpdatingBehavior to the CheckGroup ?
From AjaxFormComponentUpdatingBehavior's JavaDoc:
NOTE: This behavior does not work on Choices or Groups use the AjaxFormChoiceComponentUpdatingBehavior for that.
AjaxFormChoiceComponentUpdatingBehavior is the behavior to use with CheckGroups and RadioGroups. If you used an AjaxFormComponentUpdatingBehavior with the onchange event, you'd run into this bug with IE
. AjaxFormChoiceComponentUpdatingBehavior handles this properly, adding onclick event handlers to each of the Checks in the CheckGroup.
As a side note, what Igor stated in that mail, is that CheckBox can be replaced with AjaxCheckBox, not Check. AjaxCheckBox is nothing more than a convenience subclass of CheckBox with an AjaxFormComponentUpdatingBehavior("onclick"), as the sources show.

Resources