Skip to content

Commit

Permalink
replace tabs by spaces, project wide
Browse files Browse the repository at this point in the history
  • Loading branch information
BalusC committed Sep 14, 2024
1 parent 4cf269c commit 3a11b75
Show file tree
Hide file tree
Showing 79 changed files with 4,848 additions and 4,848 deletions.
1,734 changes: 867 additions & 867 deletions pom.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
*/
public class ExtendedDataTable extends DataTable {

@Override
protected void preDecode(FacesContext context) {
@Override
protected void preDecode(FacesContext context) {
if (context.isPostback() && isLazy()) {
DataModel<?> model = getDataModel();
DataModel<?> model = getDataModel();

if (model instanceof LazyPagedDataModel && model.getWrappedData() == null) {
((LazyPagedDataModel<?>) model).preloadPage(context, this);
}
if (model instanceof LazyPagedDataModel && model.getWrappedData() == null) {
((LazyPagedDataModel<?>) model).preloadPage(context, this);
}
}

super.preDecode(context);
}
super.preDecode(context);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,57 +26,57 @@

public class NestedBaseEntityELResolver extends ELResolver {

@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
return null;
}

@Override
public Class<?> getType(ELContext context, Object base, Object property) {
return null;
}

@Override
public Object getValue(ELContext context, Object base, Object property) {
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
return null;
}

@Override
public Class<?> getType(ELContext context, Object base, Object property) {
return null;
}

@Override
public Object getValue(ELContext context, Object base, Object property) {
if (!(base instanceof BaseEntity)) {
return null;
}

String propertyString = property.toString();

if (!propertyString.contains(".")) {
return null;
return null;
}

Object value = base;

for (String propertyPart : propertyString.split("\\.")) {
if (value instanceof Collection) {
value = stream(value).map(item -> context.getELResolver().getValue(context, item, propertyPart)).collect(toList());
}
else {
value = context.getELResolver().getValue(context, value, propertyPart);
}
if (value instanceof Collection) {
value = stream(value).map(item -> context.getELResolver().getValue(context, item, propertyPart)).collect(toList());
}
else {
value = context.getELResolver().getValue(context, value, propertyPart);
}

}

context.setPropertyResolved(true);
return value;
}

@Override
public void setValue(ELContext context, Object base, Object property, Object val) {
// NOOP.
}

@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
return true;
}

@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
return null;
}
}

@Override
public void setValue(ELContext context, Object base, Object property, Object val) {
// NOOP.
}

@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
return true;
}

@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
return null;
}

}
Loading

0 comments on commit 3a11b75

Please sign in to comment.