Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
c3e6500c
Commit
c3e6500c
authored
8 years ago
by
anttil
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-2228: Openbis UI - missing "Update Value" when setting mandatory property
SVN: 36276
parent
01bae5ef
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentGrid.java
+36
-37
36 additions, 37 deletions
...lication/ui/property_type/PropertyTypeAssignmentGrid.java
with
36 additions
and
37 deletions
openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentGrid.java
+
36
−
37
View file @
c3e6500c
...
...
@@ -29,7 +29,6 @@ import com.extjs.gxt.ui.client.event.Listener;
import
com.extjs.gxt.ui.client.event.SelectionListener
;
import
com.extjs.gxt.ui.client.widget.Dialog
;
import
com.extjs.gxt.ui.client.widget.Label
;
import
com.extjs.gxt.ui.client.widget.MessageBox
;
import
com.extjs.gxt.ui.client.widget.Window
;
import
com.extjs.gxt.ui.client.widget.button.Button
;
import
com.extjs.gxt.ui.client.widget.form.CheckBox
;
...
...
@@ -297,14 +296,13 @@ public class PropertyTypeAssignmentGrid extends TypedTableGrid<EntityTypePropert
final
AsyncCallback
<
Integer
>
callback
=
new
UnassignmentPreparationCallback
(
viewContext
,
etpt
,
invoker
,
new
UnassigmentExecution
()
{
@Override
public
void
executeUnassignment
()
{
(
new
InMemoryGridRemoveCallback
()).
callback
(
etpt
);
}
}
);
{
@Override
public
void
executeUnassignment
()
{
(
new
InMemoryGridRemoveCallback
()).
callback
(
etpt
);
}
});
viewContext
.
getService
().
countPropertyTypedEntities
(
entityKind
,
propertyTypeCode
,
entityTypeCode
,
callback
);
}
...
...
@@ -493,21 +491,21 @@ public class PropertyTypeAssignmentGrid extends TypedTableGrid<EntityTypePropert
viewContext
.
getCommonService
().
listPropertyTypeAssignments
(
etpt
.
getEntityType
(),
new
AbstractAsyncCallback
<
List
<
EntityTypePropertyType
<?>>>(
viewContext
)
{
@Override
protected
void
process
(
List
<
EntityTypePropertyType
<?>>
etpts
)
{
form
.
remove
(
loading
);
if
(
assignmentsHolder
.
getAssignments
()
==
null
)
{
@Override
protected
void
process
(
List
<
EntityTypePropertyType
<?>>
etpts
)
{
form
.
remove
(
loading
);
if
(
assignmentsHolder
.
getAssignments
()
==
null
)
{
initFields
(
etpts
);
}
else
{
initFields
(
assignmentsHolder
.
getAssignments
().
getEntity
().
getAssignedPropertyTypes
());
}
isLoaded
=
true
;
}
});
initFields
(
etpts
);
}
else
{
initFields
(
assignmentsHolder
.
getAssignments
().
getEntity
().
getAssignedPropertyTypes
());
}
isLoaded
=
true
;
}
});
}
private
void
initFields
(
List
<?
extends
EntityTypePropertyType
<?>>
etpts
)
...
...
@@ -534,25 +532,26 @@ public class PropertyTypeAssignmentGrid extends TypedTableGrid<EntityTypePropert
// Script Field
scriptChooser
=
createScriptChooserField
(
viewContext
,
script
!=
null
?
script
.
getName
()
:
null
,
script
!=
null
,
script
!=
null
?
script
.
getScriptType
()
:
null
,
entityKind
);
:
null
,
entityKind
);
addField
(
scriptChooser
);
// Show in edit views Field
shownInEditViewCheckBox
=
new
CheckBoxField
(
viewContext
.
getMessage
(
Dict
.
SHOWN_IN_EDIT_VIEW
),
false
);
shownInEditViewCheckBox
.
setValue
(
etpt
.
isShownInEditView
());
shownInEditViewCheckBox
.
setVisible
(!
etpt
.
isDynamic
());
// This option is shown for all non system generated properties
shownInEditViewCheckBox
.
setVisible
(!
etpt
.
isDynamic
());
// This option is shown for all non system generated properties
shownInEditViewCheckBox
.
addListener
(
Events
.
Change
,
new
Listener
<
FieldEvent
>()
{
@Override
public
void
handleEvent
(
FieldEvent
be
)
{
if
(!
shownInEditViewCheckBox
.
getValue
())
@Override
public
void
handleEvent
(
FieldEvent
be
)
{
mandatoryCheckbox
.
setValue
(
Boolean
.
FALSE
);
if
(!
shownInEditViewCheckBox
.
getValue
())
{
mandatoryCheckbox
.
setValue
(
Boolean
.
FALSE
);
}
}
}
});
});
addField
(
shownInEditViewCheckBox
);
// Show raw values Field
...
...
@@ -566,7 +565,7 @@ public class PropertyTypeAssignmentGrid extends TypedTableGrid<EntityTypePropert
addField
(
showRawValuesCheckBox
);
// default value needs to be specified only if currently property is optional
if
(
originalIsMandatory
)
if
(
originalIsMandatory
==
false
)
{
String
originalRawValue
=
null
;
if
(
newETNewPTAssigments
!=
null
)
...
...
@@ -695,7 +694,8 @@ public class PropertyTypeAssignmentGrid extends TypedTableGrid<EntityTypePropert
if
(
etpt
.
isDynamic
())
{
return
false
;
}
else
{
}
else
{
return
shownInEditViewCheckBox
.
getValue
();
}
}
...
...
@@ -770,8 +770,7 @@ public class PropertyTypeAssignmentGrid extends TypedTableGrid<EntityTypePropert
final
String
propertyTypeCode
=
etpt
.
getPropertyType
().
getCode
();
final
IBrowserGridActionInvoker
invoker
=
asActionInvoker
();
final
AsyncCallback
<
Integer
>
callback
=
new
UnassignmentPreparationCallback
(
viewContext
,
etpt
,
invoker
,
new
ServerUnassingmentExecutor
(
etpt
,
invoker
)
);
new
ServerUnassingmentExecutor
(
etpt
,
invoker
));
viewContext
.
getService
().
countPropertyTypedEntities
(
entityKind
,
propertyTypeCode
,
entityTypeCode
,
callback
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment