const char *title = (char*)xmlGetProp(xmlObj, "title");
const char *key_str= (char*)xmlGetProp(xmlObj, "value");
- //const char *minlength= (char*)xmlGetProp(xmlObj, "minlength");
- //const char *maxlength= (char*)xmlGetProp(xmlObj, "maxlength");
+ const char *minlength= (char*)xmlGetProp(xmlObj, "minlength");
+ const char *maxlength= (char*)xmlGetProp(xmlObj, "maxlength");
- // TODO: minlength
- // TODO: maxlength
- Setting_GenGroupItem_Data *list_item =
- setting_create_Gendial_field_def(pd->scroller, &(itc_1icon),
- __editbox_list_cb,
- pd, SWALLOW_Type_LAYOUT_ENTRY,
- NULL, NULL, 0, title, key_str,
- __editbox_changed_cb);
+ int max_len = -1;
+ if (maxlength)
+ {
+ max_len = atoi(maxlength);
+ SETTING_TRACE(" >> MAXLENGTH FILTER IS AVAILABLE !!!! maxlength = %d", max_len);
+ }
+
+ Setting_GenGroupItem_Data *list_item = NULL;
+
+ if (max_len == -1)
+ {
+ // without maxlength filter
+ list_item = setting_create_Gendial_field_def(pd->scroller, &(itc_1icon),
+ __editbox_list_cb,
+ pd, SWALLOW_Type_LAYOUT_ENTRY,
+ NULL, NULL, 0, title, key_str,
+ __editbox_changed_cb);
+
+ } else {
+ // add max length filter
+ list_item = setting_create_Gendial_field_entry(
+ pd->scroller,
+ &(itc_1icon),
+ __editbox_list_cb,
+ pd,
+ SWALLOW_Type_LAYOUT_ENTRY,
+ NULL, NULL, 0, title, key_str, __editbox_changed_cb,
+ ELM_INPUT_PANEL_LAYOUT_NORMAL,
+ false,
+ false,
+ max_len,
+ 0,
+ NULL, NULL);
+
+ }
if (list_item) {
list_item->userdata = xmlObj;
list_item->stop_change_cb = __entry_unfocus_cb;