Skip to content

Image stored on the File System always has the name NULL_VALUE #188

@kowlown

Description

@kowlown

The name of the images which are store in the file system and the value of the entities have all the value : NULL_VALUE.
Thus the different entities can not have there own image.


Here is the POJO :

/**
 * Created on 09/04/2015
 */
@Entity
@Table(name = "projects", uniqueConstraints = {})
public class Project extends GenericEntity {

    private static final long serialVersionUID = 1L;

    @Column(name = "name", nullable = false, length = 45)
    private String name;

    @FileReference
    @Column(name = "picture", nullable = false)
    private String picture;

    /*
    .
    .Truncated - fields
    .
    */
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    /*
    .
    .Truncated - Getters and setters
    .
    */


}

And there the form creation method :

@Override
public FieldSetConfigurationUnit formView(PersistentFieldSetConfigurationUnitBuilder fragmentBuilder) {

    // @formatter:off
    return fragmentBuilder
            .field("name").caption("Name")
            .field("picture").caption("Picture")
            .field("status").caption("Status").enumeration(createEnumElements())
            .field("summary").caption("Summary").editor(textArea())
            .field("description").caption("Description").editor(wysiwyg())
            .build();
    // @formatter:on
}

The base directory has been configured in the web.xml file

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions