Jahia Dev Forum > How to add check-box...

0 (0 Good)
0 (0 Bad)

How to add check-box in node type definition dynamically according to DB.

by  mohitbhunwalia »  2013/07/05 04:17

 

Hi,

I want to add check-box in node type defination dynamically according to DB.  For eg:- If I have  three types of  employee ( Accountant, Tester, Developer) in DB than there should be three checkbox   in node type. How can I do this?. Please help me. 

  • How to add check-box in node type definition dynamically according to DB.
    2013/07/05 04:19

    mohitbhunwalia <p> &nbsp;</p> <p> Hi,</p> <p> I want to add check-box in node type defination dynamically according to DB. &nbsp;For eg:- If I have &nbsp;three types of &nbsp;employee ( Accountant, Tester, Developer) in DB than there should be three checkbox &nbsp; in node type. How can I do this?. Please help me.&nbsp;</p>

  • Number of messages  15
    Registration date Jul 5, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: How to add check-box in node type definition dynamically according to DB.

    by  faissah »  2013/07/09 15:23

    Hello,

    In it's current stage, Jahia doesn't handle dynamic nodetype definition. The main issue is that once a content has been created, its definition should not be changed.

    What is your need? There should be an easier way to implement it.

     

     

    Fabrice  (faissah)

    Number of messages  264
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: How to add check-box in node type definition dynamically according to DB.

    by  shyrkov »  2013/07/15 14:02

    Hello Mohit,

    I think in your case it is appropriate to use so called "choice list initializers", i.e. you define your node property with the choicelist as a selector and implement your own choice list initializer which reads the target DB and returns back a list of possible values for your node property ("Accountant", "Tester", "Developer", etc.).

    You can find more information in Jahia documentation pages: ChoiceList Initializers

     

    Kind regards

    Sergiy

  • Re: How to add check-box in node type definition dynamically according to DB.
    2013/07/15 14:02

    shyrkov <p> Hello Mohit,</p> <p> I think in your case it is appropriate to use so called &quot;choice list initializers&quot;, i.e. you define your node property with the choicelist as a selector and implement your own choice list initializer which reads the target DB and returns back a list of possible values for your node property (&quot;Accountant&quot;, &quot;Tester&quot;, &quot;Developer&quot;, etc.).</p> <p> You can find more information in Jahia documentation pages: <a href="http://www.jahia.com/community/documentation/jahiapedia/initializers_renderers/initializers.html">ChoiceList Initializers</a></p> <p> &nbsp;</p> <p> Kind regards</p> <p> Sergiy</p>

  • Number of messages  407
    Registration date Jul 15, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Re: How to add check-box in node type definition dynamically according to DB.

    by  mohitbhunwalia »  2013/07/15 17:02

    Hi  Sergiy,

    I did it using ChoiceListInitializer with multi choice list option and it's woking fine.

    Thanks for your support.

     


     

  • Re: Re: How to add check-box in node type definition dynamically according to DB.
    2013/07/15 17:02

    mohitbhunwalia <blockquote> <p> Hi&nbsp; Sergiy,</p> <p> I did it using ChoiceListInitializer with multi choice list option and it&#39;s woking fine.</p> <p> Thanks for your support.</p> <p> &nbsp;</p> </blockquote> <br /> <p> &nbsp;</p>

  • Number of messages  15
    Registration date Jul 15, 2013
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page