I'm using EWL and I have an EwfPage and when I type partial in the Info class I see:
partial void initDefaultOptionalParameterPackage( OptionalParameterPackage package )
and
partial void initUserDefaultOptionalParameterPackage( OptionalParameterPackage package )
I don't really see what they're used for. They also sound similar and I'm wondernig what the difference between them is.
They are both used if you want an optional parameter to default to something other than the default value of its C# data type. There are two significant differences:
initUserDefaultOptionalParameterPackageis called only when you are creating anInfoobject for the page; it is not called when the page is requested. If a request is made without a parameter value in the URL, the framework will fall back to the value specified ininitDefaultOptionalParameterPackageor the data type default.AppTools.UserfrominitUserDefaultOptionalParameterPackageif you meet the conditions specified in the doc comment forAppTools.User.An example of when you might use
initUserDefaultOptionalParameterPackageis a page that should default to showing information for the currently logged-in user but has a select list or something that lets you look at information for a different user.