[opencms-dev] R: R: insert data without using opencms backend
Achim Westermann
achim.westermann at questico.de
Tue Feb 9 10:36:12 CET 2010
Hi Valerio,
a short hint. In a JSP start with this: http://opencms-wiki.org/Get_the_CMSObject
Then have a look at the API of CmsObject. It allows you to write, create, read, publish... resources in the OpenCms VFS. Combine this with
HTML <forms> (which map their values to a Java Bean if you like) to collect the data, on submit validate and potentially write your data.
HTH,
Achim
Valerio Synclab wrote:
> Hi Achim,
>
> in the way you suggest me I can modify the properties of the module, these
> are the properties that I set when I create a module using
> the administration panel. I am not interested in modifying this properties
> using the API, but what I want to do is to fill in the module through
> the API.
> For example into the template two example there is a module connected the
> the jsp page where you can insert or modify data about a new flower
> accessing the opencms backend. Is it possible to do this accessing the
> module through the API and modify the content(name and type of the flower
> for example) of the module.
>
> Best regard
>
> Valerio,
>
> PS Sorry for my English.....
>
>
> -----Messaggio originale-----
> Da: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org]
> Per conto di Achim Westermann
> Inviato: lunedì 8 febbraio 2010 17.37
> A: The OpenCms mailing list
> Oggetto: Re: [opencms-dev] R: insert data without using opencms backend
>
> Hi Valerio,
>
> within the OpenCms web application:
>
> CmsModuleManager manager = OpenCms.getModuleManager();
> CmsModule module = manager.getModule("name");
> module.setAuthorEmail("foo at bar.com");
> manager.updateModule(myCmsObject,module );
>
>
> But don't play too much with this. For almost every task there is a high
> level standard solution.
>
> HTH,
>
> Achim
>
>
> Valerio Synclab wrote:
>> Hi Achim,
>>
>> thank you for your quick feedback, one more question on this... I saw into
>> opencms API some classes related to module management.
>> Is there a way to call my module from a java class through the API, fill
> in
>> the data and call a kind of submit action equivalent to
>> the save button of the opencms graphic backend?
>>
>> Thank you in advance,
>>
>> Valerio.
>>
>> -----Messaggio originale-----
>> Da: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org]
>> Per conto di Achim Westermann
>> Inviato: lunedì 8 febbraio 2010 16.43
>> A: The OpenCms mailing list
>> Oggetto: Re: [opencms-dev] insert data without using opencms backend
>>
>> Hi Valerio,
>>
>> sorry to say that and I hope I am wrong. But this sounds as if your
> project
>> is going in a wrong direction. You would write a lot of code and
>> potentially undermine the caching of OpenCms which will produce
>> unpredictable effects. You should stay within the opencms web application
>> when you try to insert data to the OpenCms tables.
>>
>> kind regards,
>>
>> Achim
>>
>> Valerio Synclab wrote:
>>>
>>>
>>> Hi all,
>>>
>>>
>>>
>>> I am trying to develop my web application using opencms but I haven’t
>>> found in the available documentation what I was looking for..
>>>
>>>
>>>
>>> This is my scenario:
>>>
>>>
>>>
>>> I created an opencms module to insert structured data into opencms
>>> database. Using this module into opencms backend I am able to insert my
>>> data into the system.
>>>
>>> I would like to know if there is a programmatic way (from a java class
>>> or from a jsp page) to insert the same data into the same database
>>> tables without
>>> using opencms backend.
>>>
>>>
>>>
>>> Best regards
>>>
>>>
>>>
>>> Valerio
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list
>>> To change your list options, or to unsubscribe from the list, please
> visit
>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
>>
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
More information about the opencms-dev
mailing list