I am building a SCOM management package which adds a Task to some class.
I could have defined a list of Task Parameters, each consisting of and Name and a Value.
Is there any way I could set these Values to predefined Drop Down Lists to avoid typos?
No, you can't. But you can restrict values via xsd schema.
Related
I think the answer is no, but the question has been put to me so I'd like to confirm. My understanding is that any custom XBL control that I create for use in Form Builder can have one and only one value. Is this correct?
I have always assumed this because the control name is then used in the data instance as the name of the node which contains the the value.
This question comes from the desire to have reusable components with multiple values, for example, an Address control so that addresses can be recorded consistently and the same set of fields does not need to be added many times. Orbeon does have some support for this in the form of Section Templates but because the control names stay the same in each instance of a Section Template this does not work well with our design.
The best idea I've had is that a custom control which records multiple values could encode all the values into a single text string for example in JSON. Of course, this is not ideal.
Are there any other options?
It is possible for controls to have multiple values. When that happens the values are typically stored in nested elements. I.e. a control could bound to an element <address>, and could create nested elements <street>, <city>,<country>, etc to store the different parts of the address.
In practice, you can look at how this is done in the Image Annotation annotation control (see wpaint.xbl), which creates nested elements <image> and <annotation>, leveraging the xxbl:mirror="true" functionality.
I would like to execute a job that requires that I save a type in the JobDataMap. This will later be used along with the ID of an entity to rehydrate the entity so the job can use it.
I know I could get the AssemblyQualifiedName of the type and store that, then use GetType() in the job, but before I go down that path, I thought I'd see if quartz just does this for me.
If I put a type in the JobDataMap, will it serialize and deserialize when I access the property later?
Sure it will. You can use the JobDataMap indexer to store arbitrary data. Type instances are quite safe, but you need to be extra careful about versions (using only assembly qualified name removes this problem), namespaces and public keys.
If there were a slight possibility that the type might change after persisting I would recommended using a 'meta name' like 'BackupJobHelperType' that you would then resolve to the actual type. Generelly always prefer simple serialization safe types over own types, if possible set quartz.jobStore.useProperties to true which will enforce string key and values.
You can save the info when building the job and it will be available when the job starts.
I have a database application project written in Delphi XE and connected to MySQL Database using dbExpress. I use JVCL grid Components to show the records from the Dataset. It will be more efficiently if I can use another JVCL Components to do the FormStorage.
I've been suggested to use TJvFormStorage and TJvAppIniFileStorage for form storage. I have many forms on this project so I need to adding new section in my INI file to store the form size values but I don't know how to do that using TJvAppIniFileStorage.
The TJvAppIniFileStorage is just providing the DefaultSection() method which means it's just can modify and write into one section only which declared as the default.
Anyone can describe to me how to adding new section using the JVCL's TJvAppIniFileStorage?
Thanks in advance.
Is the TJvFormStorage instance the one that determines in which path of the abstract storage to put the data about this form, with the value of the AppStoragePath property.
You can use the special value '%FORM_NAME%' to determine that path automatically at run-time. The '%FORM_NAME%' is changed for the real .Name property of the form where the component is located, or if it is a frame, a dot list of the frame chain up to the form containing it. That way you can have different instances of the same class saving the info to different paths.
When you're using a TJvAppIniFileStorage instance as the data storage backed to save the form data to a INI file, that path is equivalent to the INI section where the information is stored.
In other words, if you want to store the info of your form in a section called 'MyForm', set that value to the AppStoragePath property of the TjvFormStorage instance in that form.
Use the Source, Luke! ;)
My guess is: It uses Parent.Name or Parent.ClassName to store parameters.
Another point: take in mind several monitors on user's computer. Almost no app takes in mind this case.
I'm trying to implement a very granular security module in an ASP.NET MVC 3 app where only certain users can edit certain columns on records in a table. I can imagine that the update SQL statement's list of columns would only include the columns that the user had the right to change. The thing is, I'm planning to use an ORM like NHibernate. I'm wondering if NHibernate provides a way to determine at runtime which properties of a model should be part of an Update. Or is my only option to, on the POST method, get the model again from the database, set only the properties that the user is allowed to set then finally Save the model. Also, is this a good way to handle my requirement of of granular security?
Would dynamic-update and dynamic-insert be enough?
dynamic-update (optional, defaults to false): Specifies that UPDATE SQL should be generated at runtime and contain only those columns whose values have changed.
dynamic-insert (optional, defaults to false): Specifies that INSERT SQL should be generated at runtime and contain only the columns whose values are not null.
Otherwise it might be possible with events or interceptors, but I've never used them so I don't know exactly.
In JIRA, is there a way when a sub task is created, to have it inherit custom field values from the parent?
For example, we have custom fields called "Epic" and "Feature". If the story has an "Epic" value of "Email" and the "Feature" value of "Stylesheets". When you click the "Create sub task", the sub task should automatically have "Epic" = "Email" and "Feature" = "Stylesheets".
What ways have you done this in the past?
Thanks
I do this two ways:
Use the Create and Link plugin. You can specify which fields will inherit values, alter or append the values, or explicitly set values. This works for both standard and custom field.
Add a post-function to the "Create" step of the subtask's workflow. When the task is created it could check the parent for the values of "Epic" and "Feature" and use those values to populate the subtask. I used the Jira Scripting Suite plugin to write the post-function in Jython.
It would be nice to have a one step way to do this. The best I've found is two steps - clone the issue, which will duplicate all the field values, and then change it to a subtask.