Skip to content

Commit

Permalink
Merge pull request #174 from devgateway/develop
Browse files Browse the repository at this point in the history
oce-0.7.0 merged develop to master
  • Loading branch information
mpostelnicu authored Sep 25, 2016
2 parents 4c35448 + e8e69a8 commit ed7b02e
Show file tree
Hide file tree
Showing 146 changed files with 3,750 additions and 1,045 deletions.
15 changes: 10 additions & 5 deletions forms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<wicket.bootstrap.version>0.10.8</wicket.bootstrap.version>
<zt.zip.version>1.9</zt.zip.version>
<wicket.webjars.version>0.5.5</wicket.webjars.version>
<closure.compiler.version>v20160822</closure.compiler.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -123,6 +124,13 @@
<artifactId>cglib</artifactId>
<version>3.1</version>
</dependency>

<dependency>
<groupId>com.google.javascript</groupId>
<artifactId>closure-compiler</artifactId>
<version>${closure.compiler.version}</version>
</dependency>


<dependency>
<groupId>de.agilecoders.wicket.webjars</groupId>
Expand Down Expand Up @@ -330,17 +338,14 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>${hibernate.core.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.core.version}</version>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-envers</artifactId>
<version>${hibernate.core.version}</version>
<artifactId>hibernate-envers</artifactId>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ public void clearReportsCache() {

// get the reports cache "reportsCache", declared in ehcache.xml
Cache cache = cm.getCache("reportsCache");

if (cache != null) {
cache.removeAll();
}

cache.removeAll();
}

private String createCacheKey(final String outputType, final String reportName, final String parameters) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.wicket.feedback.IFeedbackMessageFilter;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.FormComponent;
import org.apache.wicket.markup.html.form.FormComponentPanel;
import org.apache.wicket.markup.html.form.upload.FileUpload;
import org.apache.wicket.markup.html.link.Link;
Expand Down Expand Up @@ -437,6 +438,25 @@ protected void onSubmit(final AjaxRequestTarget target) {
};

add(bootstrapFileInput);


/**
* due to an upgrade of FormGroup in wicket7/wicket-bootrap-0.10, the
* visitor that finds inner FormComponentS, will now find two instead of
* one: the FileInputBootstrapFormComponentWrapper and also the
* BootstrapFileInputField. This is the RIGHT result, previously in
* wicket 6.x it only got the first level of children, hence only one
* FormComponent (the FileInputBootstrapFormComponentWrapper). It would then
* read the label from FileInputBootstrapFormComponentWrapper and use it
* for displaying the label of the FormGroup. In
* wicket7/wicket-bootstrap-0.10 this will result in reading the label
* of BootstrapFileInputField which is null. So you will notice no
* labels for FormGroupS. We fix this by forcing the label of the
* underlying fileInput element to the same model as the label used by
* FileInputBootstrapFormComponentWrapper
*/
FormComponent<?> fileInput = (FormComponent<?>) bootstrapFileInput.get("fileInputForm").get("fileInput");
fileInput.setLabel(this.getLabel());

// there are situation when we want to display the upload file component
// only to admins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ public GenericBootstrapFormComponent(final String id, final IModel<String> label

tooltipLabel = new TooltipLabel("tooltipLabel", id);
border.add(tooltipLabel);

if (!labelHidden) {
field.setLabel(labelModel);
}
}

@Override
Expand Down Expand Up @@ -207,10 +211,6 @@ public FIELD getField() {
protected void onInitialize() {
super.onInitialize();

if (!labelHidden) {
field.setLabel(labelModel);
}

if ((field instanceof RadioGroup) || (field instanceof CheckGroup)) {
getAjaxFormChoiceComponentUpdatingBehavior();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/
public class TestFormFilterState extends JpaFilterState<TestForm> {

private static final long serialVersionUID = 8005371716983257722L;
private String textField;
private static final long serialVersionUID = 8005371716983257722L;
private String textField;

@Override
public Specification<TestForm> getSpecification() {
Expand Down
Binary file added forms/src/main/resources/banner.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion persistence-mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<start-class>org.devgateway.toolkit.persistence.spring.PersistenceApplication</start-class>
<java.version>1.8</java.version>
<joda.time.version>2.7</joda.time.version>
<jadira.usertype.version>3.2.0.GA</jadira.usertype.version>
<jadira.usertype.version>5.0.0.GA</jadira.usertype.version>
<ehcache.version>2.6.11</ehcache.version>
<json.schema.validator.version>2.2.6</json.schema.validator.version>
<json.patch.version>1.9</json.patch.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public String getStreetAddress() {
* The streetAddress
*/
@JsonProperty("streetAddress")
public void setStreetAddress(String streetAddress) {
public void setStreetAddress(final String streetAddress) {
this.streetAddress = streetAddress;
}

Expand All @@ -112,7 +112,7 @@ public String getLocality() {
* The locality
*/
@JsonProperty("locality")
public void setLocality(String locality) {
public void setLocality(final String locality) {
this.locality = locality;
}

Expand All @@ -134,7 +134,7 @@ public String getRegion() {
* The region
*/
@JsonProperty("region")
public void setRegion(String region) {
public void setRegion(final String region) {
this.region = region;
}

Expand All @@ -156,7 +156,7 @@ public String getPostalCode() {
* The postalCode
*/
@JsonProperty("postalCode")
public void setPostalCode(String postalCode) {
public void setPostalCode(final String postalCode) {
this.postalCode = postalCode;
}

Expand All @@ -178,7 +178,7 @@ public String getCountryName() {
* The countryName
*/
@JsonProperty("countryName")
public void setCountryName(String countryName) {
public void setCountryName(final String countryName) {
this.countryName = countryName;
}

Expand All @@ -199,7 +199,7 @@ public int hashCode() {
}

@Override
public boolean equals(Object other) {
public boolean equals(final Object other) {
if (other == this) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public Date getDate() {
* The date
*/
@JsonProperty("date")
public void setDate(Date date) {
public void setDate(final Date date) {
this.date = date;
}

Expand All @@ -104,7 +104,7 @@ public List<Change> getChanges() {
* The changes
*/
@JsonProperty("changes")
public void setChanges(List<Change> changes) {
public void setChanges(final List<Change> changes) {
this.changes = changes;
}

Expand All @@ -126,7 +126,7 @@ public String getRationale() {
* The rationale
*/
@JsonProperty("rationale")
public void setRationale(String rationale) {
public void setRationale(final String rationale) {
this.rationale = rationale;
}

Expand All @@ -145,7 +145,7 @@ public int hashCode() {
}

@Override
public boolean equals(Object other) {
public boolean equals(final Object other) {
if (other == this) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public BigDecimal getAmount() {
* The amount
*/
@JsonProperty("amount")
public void setAmount(BigDecimal amount) {
public void setAmount(final BigDecimal amount) {
this.amount = amount;
}

Expand All @@ -83,7 +83,7 @@ public String getCurrency() {
* The currency
*/
@JsonProperty("currency")
public void setCurrency(String currency) {
public void setCurrency(final String currency) {
this.currency = currency;
}

Expand All @@ -101,7 +101,7 @@ public int hashCode() {
}

@Override
public boolean equals(Object other) {
public boolean equals(final Object other) {
if (other == this) {
return true;
}
Expand Down
Loading

0 comments on commit ed7b02e

Please sign in to comment.