CE-1955 Add FILE_UPLOAD adornment type

This commit is contained in:
2024-12-03 08:56:45 -06:00
parent b055913fc8
commit b0cc93cbb7
2 changed files with 63 additions and 1 deletions

View File

@ -41,6 +41,7 @@ public enum AdornmentType
RENDER_HTML,
REVEAL,
FILE_DOWNLOAD,
FILE_UPLOAD,
ERROR;
//////////////////////////////////////////////////////////////////////////
// keep these values in sync with AdornmentType.ts in qqq-frontend-core //
@ -164,4 +165,65 @@ public enum AdornmentType
}
}
/*******************************************************************************
**
*******************************************************************************/
public static class FileUploadAdornment
{
public static String FORMAT = "format";
public static String WIDTH = "width";
/***************************************************************************
**
***************************************************************************/
public static FieldAdornment newFieldAdornment()
{
return (new FieldAdornment(AdornmentType.FILE_UPLOAD));
}
/***************************************************************************
**
***************************************************************************/
public static Pair<String, String> formatDragAndDrop()
{
return (Pair.of(FORMAT, "dragAndDrop"));
}
/***************************************************************************
**
***************************************************************************/
public static Pair<String, String> formatButton()
{
return (Pair.of(FORMAT, "button"));
}
/***************************************************************************
**
***************************************************************************/
public static Pair<String, String> widthFull()
{
return (Pair.of(WIDTH, "full"));
}
/***************************************************************************
**
***************************************************************************/
public static Pair<String, String> widthHalf()
{
return (Pair.of(WIDTH, "half"));
}
}
}

View File

@ -177,7 +177,7 @@ public class FieldAdornment
** Fluent setter for values
**
*******************************************************************************/
public FieldAdornment withValue(Pair<String, Serializable> value)
public FieldAdornment withValue(Pair<String, ? extends Serializable> value)
{
return (withValue(value.getA(), value.getB()));
}