I updated to 7.2 and I'm trying to use the DialogService.
In following the example in the release notes, it seems that if the view is based on Grid it cannot be registered with the container (Unity). If I change the view to be a ContentPage I can get it to register with the container but when I run my test and tap a button that should launch the dialog via ShowDialog, I get the following error:
Specified cast is not valid.
at Prism.Services.Dialogs.DialogService.CreateViewFor (System.String name) [0x00000] in d:\a\1\s\Source\Xamarin\Prism.Forms\Services\Dialogs\DialogService.cs:154
at Prism.Services.Dialogs.DialogService.ShowDialog (System.String name, Prism.Services.Dialogs.IDialogParameters parameters, System.Action`1[T] callback) [0x00044] in d:\a\1\s\Source\Xamarin\Prism.Forms\Services\Dialogs\DialogService.cs:31
I'm not sure what is going wrong. The only difference in my code is that my test button is in a contentpage in a tabbedpage.
I think the docs need to be updated with an example that works.
Thanks for any help.
Dialogs must derive from type View. Since the RegisterDialog extension is strongly typed it enforces this. If you've circumvented the registration or instead used RegisterForNavigation then the issue is entirely that you're doing it wrong.
The error that you've reported here is that when the View is created for the Dialog it cannot cast it to type View.
Note that in your App.RegisterTypes you would have something like:
containerRegistry.RegisterDialog<DialogA>();
Related
I have a task to export a repeat grid's content to Excel. I have read an
article, but I still can't realize how to properly use it. I tried to repeat article's steps to provide pzRDExportWrapper, but after I click "Save" button I get the error:
Method: Rule-Obj-Activity instance not found:
Sb-FW-CTrackFW-Work.pzRDExportWrapper. Details: Invalid value for
Activity name passed to ActivityAssembler.
Could anybody give me any suggestions? Thank you.
You invoke activity from another activity which applies to class Sb-FW-CTrackFW-Work. Rule Resolution use primary context Sb-FW-CTrackFW-Work class and try invoke activity pzRDExportWrapper from it and you get error (because rule resolution can't found invoked activity in this class).
Activity pzRDExportWrapper applies to Rule-Obj-Report-Definition class. Try invoke from it.
Try activity step as below:
Call Rule-Obj-Report-Definition.pzRDExportWrapper
Or use step page for this step which defined as applies to Rule-Obj-Report-Definition class(you can declare it on Pages&Classes tab)
Okay. I have resolved the issue (thank you njc). I have two sections on a lone web page.
A context of the first section is my custom data page Co-Name-FW-Data-Search. The Search page has some single value properties which are initialized by an user via an UI.
The second section is a repeat grid section, a report definition as a source. My Search page pointed out in a Pages and Classes tab. Also there is a Page, which is created by report definition and contains results. The report definition takes Search’s values as parameters.
So, I have created an activity and passed the Search page and a Cods-Pega-List MyResultList as parameters. There are some steps in the activity:
Check if Search is null. If true- skip step; else - transfer Search properties into Params props with Data Transform.
Set Param.exportmode = "excel"
Call pzRDExportWrapper with Step Page MyResultList.pyReportDefinition. Pass current parameter page.
P.S.: If it doesn’t work try to play with report definition’s settings.
P.P.S.: An only minus of pzExportWrapper is that it invokes report definition again.
Have been stuck for days ... and then I found what was the issue
I have two pages one in case of tablet and the other in case of phone . Since they have different names then using ViewModelLocator.AutowireViewModel to share the same view model as a binding context does not work . So for this case I am using the classic binding context, as i did not want to create a viewmodel copy for each page.
My problem was when I run it gives me an error saying "no parameterless constructor defined for this object prism" The reason of this error is that the viewModel has a contructor that expects a navigationService.
To solve this error i have to remove the navigation service as an argument , but then I need it so i can navigate with it .
In this case I would recommend using the ViewModelLocationProvider.Register method. So in the application's RegisterTypes method, you can put a condition similar to this:
if (Device.Idiom == TargetIdiom.Tablet)
ViewModelLocationProvider.Register("MainPage", () => your logic);
else
ViewModelLocationProvider.Register("MainPage", () => your logic);
EDIT: Actually, you'll still have to manually resolve the INavigationService doing it this way. I am going to reopen your Prism Issue. We can look into improving the ViewModelocationProvider.Register method to enable this scenario.
Listed below is the definition of my function (vb).
I am trying to check the value of a checkbox inside the function. I am currently unable to do this without getting an error stating that
"Error 305: Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class."
Is there anything I can change so that I can get the value to see that if a checkbox is checked or not? The method must be shared, so it works with the existing javascript and the use of pagemethods
Thanks
<System.Web.Services.WebMethod()> _
Public Shared Function Load(inputs here - taken out for stack overflow) As String
edit- the only other solution i can think of is to find a way for the page's javascript onload to run before the server side, this would solve my issue as well if anyone knows how this can be done.
Yes. Do what the message suggests and make the method non-shared, then you'll be able to access the members of the page.
I am getting these weird runtime errors. I am using Flex 3.5 SDK with flash player set to 10.0.00.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.flash::UIMovieClip/removeFocusEventListeners()[E:\dev\flex\sdk\frameworks\projects\flash-integration\src\mx\flash\UIMovieClip.as:2368]
at mx.flash::UIMovieClip/focusOutHandler()[E:\dev\flex\sdk\frameworks\projects\flash-integration\src\mx\flash\UIMovieClip.as:2411]
I get this errors when I click on any other control in a popup. I am using buttons, textarea,textinput,and a list. I dont know how to fix this ... It would be great if someone pull me out this problem?
Without the code it's gonna be hard to pinpoint. This error could occur if you are trying to 1) access the property of an object that hasn't been created by the time the focus out handler is called, or 2) access the property of an object that ins't referenced in the focus out handler.
Make sure any non-local variables in the focus out handler reference an object that has been created somewhere in your application before the call to the focus out handler. Also, make sure a reference to each object gets passed into the focus out handler by declaring those variables globally, or passing the object to the function as a parameter.
Post the code if you can.
Seems you have to remove focus from your UIMovieClips before removing them from the stage:
http://forums.adobe.com/thread/658335?tstart=-1
Or just target flash player 10 where this bug is fixed.
Add this code to the top of any function that may remove a UImovieClip from the display list:
if (stage)
{
stage.focus = null;
}
I have created a Telerik report and I am setting the datasource on runtime to an object with some properties and a List. I am using the properties in the page and report header sections and i want to use the list as the details. Now the problem is binding to the List's item properties in the details section. I have played around with the expression builder and it seems that i should access the properties like this :
[=Fields.myList.Item.myProperty]
when i run the program i get a nice big red rectangle with the following error :
An error has occured while processing TextBox 'textBox28':Common Language Runtime detected an invalid program.
I have tried to change different variants of expression which also gives me other errors
[=Fields.myList.myPropery]
An error has occured while processing TextBox 'textBox28': The expression contains object 'myProperty' that is not defined in the current context.
The closest i have gotton was with the object it self, which outputs the object.toString()
[=Fields.myList]
I found a working solution although not what i was looking for, I created my own class with properties and made a List. I then retrieved the data from the db did the changes i wanted to do in the class and set the datasource of the report to the list. This is working quite well.
I struggled with this error:
An error has occured while processing TextBox 'textBox28': The expression contains object 'myProperty' that is not defined in the current context.
The solution I came up with was to make my model object inherit from List. For example:
public class MyReportModel : List<MyEntityDto> {
}
The look of the report wizard makes it seem like this isn't necessary, but I found no other way around this error.
This is for Telerik Reporting Q3 2013.