Jahia in English > Read information...

0 (0 Good)
0 (0 Bad)

Read information from a PostgreSQL

by  rmarquez »  2011/06/07 18:30

Hello everyone,

I am starting work with Jahia and I need to read information from a PostgreSQL database from my templates, could you advice me how to start?
  • Read information from a PostgreSQL
    2011/06/07 18:30

    rmarquez Hello everyone,<br/><br/>I am starting work with Jahia and I need to read information from a PostgreSQL database from my templates, could you advice me how to start?

  • Number of messages  7
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Read information from a PostgreSQL

    by  shyrkov »  2011/06/07 18:30

    Hello,

    you can access the data of your DBMS using [url=http/1[/code:140p3gad]

    Kind regards
    Sergiy
  • Re: Read information from a PostgreSQL
    2011/06/07 18:30

    shyrkov Hello,<br/><br/>you can access the data of your DBMS using [url=http/1[/code:140p3gad]<br/><br/>Kind regards<br/>Sergiy

  • Number of messages  407
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Read information from a PostgreSQL

    by  rmarquez »  2011/06/07 18:30

    Thanks Sergiy for your reply, It is very helpful.

    I have a couple of questions:

    1) How can I read data from a custom table in a contentContainer?

    2) Is it possible to index these data with Lucene?

    Kind regards,
    Rafael M?�rquez
  • Re: Read information from a PostgreSQL
    2011/06/07 18:30

    rmarquez Thanks Sergiy for your reply, It is very helpful.<br/><br/> I have a couple of questions:<br/><br/>1) How can I read data from a custom table in a contentContainer?<br/><br/>2) Is it possible to index these data with Lucene?<br/><br/>Kind regards,<br/>Rafael M?�rquez

  • Number of messages  7
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Read information from a PostgreSQL

    by  rmarquez »  2011/06/07 18:30

    Hello everybody,

    Is there another way to read the data different to JSTL?

    Kind Regards,
    Rafael M?�rquez
  • Re: Read information from a PostgreSQL
    2011/06/07 18:30

    rmarquez Hello everybody,<br/><br/>Is there another way to read the data different to JSTL?<br/><br/>Kind Regards,<br/>Rafael M?�rquez

  • Number of messages  7
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Read information from a PostgreSQL

    by  cchavez »  2011/06/07 18:30

    Hi all.

    I think we did explain very well what we are trying to do.

    The thing is that we need to populate the container not using the GUI, We will read the data from some table and we need to populate the containers with this information.

    has anyone do it this before ?

    I'm trying with the engines, but I just started to study the source about it.

    --
    Cheers.
    Carlos Ch?�vez.
  • Re: Read information from a PostgreSQL
    2011/06/07 18:30

    cchavez Hi all.<br/><br/>I think we did explain very well what we are trying to do.<br/><br/>The thing is that we need to populate the container not using the GUI, We will read the data from some table and we need to populate the containers with this information.<br/><br/>has anyone do it this before ?<br/><br/>I'm trying with the engines, but I just started to study the source about it.<br/><br/>--<br/>Cheers.<br/>Carlos Ch?�vez.

  • Number of messages  3
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Read information from a PostgreSQL

    by  cchavez »  2011/06/07 18:30

    [quote:q2qlq8uo]I think we did explain very well what we are trying to do.[/quote:q2qlq8uo]
    Ops, Sorry, that should be: we DID NOT explain :)
  • Re: Read information from a PostgreSQL
    2011/06/07 18:30

    cchavez [quote:q2qlq8uo]I think we did explain very well what we are trying to do.[/quote:q2qlq8uo]<br/>Ops, Sorry, that should be: we DID NOT explain <!-- s:) --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!-- s:) -->

  • Number of messages  3
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Read information from a PostgreSQL

    by  shyrkov »  2011/06/07 18:30

    Hello Rafael / Carlos,

    if I correctly understood your use case, you will need to manually populate the Jahia container list with custom data from your DB.

    One possibility is to use the Jahia import/export service to populate the content. In this case you will have to provide the data in a proper XML format, supported by the service.

    The second possibility is to use the Jahia API directly.
    I have a simple example (JSP-based code) to populate a container list with data. The container list is defined as follows:
    [code:s4nxy97g]
    /1
    [/code:s4nxy97g]

    Kind regards
    Sergiy
  • Re: Read information from a PostgreSQL
    2011/06/07 18:30

    shyrkov Hello Rafael / Carlos,<br/><br/>if I correctly understood your use case, you will need to manually populate the Jahia container list with custom data from your DB.<br/><br/>One possibility is to use the Jahia import/export service to populate the content. In this case you will have to provide the data in a proper XML format, supported by the service.<br/><br/>The second possibility is to use the Jahia API directly.<br/>I have a simple example (JSP-based code) to populate a container list with data. The container list is defined as follows:<br/>[code:s4nxy97g]<br/>/1<br/>[/code:s4nxy97g]<br/><br/>Kind regards<br/>Sergiy

  • Number of messages  407
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Read information from a PostgreSQL

    by  cchavez »  2011/06/07 18:30

    Hi Sergiy, thank you for your help.

    do you know if both option will automatically index with lucene ?

    --
    Cheers.
    Carlos Ch?�vez.
  • Re: Read information from a PostgreSQL
    2011/06/07 18:30

    cchavez Hi Sergiy, thank you for your help.<br/><br/>do you know if both option will automatically index with lucene ?<br/><br/>--<br/>Cheers.<br/>Carlos Ch?�vez.

  • Number of messages  3
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Read information from a PostgreSQL

    by  shyrkov »  2011/06/07 18:30

    Hi Carlos,

    yes, in both cases the data will be indexed automatically (no need to trigger indexing from the code).

    Kind regards
    Sergiy
  • Re: Read information from a PostgreSQL
    2011/06/07 18:30

    shyrkov Hi Carlos,<br/><br/>yes, in both cases the data will be indexed automatically (no need to trigger indexing from the code).<br/><br/>Kind regards<br/>Sergiy

  • Number of messages  407
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Read information from a PostgreSQL

    by  rmarquez »  2011/06/07 18:30

    Hello Sergiy,

    Thanks you for your help.

    Kind regards,
    Rafael M?�rquez
  • Re: Read information from a PostgreSQL
    2011/06/07 18:30

    rmarquez Hello Sergiy,<br/><br/>Thanks you for your help.<br/><br/>Kind regards,<br/>Rafael M?�rquez

  • Number of messages  7
    Registration date Jun 7, 2011
    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