@Test public void testSetProperty() throws Exception { Map<String, Object> props = new HashMap<>(); int len = EditComponentTest.PROPS.length; for (int i = 0; i < len; i++) { for (Object obj : EditComponentTest.TEST_VALUES[i]) { props.put(EditComponentTest.PROPS[i], obj); component.updateProperties(props); } } }
@Override protected boolean setProperty(String key, Object param) { switch (key) { case Constants.Name.ROWS: Integer rows = WXUtils.getInteger(param,null); if (rows != null) setRows(rows); return true; } return super.setProperty(key, param); }
Textarea extends AbstractEditComponent { @Override protected boolean setProperty(String key, Object param) { switch (key) { case Constants.Name.ROWS: Integer rows = WXUtils.getInteger(param,null); if (rows != null) setRows(rows); return true; } return super.setProperty(key, param); } }
Textarea extends AbstractEditComponent { @Override protected boolean setProperty(String key, Object param) { switch (key) { case Constants.Name.ROWS: Integer rows = WXUtils.getInteger(param,null); if (rows != null) setRows(rows); return true; } return super.setProperty(key, param); } Textarea(WXSDKInstance instance, WXVContainer parent, boolean isLazy, BasicComponentData basicComponentData); }
Textarea extends AbstractEditComponent { @Override protected boolean setProperty(String key, Object param) { switch (key) { case Constants.Name.ROWS: Integer rows = WXUtils.getInteger(param,null); if (rows != null) setRows(rows); return true; } return super.setProperty(key, param); } Textarea(WXSDKInstance instance, WXVContainer parent, boolean isLazy, BasicComponentData basicComponentData); @WXComponentProp(name = Constants.Name.ROWS) void setRows(int rows); }
Textarea extends AbstractEditComponent { @Override protected boolean setProperty(String key, Object param) { switch (key) { case Constants.Name.ROWS: Integer rows = WXUtils.getInteger(param,null); if (rows != null) setRows(rows); return true; } return super.setProperty(key, param); } Textarea(WXSDKInstance instance, WXVContainer parent, boolean isLazy, BasicComponentData basicComponentData); @WXComponentProp(name = Constants.Name.ROWS) void setRows(int rows); static final int DEFAULT_ROWS; }