]> saetta.ns0.it Git - libzakcgi/commitdiff
Missing xml parsing from parent ZakFormElement.
authorAndrea Zagli <azagli@libero.it>
Sun, 7 Feb 2016 16:59:56 +0000 (17:59 +0100)
committerAndrea Zagli <azagli@libero.it>
Sun, 7 Feb 2016 16:59:56 +0000 (17:59 +0100)
src/formelement.c
src/formelement.h
src/formelementcheck.c
src/formelementemail.c
src/formelementhidden.c
src/formelementpassword.c
src/formelementselect.c
src/formelementstring.c
src/formelementsubmit.c
src/formelementtext.c
src/formelementtextarea.c

index 2f0e21d4a618caeedea792c03948e811a7e16cc4..f2f07fb9f095bf57c7d0deb5ee2e39275a851bca 100644 (file)
@@ -50,6 +50,8 @@ static void zak_cgi_form_element_get_property (GObject *object,
 static void zak_cgi_form_element_dispose (GObject *gobject);
 static void zak_cgi_form_element_finalize (GObject *gobject);
 
+static void zak_cgi_form_element_xml_parsing (ZakFormElement *element, xmlNode *xmlnode);
+
 #define ZAK_CGI_FORM_ELEMENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_CGI_TYPE_FORM_ELEMENT, ZakCgiFormElementPrivate))
 
 typedef struct _ZakCgiFormElementPrivate ZakCgiFormElementPrivate;
@@ -72,6 +74,8 @@ zak_cgi_form_element_class_init (ZakCgiFormElementClass *class)
        object_class->dispose = zak_cgi_form_element_dispose;
        object_class->finalize = zak_cgi_form_element_finalize;
 
+       class->xml_parsing = zak_cgi_form_element_xml_parsing;
+
        g_type_class_add_private (object_class, sizeof (ZakCgiFormElementPrivate));
 
        class->construct = zak_cgi_form_element_construct;
@@ -303,3 +307,9 @@ zak_cgi_form_element_finalize (GObject *gobject)
        GObjectClass *parent_class = g_type_class_peek_parent (G_OBJECT_GET_CLASS (gobject));
        parent_class->finalize (gobject);
 }
+
+static void
+zak_cgi_form_element_xml_parsing (ZakFormElement *element, xmlNode *xmlnode)
+{
+       ZAK_FORM_ELEMENT_GET_CLASS (element)->xml_parsing (element, xmlnode);
+}
index 6c1efd75e964b15bc8ce0cb65d3b496e10383e98..804021c285079fb920d9f0876c0d395f0bfca3c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-2016 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,6 +40,8 @@ struct _ZakCgiFormElementClass
                void (*construct) (ZakCgiFormElement *element, const gchar *id, GHashTable *ht_attrs);
                GHashTable *(*get_ht_attrs) (ZakCgiFormElement *element);
 
+               void (*xml_parsing) (ZakFormElement *element, xmlNode *xmlnode);
+
                gchar *(*render) (ZakCgiFormElement *element);
        };
 
index c436de206b32405f6e1850abecd6e0677af2e337..e44ef33544b5208159f41ff0c09132e06f644b57 100644 (file)
@@ -135,6 +135,8 @@ zak_cgi_form_element_check_xml_parsing (ZakFormElement *element, xmlNodePtr xmln
 
        id = NULL;
 
+       ZAK_CGI_FORM_ELEMENT_CLASS (zak_cgi_form_element_check_parent_class)->xml_parsing (element, xmlnode);
+
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
        g_hash_table_replace (ht_attrs, "type", "checkbox");
 
index 9982f0847b10586a15f22e10662c89af14dc761d..7916e119c73cfe40b6ac054afa8b661b39572741 100644 (file)
@@ -133,6 +133,8 @@ zak_cgi_form_element_email_xml_parsing (ZakFormElement *element, xmlNodePtr xmln
 
        id = NULL;
 
+       ZAK_CGI_FORM_ELEMENT_CLASS (zak_cgi_form_element_email_parent_class)->xml_parsing (element, xmlnode);
+
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
        g_hash_table_replace (ht_attrs, "type", "email");
 
index 1d048cc5347a77eb921ef8d8684c598ff5b5aa48..ab7a11d6d548303c9ae44e95fe6fc354be85e424 100644 (file)
@@ -134,6 +134,8 @@ zak_cgi_form_element_hidden_xml_parsing (ZakFormElement *element, xmlNodePtr xml
 
        id = NULL;
 
+       ZAK_CGI_FORM_ELEMENT_CLASS (zak_cgi_form_element_hidden_parent_class)->xml_parsing (element, xmlnode);
+
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
        g_hash_table_replace (ht_attrs, "type", "hidden");
 
index 3fc82d902b396a13c5873a5f6623f96973c6f3e4..989676f5c98c0c78838cf9954f721e6010e7dde7 100644 (file)
@@ -133,6 +133,8 @@ zak_cgi_form_element_password_xml_parsing (ZakFormElement *element, xmlNodePtr x
 
        id = NULL;
 
+       ZAK_CGI_FORM_ELEMENT_CLASS (zak_cgi_form_element_password_parent_class)->xml_parsing (element, xmlnode);
+
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
        g_hash_table_replace (ht_attrs, "type", "password");
 
index 48683ed41a404915a4b5175f38a5d368b433b4b6..aeda57d2ca9803f09235f7f8c76445609823c5e4 100644 (file)
@@ -159,6 +159,8 @@ zak_cgi_form_element_select_xml_parsing (ZakFormElement *element, xmlNodePtr xml
 
        id = NULL;
 
+       ZAK_CGI_FORM_ELEMENT_CLASS (zak_cgi_form_element_select_parent_class)->xml_parsing (element, xmlnode);
+
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
 
        cur = xmlnode->children;
index 64afea26478f3418f141eec9f89020e7c953c7d7..632a5ffa1a2c9bdde721466e41e7e2430451d344 100644 (file)
@@ -124,6 +124,8 @@ zak_cgi_form_element_string_xml_parsing (ZakFormElement *element, xmlNodePtr xml
 
        ret = FALSE;
 
+       ZAK_CGI_FORM_ELEMENT_CLASS (zak_cgi_form_element_string_parent_class)->xml_parsing (element, xmlnode);
+
        cur = xmlnode->children;
        while (cur != NULL)
                {
index 27d150860dd2e5228954ab20f6748e5e37602253..61c0815fb5e0619c694e3941edfad8bb04f4b85d 100644 (file)
@@ -128,6 +128,8 @@ zak_cgi_form_element_submit_xml_parsing (ZakFormElement *element, xmlNodePtr xml
 
        id = NULL;
 
+       ZAK_CGI_FORM_ELEMENT_CLASS (zak_cgi_form_element_submit_parent_class)->xml_parsing (element, xmlnode);
+
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
 
        cur = xmlnode->children;
index 1eedb404bd93daa7ff7dbb7309fb12592b43d42a..aa7b0033124b80007dcefbc4e20489990247ffcf 100644 (file)
@@ -128,6 +128,8 @@ zak_cgi_form_element_text_xml_parsing (ZakFormElement *element, xmlNodePtr xmlno
 
        id = NULL;
 
+       ZAK_CGI_FORM_ELEMENT_CLASS (zak_cgi_form_element_text_parent_class)->xml_parsing (element, xmlnode);
+
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
 
        cur = xmlnode->children;
index 695f129b5ef2f9bc8371ed01fc1276f6715e9cf3..05bb64521dd99f6358f46fe05bd02761f9e76f8a 100644 (file)
@@ -128,6 +128,8 @@ zak_cgi_form_element_text_area_xml_parsing (ZakFormElement *element, xmlNodePtr
 
        id = NULL;
 
+       ZAK_CGI_FORM_ELEMENT_CLASS (zak_cgi_form_element_text_area_parent_class)->xml_parsing (element, xmlnode);
+
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
 
        cur = xmlnode->children;