[
https://issues.jboss.org/browse/JBIDE-17227?page=com.atlassian.jira.plugi...
]
Andre Dietisheim edited comment on JBIDE-17227 at 5/21/14 5:51 AM:
-------------------------------------------------------------------
IMHO we could do that by the following:
# implement IApplicationTemplate#isInitialGitUrlEditable which is *false* for
IQuickstartApplicationTemplate
# provide some method ApplicationConfigurationWizardPageModel#isSourceCodeEditable like
the current #isCanAddRemoveCartridges()
{code}
public boolean isCanAddRemoveCartridges() {
return getSelectedApplicationTemplate() != null
&& getSelectedApplicationTemplate().canAddRemoveCartridges();
}
{code}
# make sure the ApplicationConfigurationWizardPageModel fires this property if the
selected application changes, like it already does for #isCanAddRemoveCartridges:
{code}
new PojoEventBridge() {
@Override
public void propertyChange(PropertyChangeEvent event) {
firePropertyChange(PROPERTY_SELECTED_APPLICATION_TEMPLATE, event.getOldValue(),
event.getNewValue());
fireCanAddRemoveCartridges();
}
}
{code}
# bind checkbox and sourcecode-text field to this model property in a similar way like it
is done for #isCanAddRemoveCartridges currently: (typed code, not tested)
{code:title=ApplicationConfigurationWizardPage}
BeanProperties.value(ApplicationConfigurationWizardPageModel.PROPERTY_IS_SOURCE_CODE_EDITABLE)
.observe(pageModel)
.WidgetProperties.enabled().observe(checkbox);
BeanProperties.value(ApplicationConfigurationWizardPageModel.PROPERTY_IS_SOURCE_CODE_EDITABLE)
.observe(pageModel)
.WidgetProperties.enabled().observe(text);
{code}
was (Author: adietish):
IMHO we could do that by the following:
# implement IApplicationTemplate#isInitialGitUrlEditable which is *false* for
IQuickstartApplicationTemplate
# provide some method ApplicationConfigurationWizardPageModel#isSourceCodeEditable like
the current #isCanAddRemoveCartridges()
{code}
public boolean isCanAddRemoveCartridges() {
return getSelectedApplicationTemplate() != null
&& getSelectedApplicationTemplate().canAddRemoveCartridges();
}
{code}
# make sure the ApplicationConfigurationWizardPageModel fires this property if the
selected application changes, like it already does for #isCanAddRemoveCartridges:
{code}
new PojoEventBridge() {
@Override
public void propertyChange(PropertyChangeEvent event) {
firePropertyChange(PROPERTY_SELECTED_APPLICATION_TEMPLATE, event.getOldValue(),
event.getNewValue());
fireCanAddRemoveCartridges();
}
}
{code}
# bind checkbox and sourcecode-text field to this model property in a similar way like it
is done for #isCanAddRemoveCartridges currently: (typed code, not tested)
{code:title=ApplicationConfigurationWizardPage}
BeanProperties.value(ApplicationConfigurationWizardPageModel.PROPERTY_IS_SOURCE_CODE_EDITABLE)
.observe(pageModel)
.WidgetProperties.enabled().observe(checkbox);
BeanProperties.value(ApplicationConfigurationWizardPageModel.PROPERTY_IS_SOURCE_CODE_EDITABLE)
.observe(pageModel)
.WidgetProperties.enabled().observe(text);
{code}
Application wizard: unchecking "Use default source code"
wont enable "Source code" text field
---------------------------------------------------------------------------------------------
Key: JBIDE-17227
URL:
https://issues.jboss.org/browse/JBIDE-17227
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.2.0.Beta2
Reporter: Marián Labuda
Assignee: Andre Dietisheim
Labels: application_wizard
Fix For: 4.2.0.Beta2
Attachments: BasicCartridge.png, Quickstart.png, source_code_text.png
In new OpenShift application wizard there is 3 choices how to create new applicaiton:
- Code Anything
- Basic/default cartridges
- Quickstarts
If user choose quickstart, on next wizard page is Source code field filled with
appropriate url. But if user choose Basic cartridge, on the same next wizard page is by
default checkbox "Use default source code" checked (that's ok) but after
click on checkbox (make it unchecked), field is blank and uneditable and it is not also
proceed to next wizard page / finish wizard (that's ok).
!source_code_text.png!
How it should work:
- Basic cartridge - Advance section should be collapsed by default. After expanding
Default source code checkbox should be checked. After unchecking it should be able to edit
text.
- Quickstart - If quickstart has source code then Default source code checkbox should be
unchecked and in source code text should be URL of source code and this source code text
should be uneditable. If quickstart does not have source code then advance section should
be collapsed and Default source code checkbox should be checked.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)