static void zak_form_element_dispose (GObject *gobject);
static void zak_form_element_finalize (GObject *gobject);
+static void zak_form_element_xml_parsing (ZakFormElement *element, xmlNode *xmlnode);
+
static GPtrArray *zak_form_element_get_messages (ZakFormElement *element);
typedef struct
object_class->dispose = zak_form_element_dispose;
object_class->finalize = zak_form_element_finalize;
+ class->xml_parsing = zak_form_element_xml_parsing;
class->get_messages = zak_form_element_get_messages;
g_object_class_install_property (object_class, PROP_VALUE,
parent_class->finalize (gobject);
}
+static void
+zak_form_element_xml_parsing (ZakFormElement *element, xmlNode *xmlnode)
+{
+ xmlNode *cur;
+
+ cur = xmlnode->children;
+ while (cur)
+ {
+ if (xmlStrcmp (cur->name, (const xmlChar *)"default-value") == 0)
+ {
+ zak_form_element_set_default_value (element, (const gchar *)xmlNodeGetContent (cur));
+ }
+
+ cur = cur->next;
+ }
+}
+
static GPtrArray
*zak_form_element_get_messages (ZakFormElement *element)
{
#include <glib-object.h>
+#include <libxml/tree.h>
+
#include "formelementfilter.h"
#include "formelementvalidator.h"
{
GObjectClass parent_class;
+ void (*xml_parsing) (ZakFormElement *element, xmlNode *xmlnode);
+
gboolean (*set_value) (ZakFormElement *element, const gchar *value);
gchar *(*get_value) (ZakFormElement *element);