I have an NSPredicateEditor for which I'm setting up custom template row views.
The templates generate the correct predicate, but when I set the editor's objectValue to display the predicate, the views are not filling. The templates' matchForPredicate functions are working correctly, and the correct template is getting the setPredicate message sent by the editor after I've set the editor's objectValue, but nothing further is happening. Right now, the templates' setPredicate function simply calls super, but I've not seen anything out there that I should do anything differently.
Any ideas would be appreciated.
This was a retain problem; once that was fixed, everything worked as expected.
Related
I have a SimpleForm within an EditView, where the SimpleForm contains a DefaultOptionsField and a TextField.
The idea is to select an option in the DefaultOptionsField, which then updates the value of the TextField.
I can make this work by updating the TextField on DefaultOptionsField onChange using basic JavaScript, but I would prefer a more Admin-on-Rest and React-like way to set the TextField's value. Yet somehow the EditView layer seems to complicate things for me - I have yet to find a simple, clean and elegant way to make the TextField and DefaultOptionsField interact in that vein.
Is there maybe some basic example code of how I might structure such a solution within Admin-on-Rest?
Your use case pretty much describes AOR Dependent input. Check it out here
https://github.com/marmelab/aor-dependent-input
I have a form that normally works with respect to dirtyforms. However, there is one circumstance where a jquery-ui datapicker calendar will pop up the "are your sure" dialog when a date is clicked.
I emphasize that this normally works correctly. The situation is related to the initial conditions of the form data source. Things work when the object being referenced is existing, but not if it is new. So I am sure somewhere there is a difference in the initial conditions of the form. But in theory the form should be identical.
How can I find what is causing the popup so I can fix my issue?
Well, I did find what was causing my problem by comparing the HTML of the working and non-working situations. (Not an easy task since there were many non-relevant differences.)
Seems that the original coder did a strange thing. Left out some Javascript function declarations when the page was "new" but of course did not eliminate the calls on those functions.
So I guess that the javascript errors were the root cause. At least when I include those function declarations everything works correctly.
By default, most anchor links on the page will trigger the dialog. We don't have a hard-coded selector of all potential 3rd party widgets, you must manually take inventory of whether these widgets use hyperlinks and ignore them if they are causing errant behavior.
See ignoring things for more information.
I was unable to reproduce this behavior using Dirty Forms 2.0.0, jQuery UI 1.11.3, and jQuery 1.11.3. However, in previous versions of Dirty Forms, you can probably use the following code to ignore the hyperlink clicks from the DatePicker.
$('.ui-datepicker a').addClass($.DirtyForms.ignoreClass);
I have this situation:
I have some Views and by default they have assigned a Layout for them. The problem is that in some specific cases, I need to change the Layout of some of these Views in the Javascript file.
I am using this way:
$("#tabstrip-dash").setAttribute('data-layout', 'mobile-tabstrip-layout2');
This solution works only if I reload the application, but I want to change it instantly.
Is there any way to set the new Layout?
Thanks!
Looks like the answer might be something like:
app.navigate("#someId")
I got this info from here: http://www.kendoui.com/forums/mobile/general-discussions/how-to-switch-views-programatically.aspx
Note, in a test I got this working, but in my main project I have not. I'm seeing the error "Uncaught TypeError: Cannot read property 'length' of undefined ". Not entirely sure whats going on, but there are other reports of it (in case this happens to anyone else).
How can i implement a Section View(like in IOS) in Windows8 ListView ?
I want to break down the Listview into different Sections.
Any Directions ?
ListViews have a property called groupDataSource that lets you define how the items are grouped. You might want to look at the Grid App template in Visual Studio, which has data already set up in this way. You can also take a look at this tutorial: http://msdn.microsoft.com/en-us/library/windows/apps/hh465464.aspx
If you want any more info, you will have to be a bit more specific with your line of questioning.
In my Netflix post on codefoster.com I tried to show grouping in its simplest form. When you have a JS array, you simply make a Binding.List out of it and then you just call createGrouped sending it two lambda functions telling it how to group. Then like #Paul said, you'll get those different sections automatically in your ListView. Hope that helps.
I'd like to know if there is a way to access inner controls of the spark control (lets say Panel) through the styleManager?
I've used the following code to access Panel's CSS properties:
styleManager.getStyleDeclaration("spark.components.Panel")
.setStyle("backgroundColor", "blue");
I'm unable to figure out how to access the inner controls like displayLabel. I know that this is possible using the CSS styling, but I'd like to change their properties at runtime.
How can this be done?
I am not sure if this is still current, but I think what you need to do is to declare the inner classes somehow in your CSS (possibly empty if you don't care). As soon as they exist there, the styleManager can access their values. You can also do something like this:
[Style(name="backgroundColor", type="uint", format="Color")]
In your MXML declaration, and then that style exists.
There are a few related examples here:
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf687e7-7ff6.html
[This is related to an issue I have myself with the StyleManager and google led me here, that's the reason for the late answer]