New Property in udm.DeploymentPackage as disabled in xldeploy - xl-deploy

XLDeploy allows its CI to be extended by adding entry in synthetic.xml.
i modified synthetic.xml and added a new property:
<type-modification type="udm.DeploymentPackage">
<property name="notes" kind="string"/>
i can see this property on UI now:
However i want this field to be Disabled or Readonly. Can i?

Read-only field in a CI feature is not implemented yet .. what you can do if you're not going to change it during deployment is to define a hidden field with a default value.
<type-modification type="udm.DeploymentPackage">
<property name="notes" kind="string" default="My Custom Notes" hidden="true"/>
If you want this to be visible then you will need to define 2 properties one visible and another hidden.
The visible would be a display text field.
The hidden would be what is actually used.
You can then make sure the description is clear that even if a user changes this value, it will remain at the default.
<type-modification type="udm.DeploymentPackage">
<property name="hiddenNotes" kind="string" default="My Custom Notes" hidden="true"/>
<property name="notes" kind="string" default="My Custom Notes" hidden="false" description="Changing this will not affect actual value, it will remain at the default"/>

Related

BlueprintJS RadioGroup/Radio issue with defaultChecked/checked prop

I'm trying to setup a RadioGroup component that has the Radio component with the 'Data' label initially checked. But when I use the following code:
<RadioGroup
onChange={(e) => {
this.store.setDataFilterSelection(e.target.value)
}}
>
<Radio label='Data'
defaultChecked
value='1'
className='radio-selectors' />
<Radio label='Description'
value='2'
className='radio-selectors' />
<Radio label='Data Source'
value='3'
className='radio-selectors' />
</RadioGroup>
I get the following warning in my console.
Blueprint.Radio contains an input of type radio with both checked and
defaultChecked props. Input elements must be either controlled or
uncontrolled (specify either the checked prop, or the defaultChecked
prop, but not both). Decide between using a controlled or uncontrolled
input element and remove one of these props. More info:
react-controlled-components
I've tried a couple of variations and can't seem to get it right, basically I want to be able to monitor a change in the Radio buttons, but I can't tie them into state as they've done in the example here: http://blueprintjs.com/docs/#components.forms.radio
defaultChecked is only supported in uncontrolled usage (this is a core React concept, not a Blueprint thing), whereas checked is only supported in controlled usage--this is what the React error is telling you.
But if you're using RadioGroup then all the Radio children are forced into controlled mode and all state should go through RadioGroup. However RadioGroup does not currently support a defaultValue prop so this is not actually possible. I'd call this a bug in Blueprint, so good find!
Please file an issue on the repo and we'll look into implementing this (or even better, submit a PR with the fix!)
I had same error and I used useState and set the value which we want to be default while declaring the state like
const [radio, setRadio] = useState('defaultValue');.
Since we cant use defaultChecked I used the above method to get the option to be default checked.

How to make Primefaces editor (p:editor) to notice when user has changed the text content?

I would like to make it so that once user edits the value content of p:editor, a save-button next to the editor would be enabled. It is disabled when there's no change on the editor value. It doesn't even need to compare the content on every keystroke to the old content, just editing ANYTHING on it would be enough in my case.
I noticed I can't put <p:ajax event="onchange" /> on it, because p:editor doesn't allow ajax-events. How could I do this?

How to set parameters in menu Item Joomla Component

Following is my code.
<fields name="request">
<fieldset name="request">
<field name="format" type="list" label="COM_CPS_FIELD_FORMAT"
description="COM_CPS_FIELD_FORMAT_DESC" class="small"
default="raw"
>
<option value="">COM_CPS_FORMAT_HTML</option>
<option value="raw">COM_CPS_FORMAT_RAW</option>
</field>
</fieldset>
</fields>
When I save the menu with 2nd option it save the url like this index.php?option=com_cps&view=webservice&format=raw but when I save the menu with first option it does not remove the &format=raw If any one can help me out It would be great.
Default is defined as what to save if nothing is posted. It works like a Joomla input filter in that it changes what is actually saved as opposed to validation which stops the process and never posts. Therefore you cannot save nothing, since it will always be replaced by the default. Therefore if you want to be able to save blank you must not have a default.
What you may be looking for is a preset, which is a preselected value that can be unselected. Presets and defaults are totally different things although on the surface they appear similar.

Work Item Customization - Rule behavior in Transition and State

Simple use case: in a work item workflow, a field must be REQUIRED in TRANSITION="Active to Resolved" and READONLY when in State="Resolved".
Customization: For that field, I have set the rule REQUIRED in the Transition details, and the Rule READONLY in the State details.
Behavior: When I change the work item State from Active to Resolved (without saving) the field becomes REQUIRED and READONLY. I was expecting that field switched to READONLY only after saving the work item to Resolved and not during transition.
Question: WHY the rule READONLY is applied in the Transition? Is this the common behavior of the workflows?
I'm working on TFS 2010. To edit the work item template I'm using Team Explroer Power tools (Process Editor). Work Item behavior is tested from Team Explorer e team Web access.
Thanks in advance
In this case the READONLY condition should have been evaluated only after saving but it won't. However you can wrap it within a WHENNOT condition (albeit not ideal solution as your filed must be filled before the state transition). e.g.:
<STATE value="Resolved">
<FIELDS>
<FIELD refname="Your.Field">
<WHENNOT field="Your.Field" value="">
<READONLY />
</WHENNOT>
</FIELD>
</FIELDS>
</STATE>

JSF Validation Error from Component that is not Rendered

I have a form that has a field that needs to be rendered as a read-only value when in edit mode and as a drop-down select list when in create mode.
The read-only field (used in edit mode) is rendered as plain text using <h:outputText>. In create mode, the field is rendered <h:selectOneListbox> that has a required attribute of "true".
It seems to work as I expect most of the time, but occasionally I get a validation error when in edit mode (the select list box is not rendered) .
Here is the code snippet that has both fields defined with their rendered attributes set using the same boolean value (just one field negates the boolean to toggle).
<h:outputLabel id="lblBusinessArea" value="Business Area:" />
<h:panelGroup id="baGroup">
<h:selectOneListbox id="businessAreaList" size="1"
rendered="#{shiftDetailsController.canEditBusinessArea}"
converter="businessAreaConverter"
value="#{shiftDetailsController.selectedBusinessArea}"
label="Business Area"
required="true">
<f:selectItems id="businessAreaListItems" value="#{shiftDetailsController.businessAreas}" />
<a4j:support id="businessAreaA4j" event="onchange"
ajaxSingle="true" reRender="deploymentGroupList, positionPayGroupList, sapPremCodeList" />
</h:selectOneListbox>
<h:outputText id="businessAreaRO"
rendered="#{!shiftDetailsController.canEditBusinessArea}"
value="#{shiftDetailsController.selectedBusinessArea.busAreaDesc}" />
</h:panelGroup>
Below is a screen clipping showing the field (in edit mode) rendered as read only. The "save" button was clicked and I get a validation error message that the field is required.
The value should be there in the backing bean because the value displayed is from the same object (shiftDetailsController.selectedBusinessArea). The output text uses the description field on the business area ojbect and the select field uses the whole object where the SelectItem has the description in the label.
Any idea how this could be occurring? I could set the required attribute using the same boolean value that determines the rendered state...so that it is only required when it is rendered...but since this problem is intermittent...I don't know that will really help.
I also verified that no other components on the page inadvertently have a label value of "Business Area" (which is being used in the validation message) to mislead me in which component truly has a null value; this is the only one that has the label of "Business Area".
I figured out what was happening with this issue.
Prior to submitting the form and receiving the validation error. I was making a change that caused the flag controlling the two components' visibility to be reversed.
rendered="#{shiftDetailsController.canEditBusinessArea}"
In other words, what I was doing on the form was causing the canEditBusinessArea to change values. But, I was not re-rendering the panel group ("baGroup") to cause the UI to reflect the update.
Thus, when my form was submitted the component during the validation phase was seen as being required...triggering the validation to happen. As soon as I added "baGroup" to the reRender of the action that was flipping the edit business area flag, the UI began reflecting the update and the submitted form had the value.

Resources