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

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.

Related

Missing GA4 event parameters

I have recently started to use Google Analytics 4 for event tracking, using Google Tag Manager to send events to Analytics. I have set up the custom variables in Tag Manager as well as in GA4.
Everything seems to work very well in Tag Manager's debug mode, and also if I look up the events in real-time view I get the requested event along with all the parameters I have set in Tag Manager. However, once I look up the events for the last couple of days in the Engagement -> Event view, a couple of my parameters are missing, and also I'm not getting the same hit count for each parameter, even though each event has all parameters set:
As you can see, 86 events have been recorded, but the event count for the parameters widely varies.
Here's a screenshot of my Tag manager settings:
I have tried to set up a new event with the same parameters, but (logically) I got the same result. I am under the strong impression I'm missing something obvious here. Does anyone have experience with this, or has anyone come across this same issue?
To be honest, you can just try to click on mark as conversion in the Events tab, and this should save them. I think for some reason GA4 doesn't save parameters otherwise...
i cant get this til work with fields and parameters for an event so i try to create a user custom dimension instead and also to send it as a content group and as user property
also i can see the user id under app instance for the standard report user explorer
but i can't filter on or select this one myself
i cant create the custom parameter reports like gerrit did
but yeah create them as custom dimensions /metric first should be the way
ga4 has a bug when you edit a standard report, you add 3 card and deselect one it still thinks you are maxed out and you have to start over...
the test internal users filters dont work, though you can see data in debug and under events, but since i know they work i know try to just make the filters active

Avalonia + ReactiveUI - pharmacist for Events() generation

I'm trying to get my head around Avalonia in general, and the Reactive UI integration in particular. From googling around, I understand that Avalonia pulled away the Avalonia support in ReactiveUI, and tries to integrate ReactiveUI into Avalonia itself, to support a sometimes unstable Avalonia API.
I'm implementing a flow where a double tap on a DataGrid row should open a details windows, which I can do by adding a handler for the DoubleTapped event in the code behind. However, I was wondering if I could do this in a Reactive UI way, in a WhenActivated() implementation, by observing the DoubleTapped event.
In the ReactiveUI documentation, I see that there is a Pharmacist integration, which generates the observables for these events. However, when I fetch a reference to the DataGrid in the code behind, and try to hook into the DoubleTapped via
myDataGrid.Events(). ..., I don't get to see any events. Does this imply that there's no such support in Avalonia at this time?
Finally, while I'm at it, if I forget about the Reactive UI support, and use a straight-forward event handler, I need to do some stuff to detect whether it was a row that was double tapped, or something else (such as the header). I have to do this, because there's no EventSetter implementation in Avalonia as I understand it.
Somebody who knows if Avalonia will support this in the future?
Edit: in the end I used ReactiveUI somewhat similar to
TreeView.GetObservable(DoubleTappedEvent)
.Subscribe(async x =>
{
var selectedItem = TreeView.SelectedItem;
if (selectedItem is TreeNodeViewModel treeNodeViewModel)
{
await ViewModel!.ActivateResource(treeNodeViewModel);
}
}).DisposeWith(d);
An attached behaviour can also help to bind events to perform logic. There is a sample that looks like it could work provided the DoubleTappedEvent is being fired.
Avalonia Docs - Creating and binding Attached Properties
The dev tools should help show the event your are looking for tunnel and bubble though the DataGrid?
Pharmacist does not support Avalonia. They are working on ReactiveMarbles.ObservableEvents, which as of right now, doesn't work on generic classes, but they're working on fixing it.

Google Tag Manager isn't tracking mobile click to calls

I am trying to track clicks on the phone number on the website. After I set up the trigger using following settings:
Trigger Type: all elements;
Page URL: contains "tel:" ;
Click Text: contains "13";
With these settings, the trigger is firing correctly on the desktop but isn't working on mobile.
I tried to use only "Page URL"/"Text Only"/"Form Text"/"Form contains" as conditions for the trigger to fire, but all attempts are unsuccessful. I also tried to use "Just Links" as a trigger type but it's not helping.
I also tested the URL in different mobile browsers (chrome/safari) and emulator. With an emulator, the tag is firing correctly but it's not working on the
Please have a look at the preview to see the page and tracking I am talking about:
https://www.googletagmanager.com/start_preview/gtm?uiv2&id=GTM-T92J432&gtm_auth=MmNY2ZtOefQOp1Kce4yUFQ&gtm_preview=env-5&gtm_debug=x&url=https://lp.acfc.com.au/good-credit
I appreciate your advice on what is the problem and how it can be fixed.
Thanks!
Kirill
Actually, better way of doing this to set generic trigger in GTM, then you will be able to track any phones on your website:
1) Enable built-in variable Click Element (if you already have it, you can skip this step)
2) Create trigger, which will fire for all links which have tel:***** (it can be any phone).
CSS selector on the screenshot is a[href*="tel:"]
3) Create a tag, which will send data to GA
4) Check your events in GA.
Keep in mind that it might take a couple of hours to appear in Behaviour-> Events tab. Or you can check it immediately in Real Time -> Events tab
RESOLVED:
I just found out that in order to identify an event it is safer to look at how the data layer is changing after the action rather than on the "Variable" tab.
By doing so, you can see what data is actually going to google analytics, and it is more stable to use it as an ID for a trigger to fire.
In my case, I've had only elementURL that was pushed back to the datalayer. I used the parameter elementID equals "tel:xxxxxx" to make the tracker work. Hope it will help (just put your number instead of x).
Cheers!

Why does Dynamics CRM 2013 plugin fire twice on owner change?

I have a simple plugin for a custom entity that is set to trigger on Update of my custom entity. It is registered in the Post Operation stage. I have noticed some strange behaviour when I make changes to the Owner field of the record in addition to other standard fields (e.g. text boxes, dates etc).
The plugin fires the first time and the only attributes that come across in the image are all the regular fields. The owner field does not come across.
The plugin then fires again, but the Depth property of the context is still only one (i.e. the plugin is not getting triggered by changes made in the plugin code). In this run of the plugin, the attribute that come across is only the Owner field.
My theory is that because the owner fields are 'special', the CRM is doing two different requests - one to change the regular fields, and then another request for changing the owner via an AssignRequest. However, I cannot find any 'official' documentation for this behaviour.
Can someone explain why this is happening?
I am running Dynamcs CRM 2013 UR2
The Update event fires during the Assign event. So if an assignment takes place your plug-in will execute. The same is true for SetState - if you activate/deactivate a record an Update event takes place. These items are not documented in the SDK.
A good practice is to use Attribute Filtering on your Update plugin so it only fires for the fields it is concerned about - this will, assuming it is isn't looking at the owner related fields, avoid it firing twice. If you have logic specific to record ownership you would put it in a plugin that is registered on the Assign event.
I was not able to find official documentation about this, but I think Assign message is what you are looking for (if the entity is user-owned. See http://msdn.microsoft.com/en-us/library/gg328576.aspx. I would strongly recommend that you specify Filtering Attributes if you are registering a plugin on Update message. You could also debug your plugin and inspect MessageName property of plugin context and see what message gets triggered. I hope this helps.

Kendo UI Grid/DataSource - Global Error Handling?

I've currently inherited an application which has numerous Kendo grids (and other controls) throughout, and I'm trying to fix an error which keeps cropping up now and again - specifically when the user is no longer authenticated.
I know what the solution is for a single instance of the control - return a flag to indicate authentication failed, and then detect this in the error handler and perform the authentication.
The problem is am I really going to have to handle this for every instance of a Kendo control I have? Is there not a global error handler I can hook into? Either for the data source itself (as I know this is used for all Kendo control data loading), or for the Grid specificially. I don't mind either way - just which one is a hook.
This would be a more straighforward short term solution than refactoring everything to specific error handlers, etc.
I assume you can attach a global error handler to $.ajax, which is used by the DataSource, you can check how to do it here:
http://api.jquery.com/category/ajax/global-ajax-event-handlers/
Or, you can take advanttage of that the configuration that is done in the DataSource is passed directly to the $.ajax:
http://docs.kendoui.com/api/framework/datasource#configuration-transport.read-ObjectStringFunction
For reference, someone from Telerik has provided a solution using just the DataSource. I haven't tested it, but I prefer the accepted answer above as it hooked into all Ajax on the site - not just ones that utilise the Kendo DataSource.
http://www.kendoui.com/forums/mvc/grid/global-error-handler-for-numerous-grids.aspx

Resources