[opencms-dev] jsp publishing problem in OCMS7

Michael Emmerich m.emmerich at alkacon.com
Fri Jul 22 14:09:02 CEST 2011


Rajneesh,

> Thanks Michael.
> This will help us a lot.
> Just a quick question here, consider the scenario:
> I have two sibling com/index.jsp and  intg/index.jsp. Now we want that
> in  intg/index.jsp, we should have and extra textbox and this should not
> be a party of com/index.jsp. Is it possible some how ?
>
> Thanks again for your help and response.

Well, if the two jsps should be different, you should ask yourself if 
its a good idea to make them as siblings or if it would be better to 
make two individual jsps.

Or you could add some logic to your jsps which is triggered by a property:

As I wrote in the last mail, properties for siblings can be different.
Define a new property, lets say "extra.textbox". On the jsp 
"intg/index.jsp" this property has the value ""true", on the other 
sibling "com/index.jsp" it has the value "false".

Now add some logic to your jsp, where you read the property and 
depending on its value show the extra textbox or not.

In OpenCms, this is a typical way to control something in your JSPs, use 
user defined properties to trigger some logic in the JSP code.


Kind Regards,
Michael.



> Regards
> Rajneesh
>
> On Thu, Jul 21, 2011 at 6:07 PM, Michael Emmerich
> <m.emmerich at alkacon.com <mailto:m.emmerich at alkacon.com>> wrote:
>
>     Hello Rajneesh
>
>
>      >    I instslled openCms7, database -oracle10g ,server - tomcat
>     6.0,it is
>      > working.
>      >    I logged in with Admin(default) user and created a folder in
>      > /sites/default with
>      >    name as com,created one index.jsp.also.I created another folder in
>      > /sites/default
>      >    with name intg.
>      >      i created a  sibling of com/index.jsp in intg folder , it
>      > automatically made the index.jsp in intg
>      >    folder.This is the expected behavior.But when I publish
>      > intg/index.jsp without checking the checkbox
>      > "publish all sibling", it reflects in com/index.jsp while it
>     should only
>      > be changed
>      >    in intg/index.jsp , as per my understsnding,Is there some type of
>      > setting
>      >    in openCms which i may be missing.
>      >    I tried with another user but still i am facing the same problem.
>
>
>     You must understand how siblings in OpenCms work:
>
>     If yo have two siblings in OpenCms, com/index.jsp and  intg/index.jsp,
>     both share the same content entry in the Database. Better said, both
>     files have the identical content, this content is "just" listed on two
>     different location in the virtual file system.
>
>     This means, if you change the content of one of those files, the content
>     of the other file is changes, as it is the identical content item. If
>     you publish a sibling, the content changes are of course published for
>     all siblings, as all siblings share the same content.
>
>     So what is the check box in the publish dialog for?
>     Siblings can have different properties. For example, you can give both
>     of your siblings a different title. If you now publish a sibling and do
>     not select the check box, only the properties of the current file are
>     published, those of the other sibling stay the same.
>
>     Hope this makes it a bit clearer.
>
>     --
>     Kind Regards,
>     Michael.
>
>     -------------------
>     Michael Emmerich
>
>     Alkacon Software GmbH  - The OpenCms Experts
>     http://www.alkacon.com - http://www.opencms.org
>
>     _______________________________________________
>     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

-- 
Kind Regards,
Michael.

-------------------
Michael Emmerich

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org



More information about the opencms-dev mailing list