You're welcome!
Ard
>
> Ard,
>
> Thank You very much,
>
> Cheers,
>
> Denis Balog
>
>
>
> On Mon, Apr 7, 2008 at 4:09 PM, Ard Schrijvers
> <[EMAIL PROTECTED]> wrote:
> > I am not to familiar with the repository adapter, but
> probably when
> > doing a fetch, you get a 404 from the repository when the document
> > does not exist, while when doing a search, you just get an empty
> > response when the document does not exist.
> >
> > Ard
> >
> >
> >
> >
> > > Thanks Ard,
> > >
> > >
> > > I solved as you sad, with number TWO solution > > I
> tried with 1)
> > as i thought fetchdocument will give me an > empty testdoc
> > > But
> > I can't check this way,( it gives me null exception if I >
> try to get
> > ${testdoc.content.document.content.title} for example) > > >
> > 'content/e-overheid/home1.xml' doesn't exist but in first
> > example
> > it doesn't show NULL (it should be) > > In second example it show
> > NULL , that is what I need.
> > >
> > > can you tell me why FIRST example doesn't work this way > > >
> > Thanks again > > > Denis Balog.
> > >
> > >
> > > 1) *******************************************
> > >
> > > <c:set var="testdoc"
> > >
> value="${repository.fetchDocument['content/e-overheid/home1.xml']}"
> > > />
> > >
> > > <c:if test="${empty testdoc }">
> > >
> > > NULL
> > > </c:if>
> > >
> > > 2)
> > > **************************************************************
> > > *****************
> > >
> > >
> > > <c:set var="href" value="content/e-overheid/home1.xml"
> > > scope="request" /> <c:import url="dasl_test.jspx" var="dasl"
> > > scope="page" /> <c:set
> > > value="${repository.fetchCollection['/'][dasl][true].documents}"
> > > var="testdoc"/>
> > >
> > >
> > > <c:if test="${ empty testdoc}">
> > > NULL
> > > </c:if>
> > >
> > >
> > >
> > >
> > >
> > > On Mon, Apr 7, 2008 at 2:18 PM, Ard Schrijvers >
> > <[EMAIL PROTECTED]> wrote:
> > > > Hello Denis,
> > > >
> > > > I am not sure which is the exact call, but fetching a >
> > document which > > might not exist, can be done best with a search
> > (dasl) with > the target > > (href) set to the location of the
> > document you want to fetch, and > > indicate that you want
> to include
> > the content.
> > > >
> > > > Now, if the document exists, you have the as well, if it >
> > doesn't, the > > search won't give you any results.
> > > >
> > > > Ard
> > > >
> > > >
> > > >
> > > > > Hi all,
> > > > >
> > > > > I'm using JSP toolkit
> > > > >
> > > > > i need to check if some document exist in Hippo >
> repository
> > > > If > > i do this way > > <c:set var="subhref"
> > > > value="$content/documents/test123.xml"/>
> > > > >
> > > > > <c:set var="metadata"
> > > value="${repository.fetchMetadata[subhref]}"
> > > > /> > > If i test > > <c:if test="${metadata == null}"
> > > /> > > It
> > > > does not work it sad it is not null > > but if I try >
> > metadata.type > > i'm getting Null exception > > > I tried if
> > empty also > tried with > > fetchDocument > > and the result is
> > the same , > > I do this in > > way that is not so
> elegant > > I
> > get all files in some > subfolder > > > And the do
> foreach and test
> > if displayname== myfiletotest > then find=1 > > > >
> after foreach
> > if find==1 then do something > > It works but > > there must be
> > some simpler and faster solution > > > > > Thanks in > >
> > advance, > > Denis Balog > > >
> > ********************************************
> > > > > Hippocms-dev: Hippo CMS development public
> mailinglist > > >
> > ********************************************
> > > > Hippocms-dev: Hippo CMS development public
> mailinglist > > >
> > ********************************************
> > > Hippocms-dev: Hippo CMS development public mailinglist >
> > ********************************************
> > Hippocms-dev: Hippo CMS development public mailinglist
> >
> ********************************************
> Hippocms-dev: Hippo CMS development public mailinglist
>
********************************************
Hippocms-dev: Hippo CMS development public mailinglist