i need onEventAfterAllRender to perform some operations after i have rendered all my calendar events.
Since this feature has been removed from v4 i need some other way to do it!!
Related
I have a Firebase Event called conversion_performed. It has a parameter success.
Can I trigger a conversion only if the parameter success is "true"? Or do I need to have two different events: conversion_succeeded and conversion_failed?
Well after reading some documentation, Google Analytics for Firebase provides event reports that help you understand how users interact with your app. You can create custom tag in order to track the user behavior and create custom analytics trigger to allow a proper process related to this event.
In special, there are a king of tags called conversions, based in this definition the conversions are classified in macro and micro.And I think, this classification is important for your question.
In case of macro conversion, if your trigger processes a large amount of information and perform multiple operations over a single event/conversion, I think you should separate in both tags to isolate each processing. Or if you require to perform very different path of data process based on success, I strongly suggest separate the event in two.
On the other hand, in case of micro conversion, if the processing trigger does not have much work and if the knowledge of the success of the conversion is part of a unique processing path, I suggest keep just one conversion trigger.
In a nutshell, your questions depends entirely about your problem nature. And I suggest two criteria to separarte or not your conversion trigger.
Heavy process - Separate your tags in app/web or create several pub/sub trigger to separate processing.
Isolated behavior - If the execution of the trigger is totally different depending on the success of the conversion, I recommend two conversions and two triggers.
I have completely changed the answer to try to go deeper into your problem because I think, the first one was very shallow. And I hope this answer is helpful to you.
Two questions: first, is it true that the only way to update '.priority' via REST is by using PUT, which forces you to rewrite all the other values? And I'm afraid to ask, but does that also apply to the Javascript SDK?
Second, is there maybe some other way other than using Priorities to order your collection 'server-side'?
Sorting things on the client doesn't work for me because I'm using a masonry-type plugin for layout which goes bonkers whenever the order changes client-side, but it seems to work fine server side. I'm using PHP to degrade the '.priority' value over time, lowering the item's position in the collection, but I'm forced to rewrite every other field at cron run. It works, but it would be better to just be able to update '.priority' or some other value that controls the position.
Question 1: .priority via REST API
You can set the priority without modify the record by calling PUT on the .priority directly. These examples are found in the REST API doc:
So, to reiterate, add .priority into the URL.
Question 2: Hacking masonry sorting in Angular using the data store?
If you haven't explored your options here, there are several libs dedicated to integrating masonry and angular which you may want to check out (e.g. angular-masonry). You may also have luck address sorting data in masonry directly, in its own SO question, rather than trying to solve it with your data store, which seems like an XY Problem.
The records in Firebase are sorted lexicographically, so you have three options:
name your items so they sort in the desired order
use push ids, which are ordered chronologically
use priorities to enforce a sort order other than the record id's natural sorting
Keep in mind that numeric keys, when mixed with lexicographic strings, cause behave strangely--err, by design--in Chrome. And, tangentially related, such a debate has waged that the ECMAScript standard will actually be changed to force them to correct it
I'm working on a project in ASP.Net that uses the UpdatePanel to handle all AJAX requests. I'm much more familiar with using jQuery AJAX methods (and strategies) so I'm kind of stumped on finding a clean solution for the functionality I need.
Basically I need a table that allows me to dynamically add as many rows as I want using AJAX. These rows will contain text boxes whose values must be preserved by ASP.Net until I'm ready to submit the form. To further complicate matters there may already be records that exist in the database that should display as well with the values pre-populated and any changes to these fields must also be preserved.
I had started out by using a GridView and setting it's datasource to a list of the database records but unfortunately I believe this means I can't add new rows to the GridView.
Any assistance would be much appreciated. Keep in mind the solution must use ASP.Net controls.
I believe I figured out a solution that seems pretty straightforward.
When the page loads I gather any relevant records from the database and perform a query expression combined with a projection select to create an anonymous type array. When the add new row button is clicked instead of trying to add the row directly or retrieve potentially old data from the database I perform a query expression on the datagrid items themselves and union a new blank item. From there it's just a simple matter of setting the datagrid data source, triggering a databind and updating the update panel.
The only question now is how to identify the rows, particularly new rows that have no database keys yet. I could devise some clever method for generating row ids but I have a feeling that ASP.Net already does this and all I need to do is associate these ids with the anonymous types.
I feel like I am fighting against the current when I develop ASP.NET Webform apps. I frequently run into the same problems, and while I eventually find some kind of workaround i'm never fully satisfied with the results.
Here is an example of a typical problem:
The design requires a grid or grid-like result set. This result set is pulled from a database, however, there are additional controls on each row that are not data bound, but their contents are used to insert data into other records.
A good example of this would be displaying a list of products, then adding selected products to a shopping cart based on values entered into quantity fields, and options selected per product. Throw into the mix that you have to allow multiple lines to be added to the cart at the same time, and it starts to get more complex.
Let's add to that mix that you can't select certain products together (mutually exclusive), that you can only select a certain number of one product, but not another, that prices may change while the user is selecting their items, that you you get an overall discount per item based on quantity purchased (both per item and overall order), that you are using a line of credit and cannot exceed the line of credit, nor can you buy more of a given item than an arbitrary amount set in your account or in the product by your account representitive (think certain over the counter medications that the government limits how many you can buy), etc.. etc.. etc..
What starts out as a simple grid with an add to cart becomes a hopeless mess of business logic, which then of course requires validation and notification to the user of various errors in their choices.
How does one deal with very complex data entry schemes in asp.net? How do you even begin to design a piece of software to do all this?
EDIT:
Please don't suggest changing the interface, as the interface is not the problem. Users are fine with it, and they demand that it function the way it does. I'm looking for help on how to design and solve the problem of implementing it.
Don't put anything other than the basic validation in your code behind. The code behind should just take what the user entered, build a business object (or collection of business objects) and let those business objects validate themselves.
Each business rule should be a single function call on the business object that deals with just the one rule and nothing else. You then simply call them one after another and keep track of which ones pass and which ones fail.
When a validation fails, the business objects can provide the code behind enough information that it can display the correct errors and highlight the fields that have errors.
Some options to consider:
Separate out your validation logic so you can call it from both client-side and server-side code (enables next point).
Use AJAX to perform server-side validation and provide immediate feedback as the user performs various tasks, ie increases quantity.
Provide abundant and clear instructions/feedback to the user both before and after any actions are performed. Before: warn that product X can't be bought with product Y (especially if Y is already in the cart). After: explain the problem exactly and suggest ways to correct, eg "why don't you remove product Y?")
Fail gracefully, ie if only one product fails validation then ensure all other products are added.
Simplify the entry process, eg only allow one product to be added to the cart at a time.
The last point is important. A complicated data entry process can confuse users before they start, and makes trying to understand the numerous validation errors difficult. And this is even before you start coding the validation logic.
I've a DataGrid which contains data fetched from the server side. I need to filter the data based on some conditions. I've three checkboxes, on selecting the checkboxes I need to filter the data. For example I've three Checkboxes- Pending, Issued,Completed. When I uncheck Pending checkbox, the DataGrid should contain only Issues and Completed.
I'm able to filter a single element by using
dataGrid.filter({status: 'P*'});
But I'm not able to give the OR conditions, I tried Piped character, still it didn't work. Can someone please suggest me a way to implement this.
Thanks in advance.
Look at using the dojo.data.AndOrReadStore. It supports more complex queries.