Skip to content

Commit

Permalink
Resource drop-down behavior is fixed on the debug pages
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Mar 16, 2016
1 parent aceb132 commit 5c5a0cb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
Expand Up @@ -511,7 +511,7 @@ private void listObjectsPerformed(ObjectQuery query, AjaxRequestTarget target) {

if (selected != null) {
provider.setType(selected.getClassDefinition());
addOrReplaceTable(provider);
// addOrReplaceTable(provider);
}

// save object type category to session storage, used by back button
Expand Down Expand Up @@ -944,24 +944,32 @@ protected void onUpdate(AjaxRequestTarget target) {
});

DropDownChoice resource = new DropDownChoice(ID_RESOURCE,
new PropertyModel(model, DebugSearchDto.F_RESOURCE_OID), resourcesModel,
new PropertyModel(model, DebugSearchDto.F_RESOURCE), resourcesModel,
createResourceRenderer());
resource.setNullValid(true);
resource.add(new AjaxFormComponentUpdatingBehavior("blur") {

@Override
protected void onUpdate(AjaxRequestTarget target) {
// nothing to do, it's here just to update model
}
});
@Override
protected void onUpdate(AjaxRequestTarget target) {
// nothing to do, it's here just to update model
}
});
resource.add(new OnChangeAjaxBehavior() {

@Override
protected void onUpdate(AjaxRequestTarget target) {
PageDebugList page = (PageDebugList) getPage();
page.listObjectsPerformed(target);
}
});
resource.add(new VisibleEnableBehaviour() {

@Override
public boolean isVisible() {
DebugSearchDto dto = model.getObject();
return ObjectTypes.SHADOW.equals(dto.getType());
}
});
@Override
public boolean isVisible() {
DebugSearchDto dto = model.getObject();
return ObjectTypes.SHADOW.equals(dto.getType());
}
});
searchForm.add(resource);

AjaxCheckBox zipCheck = new AjaxCheckBox(ID_ZIP_CHECK, new Model<>(false)) {
Expand Down
Expand Up @@ -28,7 +28,7 @@
public class DebugSearchDto implements Serializable {

public static final String F_TYPE = "type";
public static final String F_RESOURCE_OID = "resource";
public static final String F_RESOURCE = "resource";
public static final String F_SEARCH = "search";

private ObjectTypes type;
Expand Down

0 comments on commit 5c5a0cb

Please sign in to comment.