com.vaadin.flow.component.polymertemplate.rpc.
Class PublishedEventRpcHandlerUtil
- java.lang.Object
-
- com.vaadin.flow.component.polymertemplate.rpc.PublishedEventRpcHandlerUtil
-
All Implemented Interfaces:
public class PublishedEventRpcHandlerUtil extends Object implements Serializable
Polymer utilitiy class for handling polymer rpc events for @EventHandler.
Since:
See Also:
-
-
Constructor Summary
Constructors Constructor and Description PublishedEventRpcHandlerUtil()
-
Method Summary
All Methods Modifier and Type Method and Description static Object
getTemplateItem(Component template, elemental.json.JsonObject argValue, Type convertedType)
Get the template model object and type.
static boolean
isTemplateModelValue(Component instance, elemental.json.JsonValue argValue, Class<?> convertedType)
Validate that the given Component instance is a PolymerTemplate and that the value can be converted.
-
-
-
Method Detail
-
isTemplateModelValue
public static boolean isTemplateModelValue(Component instance, elemental.json.JsonValue argValue, Class<?> convertedType)
Validate that the given Component instance is a PolymerTemplate and that the value can be converted.
Parameters:
instance
- Component to be validatedargValue
- received valueconvertedType
- target type that value should be converted toReturns:
true if valid template model value
-
getTemplateItem
public static Object getTemplateItem(Component template, elemental.json.JsonObject argValue, Type convertedType)
Get the template model object and type.
Parameters:
template
- polymer template to get model fromargValue
- argument valueconvertedType
- value typeReturns:
the provided model value
Throws:
IllegalStateException
- if the component is not attached to the UI
-
-