AW: pendant to load-on-startup

2011-03-07 Thread Clemens Wyss
thx

 -Ursprüngliche Nachricht-
 Von: Felix Meschberger [mailto:fmesc...@adobe.com]
 Gesendet: Montag, 7. März 2011 07:51
 An: dev@sling.apache.org
 Betreff: Re: pendant to load-on-startup
 
 Hi Clemens,
 
 Am Montag, den 07.03.2011, 06:22 + schrieb Clemens Wyss:
  In my BundleActivator I register two servlets, where of one should be
 loaded/initialized before the other. In the web.xml there is the load-on-
 startup-tag. Is there a specific property that can be set?
 
 There is no such thing, but ...
 
 If you register your servlet directly with the OSGi Http Service it will be
 initialized immediately upon registration. So the first servlet registered 
 will be
 initialized first. The same holds for destroyal upon servlet unregistration.
 
 As for registration of a servlet with Sling it is similar: When the servlet is
 registered as a service it is immediately initialized unless the Servlet 
 Resolver
 is not ready yet, in which case initialization is postponed but initialization
 order is maintained to be the order of service registration. Hence a servlet
 service registered first will be initialized first.
 
 So basically, you have the initialization order vigor in place.
 
 Regards
 Felix



pendant to load-on-startup

2011-03-06 Thread Clemens Wyss
In my BundleActivator I register two servlets, where of one should be 
loaded/initialized before the other. In the web.xml there is the 
load-on-startup-tag. Is there a specific property that can be set?

Thnx
Clemens


Unable to find resource 'org.apache.sling:org.apache.sling.launchpad.base:jar:app:2.3.0' in repository central (http://repo1.maven.org/maven2)

2011-02-16 Thread Clemens Wyss
Hi all,
just checked out the latest sources from the trunk and tried to build Sling. 
Unfortunately it fails due to a missing (maven) artifact. 
The maven output follows:
...
Downloading: 
http://repo1.maven.org/maven2/org/apache/sling/org.apache.sling.launchpad.base/2.3.0/org.apache.sling.launchpad.base-2.3.0-app.jar

[INFO] Unable to find resource 
'org.apache.sling:org.apache.sling.launchpad.base:jar:app:2.3.0' in repository 
central (http://repo1.maven.org/maven2)
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to resolve artifact.

Missing:
--
1) org.apache.sling:org.apache.sling.launchpad.base:jar:app:2.3.0

  Try downloading the file manually from the project website.

  Then, install it using the command:
  mvn install:install-file -DgroupId=org.apache.sling 
-DartifactId=org.apache.sling.launchpad.base 
-Dversion=2.3.0 -Dclassifier=app -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there:

  mvn deploy:deploy-file -DgroupId=org.apache.sling -DartifactId=org.apache.
sling.launchpad.base -Dversion=2.3.0 -Dclassifier=app -Dpackaging=jar 
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
1) org.apache.sling:org.apache.sling.launchpad.testing:jar:6-SNAPSHOT
2) org.apache.sling:org.apache.sling.launchpad.base:jar:app:2.3.0

--
1 required artifact is missing.

for artifact:
  org.apache.sling:org.apache.sling.launchpad.testing:jar:6-SNAPSHOT

from the specified remote repositories:
  apache.snapshots (http://repository.apache.org/snapshots),
  central (http://repo1.maven.org/maven2)
...


What am I missing?

Thx for your help
Clemens


AW: Unable to find resource 'org.apache.sling:org.apache.sling.launchpad.base:jar:app:2.3.0' in repository central (http://repo1.maven.org/maven2)

2011-02-16 Thread Clemens Wyss
Thx!

 -Ursprüngliche Nachricht-
 Von: Bertrand Delacretaz [mailto:bdelacre...@apache.org]
 Gesendet: Mittwoch, 16. Februar 2011 11:15
 An: dev@sling.apache.org
 Betreff: Re: Unable to find resource
 'org.apache.sling:org.apache.sling.launchpad.base:jar:app:2.3.0' in repository
 central (http://repo1.maven.org/maven2)
 
 Hi,
 
 On Wed, Feb 16, 2011 at 11:06 AM, Clemens Wyss clemens...@mysign.ch
 wrote:
  ...just checked out the latest sources from the trunk and tried to build 
  Sling.
 Unfortunately it fails due to a missing (maven) artifact.
  The maven output follows:
  ...
  Downloading:
 http://repo1.maven.org/maven2/org/apache/sling/org.apache.sling.launchp
 ad.base/2.3.0/org.apache.sling.launchpad.base-2.3.0-app.jar
 
 I just fixed that, svn up launchpad should help.
 
 -Bertrand


AW: SlingPOSTServlet : Auto Checkin Nodes

2010-12-09 Thread Clemens Wyss
Looks like I got  it, last but not least due to the integration tests ;-) 

Regarding the integration tests (in PostServletVersionableTests.java) I would 
apply two extract method refactorings (createVersionedNode and 
createNonVersionedNode, which differ only in the fact that params is submitted 
or not which could yet be extracted), but that's just cosmetics...

Thx
Clemens

 -Ursprüngliche Nachricht-
 Von: Justin Edelson [mailto:justinedel...@gmail.com] Im Auftrag von Justin
 Edelson
 Gesendet: Donnerstag, 9. Dezember 2010 00:52
 An: dev@sling.apache.org
 Betreff: Re: SlingPOSTServlet : Auto Checkin Nodes
 
 
 
 On Dec 8, 2010, at 11:10 AM, Felix Meschberger fmesc...@gmail.com
 wrote:
 
  And: we must be very carefull to not create backwards compatibility
  issues around this automatic checkin/checkout.
 
 And that's what integration tests are for.
 
 Clemens - take a look at the integration tests. They should cover every
 supported scenario. The only difference is that the integration tests use
 parameters to specify the versioning configuration whereas I expect most
 users to configure this stuff in ConfigAdmin.
 
 I can help you grok the test code if it isn't clear.
 
 Justin


o.a.jr.c.p.db.DerbyPersistenceManager should be replaced with o.a.jr.c.p.bundle.DerbyPersistenceManager

2010-12-09 Thread Clemens Wyss
Just had a discussion (see below) on the jackrabbit ml. Possibly before 
releasing the next release...

Regards
Clemens

Von: Clemens Wyss [mailto:clemens...@mysign.ch]
Gesendet: Donnerstag, 9. Dezember 2010 16:34
An: d...@jackrabbit.apache.org
Betreff: AW: o.a.jr.c.p.pool.DerbyPersistenceManager not compatible with 
o.a.jr.c.p.db.DerbyPersistenceManager?

 So s/db/bundle/ and this should work.
I can confirm that bundle and pool cope well !

Then we at Sling should switch from db to bundle ;-)
Sling (launchpad), per default (upon bootstrapping), still creates a 
repository.xml with db...


Von: justinedel...@gmail.com [mailto:justinedel...@gmail.com] Im Auftrag von 
Justin Edelson
Gesendet: Donnerstag, 9. Dezember 2010 16:14
An: d...@jackrabbit.apache.org
Betreff: Re: o.a.jr.c.p.pool.DerbyPersistenceManager not compatible with 
o.a.jr.c.p.db.DerbyPersistenceManager?


On Thu, Dec 9, 2010 at 10:07 AM, Jukka Zitting 
jzitt...@adobe.commailto:jzitt...@adobe.com wrote:
Hi,


On 09/12/10 15:54, Clemens Wyss wrote:
I create a copy of a jackrabbit repository with
org.apache.jackrabbit.core.RepositoryCopier (using
org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager).

Trying to access this copy with
org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
fails.

Testcase:
1) create a repository.xml file with 
org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager
2) start/stop jackrabbit
3) change repository.xml to 
org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
4) start jackrabbit

I don't understand why pooled access should yield different persisted
data...

Bug or feature?

Bug, the only difference between these persistence managers should be the way 
they manage the database connection.

Can you file an issue about this with more details like the exact error 
messages you're seeing and the Jackrabbit version you're using?

BR,

Jukka Zitting

I hate to contradict Jukka, but I'm under the impression that 
o.a.j.core.persistence.db.* use a different schema than 
o.a.j.core.persistence.pool.*. o.a.j.core.persistence.pool.* uses the same 
scheme as o.a.j.core.persistence.bundle.*.

So s/db/bundle/ and this should work.

o.a.j.core.persistence.db.* is deprecated now (see JCR-2802)

Justin



AW: o.a.jr.c.p.db.DerbyPersistenceManager should be replaced with o.a.jr.c.p.bundle.DerbyPersistenceManager

2010-12-09 Thread Clemens Wyss
param name=shutdownOnClose value=false/
must be removed, too

Should I JIRA this?

Regards
Clemens

 -Ursprüngliche Nachricht-
 Von: Clemens Wyss [mailto:clemens...@mysign.ch]
 Gesendet: Donnerstag, 9. Dezember 2010 16:43
 An: dev@sling.apache.org
 Betreff: o.a.jr.c.p.db.DerbyPersistenceManager should be replaced with
 o.a.jr.c.p.bundle.DerbyPersistenceManager
 
 Just had a discussion (see below) on the jackrabbit ml. Possibly before
 releasing the next release...
 
 Regards
 Clemens
 
 Von: Clemens Wyss [mailto:clemens...@mysign.ch]
 Gesendet: Donnerstag, 9. Dezember 2010 16:34
 An: d...@jackrabbit.apache.org
 Betreff: AW: o.a.jr.c.p.pool.DerbyPersistenceManager not compatible with
 o.a.jr.c.p.db.DerbyPersistenceManager?
 
  So s/db/bundle/ and this should work.
 I can confirm that bundle and pool cope well !
 
 Then we at Sling should switch from db to bundle ;-) Sling (launchpad),
 per default (upon bootstrapping), still creates a repository.xml with db...
 
 
 Von: justinedel...@gmail.com [mailto:justinedel...@gmail.com] Im
 Auftrag von Justin Edelson
 Gesendet: Donnerstag, 9. Dezember 2010 16:14
 An: d...@jackrabbit.apache.org
 Betreff: Re: o.a.jr.c.p.pool.DerbyPersistenceManager not compatible with
 o.a.jr.c.p.db.DerbyPersistenceManager?
 
 
 On Thu, Dec 9, 2010 at 10:07 AM, Jukka Zitting
 jzitt...@adobe.commailto:jzitt...@adobe.com wrote:
 Hi,
 
 
 On 09/12/10 15:54, Clemens Wyss wrote:
 I create a copy of a jackrabbit repository with
 org.apache.jackrabbit.core.RepositoryCopier (using
 org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager).
 
 Trying to access this copy with
 org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
 fails.
 
 Testcase:
 1) create a repository.xml file with
 org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager
 2) start/stop jackrabbit
 3) change repository.xml to
 org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
 4) start jackrabbit
 
 I don't understand why pooled access should yield different persisted data...
 
 Bug or feature?
 
 Bug, the only difference between these persistence managers should be the
 way they manage the database connection.
 
 Can you file an issue about this with more details like the exact error
 messages you're seeing and the Jackrabbit version you're using?
 
 BR,
 
 Jukka Zitting
 
 I hate to contradict Jukka, but I'm under the impression that
 o.a.j.core.persistence.db.* use a different schema than
 o.a.j.core.persistence.pool.*. o.a.j.core.persistence.pool.* uses the same
 scheme as o.a.j.core.persistence.bundle.*.
 
 So s/db/bundle/ and this should work.
 
 o.a.j.core.persistence.db.* is deprecated now (see JCR-2802)
 
 Justin



AW: o.a.jr.c.p.db.DerbyPersistenceManager should be replaced with o.a.jr.c.p.bundle.DerbyPersistenceManager

2010-12-09 Thread Clemens Wyss
Jukka Zitting just replied:

'In fact go directly to pool while you're at it. In 2.2 we're also deprecating 
non-pooled bundle persistence, see JCR-2803 [1].

[1] https://issues.apache.org/jira/browse/JCR-2803

BR,

Jukka Zitting'

 -Ursprüngliche Nachricht-
 Von: Clemens Wyss [mailto:clemens...@mysign.ch]
 Gesendet: Donnerstag, 9. Dezember 2010 16:47
 An: dev@sling.apache.org
 Betreff: AW: o.a.jr.c.p.db.DerbyPersistenceManager should be replaced with
 o.a.jr.c.p.bundle.DerbyPersistenceManager
 
 param name=shutdownOnClose value=false/ must be removed, too
 
 Should I JIRA this?
 
 Regards
 Clemens
 
  -Ursprüngliche Nachricht-
  Von: Clemens Wyss [mailto:clemens...@mysign.ch]
  Gesendet: Donnerstag, 9. Dezember 2010 16:43
  An: dev@sling.apache.org
  Betreff: o.a.jr.c.p.db.DerbyPersistenceManager should be replaced with
  o.a.jr.c.p.bundle.DerbyPersistenceManager
 
  Just had a discussion (see below) on the jackrabbit ml. Possibly
  before releasing the next release...
 
  Regards
  Clemens
 
  Von: Clemens Wyss [mailto:clemens...@mysign.ch]
  Gesendet: Donnerstag, 9. Dezember 2010 16:34
  An: d...@jackrabbit.apache.org
  Betreff: AW: o.a.jr.c.p.pool.DerbyPersistenceManager not compatible
  with o.a.jr.c.p.db.DerbyPersistenceManager?
 
   So s/db/bundle/ and this should work.
  I can confirm that bundle and pool cope well !
 
  Then we at Sling should switch from db to bundle ;-) Sling
  (launchpad), per default (upon bootstrapping), still creates a 
  repository.xml
 with db...
 
 
  Von: justinedel...@gmail.com [mailto:justinedel...@gmail.com] Im
  Auftrag von Justin Edelson
  Gesendet: Donnerstag, 9. Dezember 2010 16:14
  An: d...@jackrabbit.apache.org
  Betreff: Re: o.a.jr.c.p.pool.DerbyPersistenceManager not compatible
  with o.a.jr.c.p.db.DerbyPersistenceManager?
 
 
  On Thu, Dec 9, 2010 at 10:07 AM, Jukka Zitting
  jzitt...@adobe.commailto:jzitt...@adobe.com wrote:
  Hi,
 
 
  On 09/12/10 15:54, Clemens Wyss wrote:
  I create a copy of a jackrabbit repository with
  org.apache.jackrabbit.core.RepositoryCopier (using
  org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager).
 
  Trying to access this copy with
  org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
  fails.
 
  Testcase:
  1) create a repository.xml file with
  org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager
  2) start/stop jackrabbit
  3) change repository.xml to
  org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
  4) start jackrabbit
 
  I don't understand why pooled access should yield different persisted
 data...
 
  Bug or feature?
 
  Bug, the only difference between these persistence managers should be
  the way they manage the database connection.
 
  Can you file an issue about this with more details like the exact
  error messages you're seeing and the Jackrabbit version you're using?
 
  BR,
 
  Jukka Zitting
 
  I hate to contradict Jukka, but I'm under the impression that
  o.a.j.core.persistence.db.* use a different schema than
  o.a.j.core.persistence.pool.*. o.a.j.core.persistence.pool.* uses the
  same scheme as o.a.j.core.persistence.bundle.*.
 
  So s/db/bundle/ and this should work.
 
  o.a.j.core.persistence.db.* is deprecated now (see JCR-2802)
 
  Justin



Howto communicate with Sling bundles/services from outside OSGi?

2010-12-08 Thread Clemens Wyss
Looks like my initial post (sl...@tomcat : howto communicate with Sling 
bundles/services?) had a missleading/deterrent subject ;-) The topic/question 
per se has nothing to with Tomcat :-)

We are trying to deploy Sling within Tomcat in a project which has a lot of
legacy code running in parallel (within the same container). Basically new
features/components  shall be implemented in Sling (as bundles). BUT pretty
sure we need to build up a communication channel between the legacy
code and the Sling bundles/services.
 
Is there a slight chance (given the protecting LaunchClassLoader) to get
hold of the felix (interface org.osgi.framework.launch.Framework) member
within the Sling class?
 
Any other ideas (besides http requests :-( ) on how to build up  a 
communication channel without big
overhead or leaking classloaders.
 
Kind regards
Clemens


SlingPOSTServlet : Auto Checkin Nodes

2010-12-08 Thread Clemens Wyss
Auto Checkin Nodes  is activated (i.e. true). Hence I would expect that when 
I modify (a property) of my mixin:versionable node, a new version is created. 
Unfortunately this is not the case.

Looking at AbstractSlingPostOperation#run only CREATE, CHECKOUT or CHECKIN 
trigger a potential checkin, but not MODIFY. 
Shouldn't we?:
...
case MODIFY : 
response.onModified(change.getSource());
if ( versionableConfiguration.isAutoCheckin() ) {
nodesToCheckin.add(change.getSource());
}
break;  
...
maybe additionally check whether the node is really checked out?

WDYT?


[jira] Updated: (SLING-1723) jQuery JCR Explorer - step 2

2010-12-08 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss updated SLING-1723:


Description: 
+ switch between JCR and resource view on the repo
+ choose/change workspace
+ reference support
+ import/export subtrees
+ nt:file - file upload
+ mixin-type specific editor widgets which are included inline in edit.esp. 
E.g. (maybe the only ;-) ?): mixin:versionable could provide a checkin/checkout 
button, dropdown list of its versions, ...

  was:
+ switch between JCR and resource view on the repo
+ choose/change workspace
+ reference support
+ import/export subtrees
+ nt:file - file upload


 jQuery JCR Explorer - step 2
 

 Key: SLING-1723
 URL: https://issues.apache.org/jira/browse/SLING-1723
 Project: Sling
  Issue Type: New Feature
  Components: Extensions
Reporter: Clemens Wyss
Assignee: Clemens Wyss
Priority: Minor
 Fix For: Sling Explorer 1.0.2


 + switch between JCR and resource view on the repo
 + choose/change workspace
 + reference support
 + import/export subtrees
 + nt:file - file upload
 + mixin-type specific editor widgets which are included inline in edit.esp. 
 E.g. (maybe the only ;-) ?): mixin:versionable could provide a 
 checkin/checkout button, dropdown list of its versions, ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-1890) JCR Explorer - improvements

2010-12-08 Thread Clemens Wyss (JIRA)
JCR Explorer - improvements
---

 Key: SLING-1890
 URL: https://issues.apache.org/jira/browse/SLING-1890
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Affects Versions: Sling Explorer 1.0.0
Reporter: Clemens Wyss
Assignee: Clemens Wyss


+ improved error handling/reporting
+ create sub node(s) on root node
+ ajax timeout handling
+ prevent concurrent branch/subtree loading
+ multivalue property editing
+ prevent multiple search requests

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Proposal : linking subversion to jira (with bugtraq properties)

2010-12-08 Thread Clemens Wyss
Looking at the commit logs we very often reference the corresponding jira 
issue, e.g.:
SLING-1889 : Make job creation date available

Now if we made use of the bugtraq subversion properties 
(http://www.syntevo.com/smartsvn/documentation.html?page=commands.bugtraq-properties)
 
we could directly link into JIRA.
Clients such as subversive support this feature. When the feature is enabled 
and you look at the 
revision history of a source file (in subversive, or tortoise, or ...), the 
SLING- words will show up as links. 
If you press on the link/word the browser shows the corresponding jira page.

bugtraq:url - https://issues.apache.org/jira/browse/%BUGID%
bugtraq:logregex - SLING\-\d{4,}

WDYT?

I could apply these properties to our repo if you wish...


AW: Proposal : linking subversion to jira (with bugtraq properties)

2010-12-08 Thread Clemens Wyss
 I think for now, we should just set it on the sling/trunk folder.
+ 1

 -Ursprüngliche Nachricht-
 Von: Felix Meschberger [mailto:fmesc...@gmail.com]
 Gesendet: Mittwoch, 8. Dezember 2010 17:34
 An: dev@sling.apache.org
 Betreff: Re: Proposal : linking subversion to jira (with bugtraq properties)
 
 Hi,
 
 Am Mittwoch, den 08.12.2010, 17:17 +0100 schrieb Clemens Wyss:
  Looking at the commit logs we very often reference the corresponding jira
 issue, e.g.:
  SLING-1889 : Make job creation date available
 
  Now if we made use of the bugtraq subversion properties
 
 (http://www.syntevo.com/smartsvn/documentation.html?page=commands
 .bugt
  raq-properties)
  we could directly link into JIRA.
  Clients such as subversive support this feature. When the feature is
  enabled and you look at the revision history of a source file (in 
  subversive,
 or tortoise, or ...), the SLING- words will show up as links.
  If you press on the link/word the browser shows the corresponding jira
 page.
 
  bugtraq:url - https://issues.apache.org/jira/browse/%BUGID%
  bugtraq:logregex - SLING\-\d{4,}
 
  WDYT?
 
 Looks like an interesting feature.
 
 +1
 
 
  I could apply these properties to our repo if you wish...
 
 I think for now, we should just set it on the sling/trunk folder.
 
 Regards
 Felix
 
 



AW: SlingPOSTServlet : Auto Checkin Nodes

2010-12-08 Thread Clemens Wyss
 I think auto-checkin should only be done if the node has been checked out as
 part of the modification operation. Thus:
What if auto-checkout is also enabled, too?

 -Ursprüngliche Nachricht-
 Von: Felix Meschberger [mailto:fmesc...@gmail.com]
 Gesendet: Mittwoch, 8. Dezember 2010 17:10
 An: dev@sling.apache.org
 Betreff: Re: SlingPOSTServlet : Auto Checkin Nodes
 
 Hi,
 
 Am Mittwoch, den 08.12.2010, 16:19 +0100 schrieb Clemens Wyss:
  Auto Checkin Nodes  is activated (i.e. true). Hence I would expect that
 when I modify (a property) of my mixin:versionable node, a new version is
 created. Unfortunately this is not the case.
 
  Looking at AbstractSlingPostOperation#run only CREATE, CHECKOUT or
 CHECKIN trigger a potential checkin, but not MODIFY.
  Shouldn't we?:
  ...
  case MODIFY :
  response.onModified(change.getSource());
  if ( versionableConfiguration.isAutoCheckin() ) {
  nodesToCheckin.add(change.getSource());
  }
  break;
  ...
  maybe additionally check whether the node is really checked out?
 
  WDYT?
 
 I think auto-checkin should only be done if the node has been checked out as
 part of the modification operation. Thus:
 
 -- if the node was checked-out before the op, then it must be
  checked-out after and no version must be created
 -- if the node was checked-in before the op, and the node was
  checked out, then it should probably be checked in
 
 And: we must be very carefull to not create backwards compatibility issues
 around this automatic checkin/checkout.
 
 Regards
 Felix



Shareable nodes vs weak references

2010-11-15 Thread Clemens Wyss
Given the following data structure of projects and tasks:
project
p1
tasks
all
t1
t2
open
t1
closed
t2

and I then want to add the employees/task association (tasks assigend to 
employees):

employees
e1
tasks
open
t1
closed
t2

The task nodes (t1 and t2) should, of course, not be replicated. Basically I 
see two options (of 5, 
http://osdir.com/ml/users.jackrabbit.apache.org/2009-10/msg00238.html ):
a) shareable nodes
b) multivalued weakreference properties

Which of these is better/more performant? Pros and cons of the two approaches? 
I would opt for a)...

Thanks in advance for your advices


AW: Shareable nodes vs weak references

2010-11-15 Thread Clemens Wyss
I didn't intend to crosspost, but had problems sending emails, which led me to 
the conclusion that the email to us...@sling did not go out...
Therefore I suggest to close this thread and hope to get answers on the 
us...@sling mailinglist ;-)

-Ursprüngliche Nachricht-
Von: Clemens Wyss [mailto:clemens...@mysign.ch] 
Gesendet: Montag, 15. November 2010 17:14
An: dev@sling.apache.org
Betreff: Shareable nodes vs weak references

Given the following data structure of projects and tasks:
project
p1
tasks
all
t1
t2
open
t1
closed
t2

and I then want to add the employees/task association (tasks assigend to 
employees):

employees
e1
tasks
open
t1
closed
t2

The task nodes (t1 and t2) should, of course, not be replicated. Basically I 
see two options (of 5, 
http://osdir.com/ml/users.jackrabbit.apache.org/2009-10/msg00238.html ):
a) shareable nodes
b) multivalued weakreference properties

Which of these is better/more performant? Pros and cons of the two approaches? 
I would opt for a)...

Thanks in advance for your advices


[jira] Assigned: (SLING-1859) Multi-value string properties are not displayed correctly

2010-11-14 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss reassigned SLING-1859:
---

Assignee: Clemens Wyss  (was: Mike Müller)

 Multi-value string properties are not displayed correctly
 -

 Key: SLING-1859
 URL: https://issues.apache.org/jira/browse/SLING-1859
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Sling Explorer 1.0.0
Reporter: Carsten Ziegeler
Assignee: Clemens Wyss

 I have a node with a multi value string property, and the explorer displays 
 the value as [Ljava.lang.Object;@1a6b7e, together with the hint [not a 
 property!] 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1859) Multi-value string properties are not displayed correctly

2010-11-14 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12931838#action_12931838
 ] 

Clemens Wyss commented on SLING-1859:
-

If resource.adaptTo(ValueMap) fails (i.e returns null) I try your 
cast-approach through ResourceUtil#getValueMap, so this does not seem to be 
the problem.

not sure you want strings, I guess you could also ask for Long[0] etc. 
the PropertyDefinition (Property#getDefinition()) should not only tell me if 
the property is mutivalued (PropertyDefinition#isMultiple()), but also the type 
the multiple values (PropertyDefinition#getRequiredType()), no matter whether 
it's empty or not.

I expect to always get a Property from the ValueMap-casted resource... Maybe a 
false implication?

 Multi-value string properties are not displayed correctly
 -

 Key: SLING-1859
 URL: https://issues.apache.org/jira/browse/SLING-1859
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Sling Explorer 1.0.0
Reporter: Carsten Ziegeler
Assignee: Mike Müller

 I have a node with a multi value string property, and the explorer displays 
 the value as [Ljava.lang.Object;@1a6b7e, together with the hint [not a 
 property!] 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Issue Comment Edited: (SLING-1859) Multi-value string properties are not displayed correctly

2010-11-14 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12931838#action_12931838
 ] 

Clemens Wyss edited comment on SLING-1859 at 11/14/10 11:00 AM:


If resource.adaptTo(ValueMap) fails (i.e returns null) I try your 
cast-approach through ResourceUtil#getValueMap, so this does not seem to be 
the problem.

not sure you want strings, I guess you could also ask for Long[0] etc. 
the Property should not only tell me if the property is mutivalued 
(Property#isMultiple()), but also the type the multiple values 
(Property#getType()), no matter whether it's empty or not.

I expect to always get a Property from the ValueMap-casted resource... Maybe a 
false implication?

  was (Author: clemensdev):
If resource.adaptTo(ValueMap) fails (i.e returns null) I try your 
cast-approach through ResourceUtil#getValueMap, so this does not seem to be 
the problem.

not sure you want strings, I guess you could also ask for Long[0] etc. 
the PropertyDefinition (Property#getDefinition()) should not only tell me if 
the property is mutivalued (PropertyDefinition#isMultiple()), but also the type 
the multiple values (PropertyDefinition#getRequiredType()), no matter whether 
it's empty or not.

I expect to always get a Property from the ValueMap-casted resource... Maybe a 
false implication?
  
 Multi-value string properties are not displayed correctly
 -

 Key: SLING-1859
 URL: https://issues.apache.org/jira/browse/SLING-1859
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Sling Explorer 1.0.0
Reporter: Carsten Ziegeler
Assignee: Clemens Wyss

 I have a node with a multi value string property, and the explorer displays 
 the value as [Ljava.lang.Object;@1a6b7e, together with the hint [not a 
 property!] 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1870) Sling should url decode the request url before trying to resolve to a resource

2010-11-12 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12931358#action_12931358
 ] 

Clemens Wyss commented on SLING-1870:
-

Felix:
what exactly ist our Jetty-Wrapper? Where can I find the sources? 

I looked at jetty/felix sources (eg..HttpURI and a Util class which call 
setPathInfo on jettys-Request). They seem to decode the uri's...

 Sling should url decode the request url before trying to resolve to a resource
 --

 Key: SLING-1870
 URL: https://issues.apache.org/jira/browse/SLING-1870
 Project: Sling
  Issue Type: Bug
Reporter: Clemens Wyss
Priority: Critical

 e.g.:
 JCR supports nodes with spaces (in its name), such as Nice World. 
 When accessing this node in Sling, the request url would  look something like
 http://sling host/path to node/Nice%20World
 unfortunately we then try to resolve /path to node/Nice%20World in the 
 JcrResourceRersolver which, of course, does NOT match/resolve!
 Hence somewhere before resolving the resource we should URLDecoder.decode the 
 request URL ( request.getPathInfo() )
 Possible solution:
 SlingHttpServletRequest could provide
 public String getResourceLookupPath()
 {
return URLDecoder.decode( request.getPathInfo(), UTF-8 ) );
 }
 This method could be used in RequestData#initResource and possibly other 
 places...
 public Resource initResource(ResourceResolver resourceResolver) {
 ...
 Resource resource = resourceResolver.resolve(request, 
 request.getResourceLookupPath() );
 ...
 Or is it up to the JcrResourceResolver to decode the URL it gets?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1859) Multi-value string properties are not displayed correctly

2010-11-11 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12931146#action_12931146
 ] 

Clemens Wyss commented on SLING-1859:
-

the given behavior arises when a multivalued property is empty. In that case 
(esp code follows):

var properties = 
resource.adaptTo(Packages.org.apache.sling.api.resource.ValueMap);
...
var property = properties.get( id, Packages.javax.jcr.Property );
...

property is null!, i.e. cannot be casted. Is this a bug, or am I doing 
something wrong?

 Multi-value string properties are not displayed correctly
 -

 Key: SLING-1859
 URL: https://issues.apache.org/jira/browse/SLING-1859
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Sling Explorer 1.0.0
Reporter: Carsten Ziegeler
Assignee: Mike Müller

 I have a node with a multi value string property, and the explorer displays 
 the value as [Ljava.lang.Object;@1a6b7e, together with the hint [not a 
 property!] 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Issue Comment Edited: (SLING-1859) Multi-value string properties are not displayed correctly

2010-11-11 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12931146#action_12931146
 ] 

Clemens Wyss edited comment on SLING-1859 at 11/11/10 3:08 PM:
---

the mentioned (mis-)behavior arises when a multivalued property is empty. In 
that case (esp code follows):

var properties = 
resource.adaptTo(Packages.org.apache.sling.api.resource.ValueMap);
...
var property = properties.get( id, Packages.javax.jcr.Property );
...

property is null!, i.e. cannot be casted. Is this a bug, or am I doing 
something wrong?

  was (Author: clemensdev):
the given behavior arises when a multivalued property is empty. In that 
case (esp code follows):

var properties = 
resource.adaptTo(Packages.org.apache.sling.api.resource.ValueMap);
...
var property = properties.get( id, Packages.javax.jcr.Property );
...

property is null!, i.e. cannot be casted. Is this a bug, or am I doing 
something wrong?
  
 Multi-value string properties are not displayed correctly
 -

 Key: SLING-1859
 URL: https://issues.apache.org/jira/browse/SLING-1859
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Sling Explorer 1.0.0
Reporter: Carsten Ziegeler
Assignee: Mike Müller

 I have a node with a multi value string property, and the explorer displays 
 the value as [Ljava.lang.Object;@1a6b7e, together with the hint [not a 
 property!] 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-1870) Sling should url decode the request url before trying to resolve to a resource

2010-11-10 Thread Clemens Wyss (JIRA)
Sling should url decode the request url before trying to resolve to a resource
--

 Key: SLING-1870
 URL: https://issues.apache.org/jira/browse/SLING-1870
 Project: Sling
  Issue Type: Bug
Reporter: Clemens Wyss
Priority: Critical


e.g.:
JCR supports nodes with spaces (in its name), such as Nice World. 
When accessing this node in Sling, the request url would  look something like
http://sling host/path to node/Nice%20World
unfortunately we then try to resolve /path to node/Nice%20World in the 
JcrResourceRersolver which, of course, does NOT match/resolve!

Hence somewhere before resolving the resource we should URLDecoder.decode the 
request URL ( request.getPathInfo() )

Possible solution:
SlingHttpServletRequest could provide
public String getResourceLookupPath()
{
   return URLDecoder.decode( request.getPathInfo(), UTF-8 ) );
}

This method could be used in RequestData#initResource and possibly other 
places...
public Resource initResource(ResourceResolver resourceResolver) {
...
Resource resource = resourceResolver.resolve(request, 
request.getResourceLookupPath() );
...

Or is it up to the JcrResourceResolver to decode the URL it gets?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1870) Sling should url decode the request url before trying to resolve to a resource

2010-11-10 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12930589#action_12930589
 ] 

Clemens Wyss commented on SLING-1870:
-

So SlingHttpServletRequestImpl should return the decoded URL in its 
getPathInfo()-method? 
Or 
SlingHttpServletRequestImpl::ctor should save the decoded URL into its 
pathInfo-memeber which is ebing returned by getPathInfo()?

 Sling should url decode the request url before trying to resolve to a resource
 --

 Key: SLING-1870
 URL: https://issues.apache.org/jira/browse/SLING-1870
 Project: Sling
  Issue Type: Bug
Reporter: Clemens Wyss
Priority: Critical

 e.g.:
 JCR supports nodes with spaces (in its name), such as Nice World. 
 When accessing this node in Sling, the request url would  look something like
 http://sling host/path to node/Nice%20World
 unfortunately we then try to resolve /path to node/Nice%20World in the 
 JcrResourceRersolver which, of course, does NOT match/resolve!
 Hence somewhere before resolving the resource we should URLDecoder.decode the 
 request URL ( request.getPathInfo() )
 Possible solution:
 SlingHttpServletRequest could provide
 public String getResourceLookupPath()
 {
return URLDecoder.decode( request.getPathInfo(), UTF-8 ) );
 }
 This method could be used in RequestData#initResource and possibly other 
 places...
 public Resource initResource(ResourceResolver resourceResolver) {
 ...
 Resource resource = resourceResolver.resolve(request, 
 request.getResourceLookupPath() );
 ...
 Or is it up to the JcrResourceResolver to decode the URL it gets?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Issue Comment Edited: (SLING-1870) Sling should url decode the request url before trying to resolve to a resource

2010-11-10 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12930589#action_12930589
 ] 

Clemens Wyss edited comment on SLING-1870 at 11/10/10 8:37 AM:
---

1) So SlingHttpServletRequestImpl should return the decoded URL in its 
getPathInfo()-method? 
Or 
2) SlingHttpServletRequestImpl::ctor should save the decoded URL into its 
pathInfo-memeber which is ebing returned by getPathInfo()?

As getPathInfo() is the only method which accesses pathInfo, 2) seems to make 
more sense...

  was (Author: clemensdev):
So SlingHttpServletRequestImpl should return the decoded URL in its 
getPathInfo()-method? 
Or 
SlingHttpServletRequestImpl::ctor should save the decoded URL into its 
pathInfo-memeber which is ebing returned by getPathInfo()?
  
 Sling should url decode the request url before trying to resolve to a resource
 --

 Key: SLING-1870
 URL: https://issues.apache.org/jira/browse/SLING-1870
 Project: Sling
  Issue Type: Bug
Reporter: Clemens Wyss
Priority: Critical

 e.g.:
 JCR supports nodes with spaces (in its name), such as Nice World. 
 When accessing this node in Sling, the request url would  look something like
 http://sling host/path to node/Nice%20World
 unfortunately we then try to resolve /path to node/Nice%20World in the 
 JcrResourceRersolver which, of course, does NOT match/resolve!
 Hence somewhere before resolving the resource we should URLDecoder.decode the 
 request URL ( request.getPathInfo() )
 Possible solution:
 SlingHttpServletRequest could provide
 public String getResourceLookupPath()
 {
return URLDecoder.decode( request.getPathInfo(), UTF-8 ) );
 }
 This method could be used in RequestData#initResource and possibly other 
 places...
 public Resource initResource(ResourceResolver resourceResolver) {
 ...
 Resource resource = resourceResolver.resolve(request, 
 request.getResourceLookupPath() );
 ...
 Or is it up to the JcrResourceResolver to decode the URL it gets?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1870) Sling should url decode the request url before trying to resolve to a resource

2010-11-10 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12930597#action_12930597
 ] 

Clemens Wyss commented on SLING-1870:
-

OTH:
jetty does not seem do to its job...i.e. return a decoded String

The spec 
http://download.oracle.com/javaee/1.4/api/javax/servlet/http/HttpServletRequest.html#getPathInfo()
 explicitly says decoded by the container

 Sling should url decode the request url before trying to resolve to a resource
 --

 Key: SLING-1870
 URL: https://issues.apache.org/jira/browse/SLING-1870
 Project: Sling
  Issue Type: Bug
Reporter: Clemens Wyss
Priority: Critical

 e.g.:
 JCR supports nodes with spaces (in its name), such as Nice World. 
 When accessing this node in Sling, the request url would  look something like
 http://sling host/path to node/Nice%20World
 unfortunately we then try to resolve /path to node/Nice%20World in the 
 JcrResourceRersolver which, of course, does NOT match/resolve!
 Hence somewhere before resolving the resource we should URLDecoder.decode the 
 request URL ( request.getPathInfo() )
 Possible solution:
 SlingHttpServletRequest could provide
 public String getResourceLookupPath()
 {
return URLDecoder.decode( request.getPathInfo(), UTF-8 ) );
 }
 This method could be used in RequestData#initResource and possibly other 
 places...
 public Resource initResource(ResourceResolver resourceResolver) {
 ...
 Resource resource = resourceResolver.resolve(request, 
 request.getResourceLookupPath() );
 ...
 Or is it up to the JcrResourceResolver to decode the URL it gets?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1870) Sling should url decode the request url before trying to resolve to a resource

2010-11-10 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12930611#action_12930611
 ] 

Clemens Wyss commented on SLING-1870:
-

SlingHttpServletRequestImpl is the wrong place as we could (e.g. within a 
Tomcat) end up with a double-decoded URL... IMHO best would be if our 
Jetty-wrapper returned (as a workaround) the decoded url

 Sling should url decode the request url before trying to resolve to a resource
 --

 Key: SLING-1870
 URL: https://issues.apache.org/jira/browse/SLING-1870
 Project: Sling
  Issue Type: Bug
Reporter: Clemens Wyss
Priority: Critical

 e.g.:
 JCR supports nodes with spaces (in its name), such as Nice World. 
 When accessing this node in Sling, the request url would  look something like
 http://sling host/path to node/Nice%20World
 unfortunately we then try to resolve /path to node/Nice%20World in the 
 JcrResourceRersolver which, of course, does NOT match/resolve!
 Hence somewhere before resolving the resource we should URLDecoder.decode the 
 request URL ( request.getPathInfo() )
 Possible solution:
 SlingHttpServletRequest could provide
 public String getResourceLookupPath()
 {
return URLDecoder.decode( request.getPathInfo(), UTF-8 ) );
 }
 This method could be used in RequestData#initResource and possibly other 
 places...
 public Resource initResource(ResourceResolver resourceResolver) {
 ...
 Resource resource = resourceResolver.resolve(request, 
 request.getResourceLookupPath() );
 ...
 Or is it up to the JcrResourceResolver to decode the URL it gets?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Scripted ACLs/Authorization

2010-11-08 Thread Clemens Wyss
Often the basic ACL features are not sufficient to represent all authorization 
needs (http://dev.day.com/content/ddc/blog/2009/01/theaclisdead.html ). 

Wouldn't it be nice if we could define our authorization needs in an 
Authorization DSL ( in Groovy or jRuby ;-) ) which then could be applied to a 
node, or even better a node type?

What about a mixin type:

[sling:ScriptedACL]
  mixin
  + sling:aclScript protected mandatory

The aclScript would be written in the Authorization DSL. Predefined variables 
would provide access to the current node, session, etc 

Dynamic ACL 
(http://confluence.sakaiproject.org/display/KERNDOC/KERN-629+Time+base+ACL) 
would become a subset of this feature as this could be solved alike.

I agree, there are still many open points such as:
- who should execute these scripts? 
- when should these scripts be executed?
- performance implications?

WDYT?


[jira] Created: (SLING-1812) Sling Explorer - Delete Node does not work

2010-10-01 Thread Clemens Wyss (JIRA)
Sling Explorer - Delete Node does not work
--

 Key: SLING-1812
 URL: https://issues.apache.org/jira/browse/SLING-1812
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Reporter: Clemens Wyss
Assignee: Clemens Wyss


dito

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (SLING-1812) Sling Explorer - Delete Node does not work

2010-10-01 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss resolved SLING-1812.
-

Fix Version/s: Sling Explorer 1.0.0
   Resolution: Fixed

was just a path/escaping problem

 Sling Explorer - Delete Node does not work
 --

 Key: SLING-1812
 URL: https://issues.apache.org/jira/browse/SLING-1812
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Reporter: Clemens Wyss
Assignee: Clemens Wyss
 Fix For: Sling Explorer 1.0.0


 dito

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SLING-1812) Sling Explorer - Delete Node does not work

2010-10-01 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss updated SLING-1812:



rev 1003540

 Sling Explorer - Delete Node does not work
 --

 Key: SLING-1812
 URL: https://issues.apache.org/jira/browse/SLING-1812
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Reporter: Clemens Wyss
Assignee: Clemens Wyss
 Fix For: Sling Explorer 1.0.0


 dito

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



RE: SlingPostServletClient, helper class?

2010-09-29 Thread Clemens Wyss
how do I enforce jcr:primaryType over SlingPostServlet?

 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Tuesday, September 28, 2010 5:12 PM
 To: 'dev@sling.apache.org'
 Subject: RE: SlingPostServletClient, helper class?


 SlingIntegrationTestClient
 doesn't look bad, I'll give it a try

 Thanks
 Clemens

  -Original Message-
  From: Bertrand Delacretaz [mailto:bdelacre...@apache.org]
  Sent: Tuesday, September 28, 2010 2:49 PM
  To: dev@sling.apache.org
  Subject: Re: SlingPostServletClient, helper class?
 
 
  On Tue, Sep 28, 2010 at 2:44 PM, Clemens Wyss
  clemens...@mysign.ch wrote:
   Do we somewhere in the sling-repo/sources have a helper
  class for posting data to Sling(PostServlet)?
 
  I don't think so, the closest would be
  http://svn.apache.org/repos/asf/sling/trunk/bundles/commons/te
 sting/src/main/java/org/apache/sling/commons/testing/integrati
 on/SlingIntegrationTestClient.java

 
  Asked the other way round:
  given a legacy database with lots of data, how would you
 inject (export/import) this data into Sling/JCR?

 Either use standard POST as you suggest, maybe exporting the legacy
 content into curl POST commands, or write your own POST handler that
 accepts a legacy dump format.

 -Bertrand



RE: SlingPostServletClient, helper class?

2010-09-29 Thread Clemens Wyss
I am importing my legacy data using the SlingPostServlet and I would like to 
enforce the node's primary type I import (now all nodes end up as sling:Folder)

 -Original Message-
 From: Bertrand Delacretaz [mailto:bdelacre...@apache.org]
 Sent: Wednesday, September 29, 2010 9:36 AM
 To: dev@sling.apache.org
 Subject: Re: SlingPostServletClient, helper class?


 On Wed, Sep 29, 2010 at 9:24 AM, Clemens Wyss
 clemens...@mysign.ch wrote:
  how do I enforce jcr:primaryType over SlingPostServlet?

 not sure what you mean...enforcing apples over oranges? ;-)
 -Bertrand



RE: SlingPostServletClient, helper class?

2010-09-29 Thread Clemens Wyss
thx, I, once again, tried to make two steps at once ;-) Had jcr:primaryType in 
the POST but provided a yet unknown type...

Tried to register my own nodeType, but unfortunately 
/jcr:system/jcr/nodeTypes seems to be protected. Can I register my own 
nodeTypes using the SlingPostServlet at all?

 -Original Message-
 From: Bertrand Delacretaz [mailto:bdelacre...@apache.org]
 Sent: Wednesday, September 29, 2010 10:23 AM
 To: dev@sling.apache.org
 Subject: Re: SlingPostServletClient, helper class?


 On Wed, Sep 29, 2010 at 9:46 AM, Clemens Wyss
 clemens...@mysign.ch wrote:
  I am importing my legacy data using the SlingPostServlet
 and I would like to enforce the node's
  primary type I import (now all nodes end up as sling:Folder)

 Adding a jcr:primaryType parameter to the POST should do it.

 -Bertrand



SlingPostServletClient, helper class?

2010-09-28 Thread Clemens Wyss
Do we somewhere in the sling-repo/sources have a helper class for posting data 
to Sling(PostServlet)?

Asked the other way round:
given a legacy database with lots of data, how would you inject (export/import) 
this data into Sling/JCR?

Thx in advance for your advices/hints
Clemens


RE: Welcome Clemens Wyss

2010-09-17 Thread Clemens Wyss
A few words about myself (feel free to skip ;-) ):
I (aged 42, married and father of 3 children) live in
Switzerland where I studied information technologies at
the ETH Zurich quite a long time ago.
I then worked for approx 4 years with Smalltalk (still lovin' it),
switched over to C#/.NET (dito), Python (where I (not only) played
around with bobo(*)) and Ruby/Rails (dito), before entering the
Java world at the beginning of this year. That said, since the
beginning of this year I work for MySign (http://www.mysign.ch)

Looking forward to further contribute to Sling...

(*)bobo, very RESTy, but that was 1998! :-)

 -Original Message-
 From: Felix Meschberger [mailto:fmesc...@gmail.com]
 Sent: Friday, September 17, 2010 8:35 AM
 To: Sling Developers
 Subject: Welcome Clemens Wyss


 Hi all,

 I want to let you know that the Apache Sling PMC decided to invite
 Clemens Wyss as a committer to the Apache Sling project based on his
 work on the JCR Explorer; an invitation which Clemens
 accepted. Thanks.

 Please join me in welcoming Clemens Wyss as a new committer !

 Keep up the good work, Clemens, and thanks for your contributions. And
 feel free to briefly introduce yourself if you want ;-)

 Regards
 Felix





RE: Welcome Clemens Wyss

2010-09-17 Thread Clemens Wyss
 So when will we see Smalltalk scripting support in Sling? :)
Smalltalk (at its best) is a system not a language :-)
But hey, we have jRuby (and Groovy) which adopts some of the beautiful
Smalltalk-concepts

 -Original Message-
 From: Vidar Ramdal [mailto:vi...@idium.no]
 Sent: Friday, September 17, 2010 9:48 AM
 To: dev@sling.apache.org
 Subject: Re: Welcome Clemens Wyss


 On Fri, Sep 17, 2010 at 9:06 AM, Clemens Wyss
 clemens...@mysign.ch wrote:
  A few words about myself (feel free to skip ;-) ):
  I (aged 42, married and father of 3 children) live in
  Switzerland where I studied information technologies at
  the ETH Zurich quite a long time ago.
  I then worked for approx 4 years with Smalltalk (still lovin' it),
  switched over to C#/.NET (dito), Python (where I (not only) played
  around with bobo(*)) and Ruby/Rails (dito), before entering the
  Java world at the beginning of this year. That said, since the
  beginning of this year I work for MySign (http://www.mysign.ch)
 
  Looking forward to further contribute to Sling...
 
  (*)bobo, very RESTy, but that was 1998! :-)

 Welcome, Clemens!

 So when will we see Smalltalk scripting support in Sling? :)

 --
 Vidar S. Ramdal vi...@idium.no - http://www.idium.no
 Sommerrogata 13-15, N-0255 Oslo, Norway
 + 47 22 00 84 00 / +47 22 00 84 76
 Quando omni flunkus moritatus!



RE: [sling explorer] Form based auth with IE to no avail :-(

2010-09-15 Thread Clemens Wyss
looks like an IE caching issue.
If we make the getSessionInfo-URI unique
(i.e. prevent caching) it works:
...
var res=Sling.httpGet(Sling.baseurl+/system/sling/info.sessionInfo.+new 
Date().getTime()+.json);
...

WDYT?

 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Wednesday, September 15, 2010 8:10 AM
 To: 'dev@sling.apache.org'
 Subject: RE: [sling explorer] Form based auth with IE to no avail :-(


 conclusion:
 in IE the clientside/javascript Sling.getSessionInfo() is not always
 executed (i.e. the http GET call to
 /system/sling/info.sessionInfo.json)!

 Place the attached test.html on the root and

 a) open it with FF inspecting the two
 /system/sling/info.sessionInfo.json-calls
 in firebug (or fiddler)

 b) open it (don't forget the '.' ;-), ie
 http://localhost.:8080/test.html )
  in IE inspecting the (non existent)
 /system/sling/info.sessionInfo.json-calls
 in fiddler

 not always is fuzzy, I know, but I really haven't found the
 pattern of IE.

 jira issue?

  -Original Message-
  From: Clemens Wyss [mailto:clemens...@mysign.ch]
  Sent: Wednesday, September 15, 2010 7:39 AM
  To: 'dev@sling.apache.org'
  Subject: RE: [sling explorer] Form based auth with IE to no
 avail :-(
 
 
   I would if fiddler provided me this data (headers), such as
   firebug does...
  --
  http://weblogs.asp.net/lorenh/archive/2008/01/10/tip-for-using
 -fiddler-on-localhost.aspx
 the '.' does it!, OMG

 I can now proceed debugging the IE traces...

  -Original Message-
  From: Clemens Wyss [mailto:clemens...@mysign.ch]
  Sent: Tuesday, September 14, 2010 7:22 PM
  To: 'dev@sling.apache.org'
  Subject: RE: [sling explorer] Form based auth with IE to no
 avail :-(
 
 
  I would if fiddler provided me this data (headers), such as
  firebug does...
 
   -Original Message-
   From: Eric Norman [mailto:eric.d.nor...@gmail.com]
   Sent: Tuesday, September 14, 2010 6:42 PM
   To: dev@sling.apache.org
   Subject: Re: [sling explorer] Form based auth with IE to no
  avail :-(
  
  
   Maybe check if IE is getting/sending the sling cookie on the
   second request.
  
   On Sep 14, 2010 9:36 AM, Clemens Wyss
  clemens...@mysign.ch wrote:
  
   Sling Explorer does form based authentication, which works
   fine(*) with FF,
   Safari and Chrome. Unfortunately neither on IE6 nor on
 IE8 it works.
   Debugging revealed that the POSTed form data to
 '/j_security_check'
   is equal. Nevertheless if I gather the
 Sling.getSessionInfo() after
   the aforementioned POST on IE I get the anonymous credentials,
   whereas on the other browsers I get the expected credentials.
   What could possibly be the reason herefore?
  
   Thx for you help/hints
   -- Clemens
  
 



RE: [sling explorer] Form based auth with IE to no avail :-(

2010-09-15 Thread Clemens Wyss
after a f2f discussion with mike I see reason that
we'd better add the appropriate cache header to
/system/sling/info.sessionInfo, appropriate being:

Cache-Control : private, no-store, no-cache, max-age=0, must-revalidate, 
private, no-store, no-cache, max-age=0, must-revalidate

WDYT?


 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Wednesday, September 15, 2010 8:35 AM
 To: 'dev@sling.apache.org'
 Subject: RE: [sling explorer] Form based auth with IE to no avail :-(


 looks like an IE caching issue.
 If we make the getSessionInfo-URI unique
 (i.e. prevent caching) it works:
 ...
 var
 res=Sling.httpGet(Sling.baseurl+/system/sling/info.sessionInf
 o.+new Date().getTime()+.json);
 ...

 WDYT?

  -Original Message-
  From: Clemens Wyss [mailto:clemens...@mysign.ch]
  Sent: Wednesday, September 15, 2010 8:10 AM
  To: 'dev@sling.apache.org'
  Subject: RE: [sling explorer] Form based auth with IE to no
 avail :-(
 
 
  conclusion:
  in IE the clientside/javascript Sling.getSessionInfo() is not always
  executed (i.e. the http GET call to
  /system/sling/info.sessionInfo.json)!
 
  Place the attached test.html on the root and
 
  a) open it with FF inspecting the two
  /system/sling/info.sessionInfo.json-calls
  in firebug (or fiddler)
 
  b) open it (don't forget the '.' ;-), ie
  http://localhost.:8080/test.html )
   in IE inspecting the (non existent)
  /system/sling/info.sessionInfo.json-calls
  in fiddler
 
  not always is fuzzy, I know, but I really haven't found the
  pattern of IE.
 
  jira issue?
 
   -Original Message-
   From: Clemens Wyss [mailto:clemens...@mysign.ch]
   Sent: Wednesday, September 15, 2010 7:39 AM
   To: 'dev@sling.apache.org'
   Subject: RE: [sling explorer] Form based auth with IE to no
  avail :-(
  
  
I would if fiddler provided me this data (headers), such as
firebug does...
   --
   http://weblogs.asp.net/lorenh/archive/2008/01/10/tip-for-using
  -fiddler-on-localhost.aspx
  the '.' does it!, OMG
 
  I can now proceed debugging the IE traces...
 
   -Original Message-
   From: Clemens Wyss [mailto:clemens...@mysign.ch]
   Sent: Tuesday, September 14, 2010 7:22 PM
   To: 'dev@sling.apache.org'
   Subject: RE: [sling explorer] Form based auth with IE to no
  avail :-(
  
  
   I would if fiddler provided me this data (headers), such as
   firebug does...
  
-Original Message-
From: Eric Norman [mailto:eric.d.nor...@gmail.com]
Sent: Tuesday, September 14, 2010 6:42 PM
To: dev@sling.apache.org
Subject: Re: [sling explorer] Form based auth with IE to no
   avail :-(
   
   
Maybe check if IE is getting/sending the sling cookie on the
second request.
   
On Sep 14, 2010 9:36 AM, Clemens Wyss
   clemens...@mysign.ch wrote:
   
Sling Explorer does form based authentication, which works
fine(*) with FF,
Safari and Chrome. Unfortunately neither on IE6 nor on
  IE8 it works.
Debugging revealed that the POSTed form data to
  '/j_security_check'
is equal. Nevertheless if I gather the
  Sling.getSessionInfo() after
the aforementioned POST on IE I get the anonymous credentials,
whereas on the other browsers I get the expected credentials.
What could possibly be the reason herefore?
   
Thx for you help/hints
-- Clemens
   
  
 



[jira] Created: (SLING-1776) Caching should be disbaled for /system/sling/info.sessionInfo

2010-09-15 Thread Clemens Wyss (JIRA)
Caching should be disbaled for /system/sling/info.sessionInfo
-

 Key: SLING-1776
 URL: https://issues.apache.org/jira/browse/SLING-1776
 Project: Sling
  Issue Type: Bug
  Components: Authentication
 Environment: InternetExplorer
Reporter: Clemens Wyss


IE seems to cache the /system/sling/info.sessionInfo.json page/result. 
If you perform an authentication in the browser and then gather the current 
session info through Sling.getSessionInfo the outdated info is returned 
instead. 

Solution: 
the following http header should be attached to the given url/resource:
Cache-Control : private, no-store, no-cache, max-age=0, must-revalidate

Additionally the Sling#getSessionInfor method in sling.js could make the URI 
unique by adding a time tag and hence preventing any browser from caching the 
result.
...
var res=Sling.httpGet(Sling.baseurl+/system/sling/info.sessionInfo.+new 
Date().getTime()+.json);

...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SLING-1776) Caching should be disabled for /system/sling/info.sessionInfo(.json)

2010-09-15 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss updated SLING-1776:


Summary: Caching should be disabled for 
/system/sling/info.sessionInfo(.json)  (was: Caching should be disbaled for 
/system/sling/info.sessionInfo)

 Caching should be disabled for /system/sling/info.sessionInfo(.json)
 

 Key: SLING-1776
 URL: https://issues.apache.org/jira/browse/SLING-1776
 Project: Sling
  Issue Type: Bug
  Components: Authentication
 Environment: InternetExplorer
Reporter: Clemens Wyss

 IE seems to cache the /system/sling/info.sessionInfo.json page/result. 
 If you perform an authentication in the browser and then gather the current 
 session info through Sling.getSessionInfo the outdated info is returned 
 instead. 
 Solution: 
 the following http header should be attached to the given url/resource:
 Cache-Control : private, no-store, no-cache, max-age=0, must-revalidate
 Additionally the Sling#getSessionInfor method in sling.js could make the URI 
 unique by adding a time tag and hence preventing any browser from caching the 
 result.
 ...
 var res=Sling.httpGet(Sling.baseurl+/system/sling/info.sessionInfo.+new 
 Date().getTime()+.json);
 ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



RE: [sling explorer] Form based auth with IE to no avail :-(

2010-09-14 Thread Clemens Wyss
I would if fiddler provided me this data (headers), such as firebug does...

 -Original Message-
 From: Eric Norman [mailto:eric.d.nor...@gmail.com]
 Sent: Tuesday, September 14, 2010 6:42 PM
 To: dev@sling.apache.org
 Subject: Re: [sling explorer] Form based auth with IE to no avail :-(


 Maybe check if IE is getting/sending the sling cookie on the
 second request.

 On Sep 14, 2010 9:36 AM, Clemens Wyss clemens...@mysign.ch wrote:

 Sling Explorer does form based authentication, which works
 fine(*) with FF,
 Safari and Chrome. Unfortunately neither on IE6 nor on IE8 it works.
 Debugging revealed that the POSTed form data to '/j_security_check'
 is equal. Nevertheless if I gather the Sling.getSessionInfo() after
 the aforementioned POST on IE I get the anonymous credentials,
 whereas on the other browsers I get the expected credentials.
 What could possibly be the reason herefore?

 Thx for you help/hints
 -- Clemens



RE: [sling explorer] Form based auth with IE to no avail :-(

2010-09-14 Thread Clemens Wyss
In order to get some more tracking data with fiddler I chnaged the URL from 
localhost:8080 to my notebook's host name, i.e. cws-lap:8080. Now I get a 
security warning from IE. Unfortunately I only have a german version and hence 
only  the german warning text:
Die Seite greift auf Informationen aus anderen Daten zu. Dies kann ein 
Sicherheitproblem darstellen. Möchten Sie den Vorgang fortsetzen?

which more or less translates to:
The page is accessing information from other data. This could be a security 
issue. Would you like to proceed?

When I proceed I get a javascript error and the resource tree is not redered. I 
guess this is another problem (which is nonetheless to be solved, too?)


 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Tuesday, September 14, 2010 7:22 PM
 To: 'dev@sling.apache.org'
 Subject: RE: [sling explorer] Form based auth with IE to no avail :-(


 I would if fiddler provided me this data (headers), such as
 firebug does...

  -Original Message-
  From: Eric Norman [mailto:eric.d.nor...@gmail.com]
  Sent: Tuesday, September 14, 2010 6:42 PM
  To: dev@sling.apache.org
  Subject: Re: [sling explorer] Form based auth with IE to no
 avail :-(
 
 
  Maybe check if IE is getting/sending the sling cookie on the
  second request.
 
  On Sep 14, 2010 9:36 AM, Clemens Wyss
 clemens...@mysign.ch wrote:
 
  Sling Explorer does form based authentication, which works
  fine(*) with FF,
  Safari and Chrome. Unfortunately neither on IE6 nor on IE8 it works.
  Debugging revealed that the POSTed form data to '/j_security_check'
  is equal. Nevertheless if I gather the Sling.getSessionInfo() after
  the aforementioned POST on IE I get the anonymous credentials,
  whereas on the other browsers I get the expected credentials.
  What could possibly be the reason herefore?
 
  Thx for you help/hints
  -- Clemens
 



RE: [sling explorer] Form based auth with IE to no avail :-(

2010-09-14 Thread Clemens Wyss
 I would if fiddler provided me this data (headers), such as
 firebug does...
-- 
http://weblogs.asp.net/lorenh/archive/2008/01/10/tip-for-using-fiddler-on-localhost.aspx
the '.' does it!, OMG

I can now proceed debugging the IE traces...

 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Tuesday, September 14, 2010 7:22 PM
 To: 'dev@sling.apache.org'
 Subject: RE: [sling explorer] Form based auth with IE to no avail :-(


 I would if fiddler provided me this data (headers), such as
 firebug does...

  -Original Message-
  From: Eric Norman [mailto:eric.d.nor...@gmail.com]
  Sent: Tuesday, September 14, 2010 6:42 PM
  To: dev@sling.apache.org
  Subject: Re: [sling explorer] Form based auth with IE to no
 avail :-(
 
 
  Maybe check if IE is getting/sending the sling cookie on the
  second request.
 
  On Sep 14, 2010 9:36 AM, Clemens Wyss
 clemens...@mysign.ch wrote:
 
  Sling Explorer does form based authentication, which works
  fine(*) with FF,
  Safari and Chrome. Unfortunately neither on IE6 nor on IE8 it works.
  Debugging revealed that the POSTed form data to '/j_security_check'
  is equal. Nevertheless if I gather the Sling.getSessionInfo() after
  the aforementioned POST on IE I get the anonymous credentials,
  whereas on the other browsers I get the expected credentials.
  What could possibly be the reason herefore?
 
  Thx for you help/hints
  -- Clemens
 



[jira] Assigned: (SLING-1758) [explorer] refer to child node instead of sub-node

2010-09-13 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss reassigned SLING-1758:
---

Assignee: Clemens Wyss

 [explorer] refer to child node instead of sub-node
 --

 Key: SLING-1758
 URL: https://issues.apache.org/jira/browse/SLING-1758
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Reporter: Justin Edelson
Assignee: Clemens Wyss



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Assigned: (SLING-1757) [explorer] can't select root node

2010-09-13 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss reassigned SLING-1757:
---

Assignee: Clemens Wyss

 [explorer] can't select root node
 -

 Key: SLING-1757
 URL: https://issues.apache.org/jira/browse/SLING-1757
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Reporter: Justin Edelson
Assignee: Clemens Wyss
Priority: Critical
 Fix For: Sling Explorer 1.0.0


 this makes it impossible (AFAICT) to create a new child directly under the 
 root node

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Assigned: (SLING-1759) [explorer] logo shouldn't refer to incubator.apache.org

2010-09-13 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss reassigned SLING-1759:
---

Assignee: Clemens Wyss

 [explorer] logo shouldn't refer to incubator.apache.org
 ---

 Key: SLING-1759
 URL: https://issues.apache.org/jira/browse/SLING-1759
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Reporter: Justin Edelson
Assignee: Clemens Wyss
Priority: Trivial
 Fix For: Sling Explorer 1.0.0




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1765) Problems with authentication if basic auth was used before opening Sling Explorer

2010-09-13 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12908799#action_12908799
 ] 

Clemens Wyss commented on SLING-1765:
-

wouldn't the clean solution be for the explorer to not only check if authType 
is set, but that authType == 'Form' ? 

 Problems with authentication if basic auth was used before opening Sling 
 Explorer
 -

 Key: SLING-1765
 URL: https://issues.apache.org/jira/browse/SLING-1765
 Project: Sling
  Issue Type: Bug
Reporter: Mike Müller
Assignee: Felix Meschberger
Priority: Minor
 Fix For: Sling Explorer 1.0.0


 If you login to /system/console and then go back to /.explorer.html the 
 explorer shows that you're logged in, which is not the case. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SLING-1740) Sling Explorer - Displaying/showing server side errors

2010-09-12 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss updated SLING-1740:


Attachment: sling-1740-2.patch

patch which provides the described functionality (merged with Justin's path 
commit)

 Sling Explorer - Displaying/showing server side errors
 --

 Key: SLING-1740
 URL: https://issues.apache.org/jira/browse/SLING-1740
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Reporter: Clemens Wyss
Assignee: Mike Müller
Priority: Minor
 Attachments: sling-1740-2.patch


 Almost all operation of Sling Explorer are performed through Ajax. So far any 
 error that occurred was ignored. This patch makes 'em visible through 
 displaying errors in a modal pop-up-dialog.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



adding a subnode to a resource/node which has a dot('.') in its name does not work

2010-09-09 Thread Clemens Wyss
before entering a bug(?) in jira, I would like to discuss this issue here.

When I (try) add a subnode to a resource which has a dot ('.') in its name, it 
doesn't work AND a 200-response is sent, indicating that content without the 
dot and extension was modified.

E.g. (with Sling Explorer):
select node /sling-logo.png
type 'juhu' into Name hint field
click 'new sub-node'

-- Response:
Content modified /sling-logo
Status  200
Message OK
Location/sling-logo
Parent Location /
Path/sling-logo
Referer http://localhost:8080/.explorer.html

This very POST-request is sent to http://localhost:8080/sling-logo.png/*

Feature or bug?


[jira] Created: (SLING-1740) Sling Explorer - Displaying/showing server side errors

2010-09-09 Thread Clemens Wyss (JIRA)
Sling Explorer - Displaying/showing server side errors
--

 Key: SLING-1740
 URL: https://issues.apache.org/jira/browse/SLING-1740
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Reporter: Clemens Wyss
Priority: Minor


Almost all operation of Sling Explorer are performed through Ajax. So far any 
error that occurred was ignored. This patch makes 'em visible through 
displaying errors in a modal pop-up-dialog.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Assigned: (SLING-1740) Sling Explorer - Displaying/showing server side errors

2010-09-09 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss reassigned SLING-1740:
---

Assignee: Clemens Wyss

 Sling Explorer - Displaying/showing server side errors
 --

 Key: SLING-1740
 URL: https://issues.apache.org/jira/browse/SLING-1740
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Reporter: Clemens Wyss
Assignee: Clemens Wyss
Priority: Minor

 Almost all operation of Sling Explorer are performed through Ajax. So far any 
 error that occurred was ignored. This patch makes 'em visible through 
 displaying errors in a modal pop-up-dialog.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SLING-1740) Sling Explorer - Displaying/showing server side errors

2010-09-09 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss updated SLING-1740:


Attachment: sling-1740.patch

patch which resolves/implements the described improvement

 Sling Explorer - Displaying/showing server side errors
 --

 Key: SLING-1740
 URL: https://issues.apache.org/jira/browse/SLING-1740
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Reporter: Clemens Wyss
Assignee: Clemens Wyss
Priority: Minor
 Attachments: sling-1740.patch


 Almost all operation of Sling Explorer are performed through Ajax. So far any 
 error that occurred was ignored. This patch makes 'em visible through 
 displaying errors in a modal pop-up-dialog.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-1741) An exception should be thrown when trying to add a subnode to an nt:file-node

2010-09-09 Thread Clemens Wyss (JIRA)
An exception should be thrown when trying to add a subnode to an nt:file-node
-

 Key: SLING-1741
 URL: https://issues.apache.org/jira/browse/SLING-1741
 Project: Sling
  Issue Type: Bug
  Components: JCR
Reporter: Clemens Wyss


The nt:file nodetype (without any other mixin node types assigned to the node) 
only supports one single child
node whose name is jcr:content. Hence when you try to add a subnode to an 
nt:file node you should be getting an error/exception... 
This is not the case though


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



RE: adding a subnode to a resource/node which has a dot('.') in its name does not work

2010-09-09 Thread Clemens Wyss
Coming back to my permission question:
is there no way (no need) to determine whether a given nodetype allows adding 
subnodes?

 The nt:file nodetype (without any other
 mixin node types assigned to the node) only supports one single child
 node whose name is jcr:content.
where/how is this declared?

 -Original Message-
 From: Felix Meschberger [mailto:fmesc...@gmail.com]
 Sent: Thursday, September 09, 2010 3:17 PM
 To: dev@sling.apache.org
 Subject: Re: adding a subnode to a resource/node which has a
 dot('.') in
 its name does not work


 Hi,

 On 09.09.2010 15:11, Clemens Wyss wrote:
  so this use case should cause an error?

 Yes, that's expected, but ...

 
  AND on the server side
session.checkPermission(path, add_node); // path being:
 /sling-logo.png
  should return false, right?

 No. It is not a question of permission. It is a question of how the
 nt:file nodetype is defined: The nt:file nodetype (without any other
 mixin node types assigned to the node) only supports one single child
 node whose name is jcr:content.

 So the actual error message is something like
 javax.jcr.nodetype.ConstraintViolationException: No child node
 definition for 1_1284038191454 found in node /sling-logo.png

 Regards
 Felix

 
  Regards
  Clemens
 
  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Thursday, September 09, 2010 3:02 PM
  To: dev@sling.apache.org
  Subject: Re: adding a subnode to a resource/node which has a
  dot('.') in
  its name does not work
 
 
  Hi,
 
  I can confirm this behaviour with the trailing /*.
 
  If you POST to http://localhost:8080/sling-logo.png/; -- note the
  trailing slash without an astersik ! -- your actually get a failure
  which is expected in this case because you cannot add any
 node below a
  plain nt:file node as the sling-logo.png is.
 
  Would you mind posting an issue for this ? Thanks alot.
 
  Regards
  Felix
 
  On 09.09.2010 10:36, Clemens Wyss wrote:
  before entering a bug(?) in jira, I would like to discuss
  this issue here.
 
  When I (try) add a subnode to a resource which has a dot
  ('.') in its name, it doesn't work AND a 200-response is
  sent, indicating that content without the dot and extension
  was modified.
 
  E.g. (with Sling Explorer):
  select node /sling-logo.png
  type 'juhu' into Name hint field
  click 'new sub-node'
 
  -- Response:
  Content modified /sling-logo
  Status  200
  Message OK
  Location/sling-logo
  Parent Location /
  Path/sling-logo
  Referer http://localhost:8080/.explorer.html
 
  This very POST-request is sent to
  http://localhost:8080/sling-logo.png/*
 
  Feature or bug?
 



RE: adding a subnode to a resource/node which has a dot('.') in its name does not work

2010-09-09 Thread Clemens Wyss
there is also the
  NodeType#canAddChildNode(java.lang.String childNodeName)
method. So, shouldn't/couldn't it be:

if ( node.getPrimaryNodeType().
canAddChildNode(hello))
{
for(NodeType mixin: node.getMixinNodeTypes()) {
  if (nodeType.canAddChildNode(hello)) {
return obamaSlogan;
  }
}
}
return noChance;

AND why doesn't Node have a convenience method canAddChildNode():

public boolean canAddChildNode() {
if ( this.getPrimaryNodeType().
canAddChildNode(hello))
{
for(NodeType mixin: this.getMixinNodeTypes()) {
  if ( nodeType.canAddChildNode(hello)) {
return true;
  }
}
}
return false;
}

 -Original Message-
 From: Felix Meschberger [mailto:fmesc...@gmail.com]
 Sent: Thursday, September 09, 2010 3:57 PM
 To: dev@sling.apache.org
 Subject: Re: adding a subnode to a resource/node which has a
 dot('.') in
 its name does not work


 Hi,

 There is but it is a bit complicated. You have to check the
 primary and
 mixin node types of the parent node to be.

String childName;
String childPrimaryNodeType;

if (node.getPrimaryNodeType().
 canAddChildNode(childName, childPrimaryNodeType)) {
   return yesWeCan;
}

for(NodeType mixin: node.getMixinNodeTypes()) {
  if (nodeType.canAddChildNode(childName, childPrimaryNodeType)) {
return yesWeCan;
  }
}

return noChance;

 Same can be done for properties with the methods
 NodeType.canSetProperty(...).

 Hope this helps.

 Regards
 Felix


 On 09.09.2010 15:33, Clemens Wyss wrote:
  Coming back to my permission question:
  is there no way (no need) to determine whether a given
 nodetype allows adding subnodes?
 
  The nt:file nodetype (without any other
  mixin node types assigned to the node) only supports one
 single child
  node whose name is jcr:content.
  where/how is this declared?
 
  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Thursday, September 09, 2010 3:17 PM
  To: dev@sling.apache.org
  Subject: Re: adding a subnode to a resource/node which has a
  dot('.') in
  its name does not work
 
 
  Hi,
 
  On 09.09.2010 15:11, Clemens Wyss wrote:
  so this use case should cause an error?
 
  Yes, that's expected, but ...
 
 
  AND on the server side
session.checkPermission(path, add_node); // path being:
  /sling-logo.png
  should return false, right?
 
  No. It is not a question of permission. It is a question of how the
  nt:file nodetype is defined: The nt:file nodetype (without
 any other
  mixin node types assigned to the node) only supports one
 single child
  node whose name is jcr:content.
 
  So the actual error message is something like
  javax.jcr.nodetype.ConstraintViolationException: No child node
  definition for 1_1284038191454 found in node /sling-logo.png
 
  Regards
  Felix
 
 
  Regards
  Clemens
 
  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Thursday, September 09, 2010 3:02 PM
  To: dev@sling.apache.org
  Subject: Re: adding a subnode to a resource/node which has a
  dot('.') in
  its name does not work
 
 
  Hi,
 
  I can confirm this behaviour with the trailing /*.
 
  If you POST to http://localhost:8080/sling-logo.png/;
 -- note the
  trailing slash without an astersik ! -- your actually
 get a failure
  which is expected in this case because you cannot add any
  node below a
  plain nt:file node as the sling-logo.png is.
 
  Would you mind posting an issue for this ? Thanks alot.
 
  Regards
  Felix
 
  On 09.09.2010 10:36, Clemens Wyss wrote:
  before entering a bug(?) in jira, I would like to discuss
  this issue here.
 
  When I (try) add a subnode to a resource which has a dot
  ('.') in its name, it doesn't work AND a 200-response is
  sent, indicating that content without the dot and extension
  was modified.
 
  E.g. (with Sling Explorer):
  select node /sling-logo.png
  type 'juhu' into Name hint field
  click 'new sub-node'
 
  -- Response:
  Content modified /sling-logo
  Status  200
  Message OK
  Location/sling-logo
  Parent Location /
  Path/sling-logo
  Referer http://localhost:8080/.explorer.html
 
  This very POST-request is sent to
  http://localhost:8080/sling-logo.png/*
 
  Feature or bug?
 
 



RE: adding a subnode to a resource/node which has a dot('.') in its name does not work

2010-09-09 Thread Clemens Wyss
 look at using
 the getChildNodeDefinitions() while drawing the form
this is what I am/was after at.

 For example, on an nt:file node, the user simply
 shouldn't see the new sub-node button.
again, this was my intention

I will follwow your advice
Thx
Clemens


 -Original Message-
 From: Justin Edelson [mailto:justinedel...@gmail.com]
 Sent: Thursday, September 09, 2010 8:01 PM
 To: dev@sling.apache.org
 Subject: Re: adding a subnode to a resource/node which has a
 dot('.') in
 its name does not work




 On 9/9/10 10:28 AM, Clemens Wyss wrote:
  there is also the
NodeType#canAddChildNode(java.lang.String childNodeName)
  method. So, shouldn't/couldn't it be:
 
  if ( node.getPrimaryNodeType().
  canAddChildNode(hello))
  {
  for(NodeType mixin: node.getMixinNodeTypes()) {
if (nodeType.canAddChildNode(hello)) {
  return obamaSlogan;
}
  }
  }
  return noChance;
 The two-argument version is more precise. For example, if node is of
 type nt:folder (and doesn't have any mixins):

 node.getPrimaryNodeType().canAddChildNode(foo) - returns true
 node.getPrimaryNodeType().canAddChildNode(foo, nt:file) -
 returns true
 node.getPrimaryNodeType().canAddChildNode(foo, nt:unstructured) -
 returns false

 In the context of the explorer, I really think you should
 look at using
 the getChildNodeDefinitions() while drawing the form rather than
 checking if a node is addable after the user has submitted the form (I
 think that's what you're talking about).

 The check above will be done by the repository anyway, so there's no
 need for you to do it manually. What you can do is prevent
 the user from
 trying to create a child node (or property for that matter) which will
 fail. For example, on an nt:file node, the user simply
 shouldn't see the
 new sub-node button.

 
  AND why doesn't Node have a convenience method canAddChildNode():
 Something like this would probably fit nicely into the JCR
 Commons library.

 Justin

 
  public boolean canAddChildNode() {
  if ( this.getPrimaryNodeType().
  canAddChildNode(hello))
  {
  for(NodeType mixin: this.getMixinNodeTypes()) {
if ( nodeType.canAddChildNode(hello)) {
  return true;
}
  }
  }
  return false;
  }
 
  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Thursday, September 09, 2010 3:57 PM
  To: dev@sling.apache.org
  Subject: Re: adding a subnode to a resource/node which has a
  dot('.') in
  its name does not work
 
 
  Hi,
 
  There is but it is a bit complicated. You have to check the
  primary and
  mixin node types of the parent node to be.
 
 String childName;
 String childPrimaryNodeType;
 
 if (node.getPrimaryNodeType().
  canAddChildNode(childName, childPrimaryNodeType)) {
return yesWeCan;
 }
 
 for(NodeType mixin: node.getMixinNodeTypes()) {
   if (nodeType.canAddChildNode(childName,
 childPrimaryNodeType)) {
 return yesWeCan;
   }
 }
 
 return noChance;
 
  Same can be done for properties with the methods
  NodeType.canSetProperty(...).
 
  Hope this helps.
 
  Regards
  Felix
 
 
  On 09.09.2010 15:33, Clemens Wyss wrote:
  Coming back to my permission question:
  is there no way (no need) to determine whether a given
  nodetype allows adding subnodes?
 
  The nt:file nodetype (without any other
  mixin node types assigned to the node) only supports one
  single child
  node whose name is jcr:content.
  where/how is this declared?
 
  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Thursday, September 09, 2010 3:17 PM
  To: dev@sling.apache.org
  Subject: Re: adding a subnode to a resource/node which has a
  dot('.') in
  its name does not work
 
 
  Hi,
 
  On 09.09.2010 15:11, Clemens Wyss wrote:
  so this use case should cause an error?
 
  Yes, that's expected, but ...
 
 
  AND on the server side
session.checkPermission(path, add_node); // path being:
  /sling-logo.png
  should return false, right?
 
  No. It is not a question of permission. It is a question
 of how the
  nt:file nodetype is defined: The nt:file nodetype (without
  any other
  mixin node types assigned to the node) only supports one
  single child
  node whose name is jcr:content.
 
  So the actual error message is something like
  javax.jcr.nodetype.ConstraintViolationException: No child node
  definition for 1_1284038191454 found in node /sling-logo.png
 
  Regards
  Felix
 
 
  Regards
  Clemens
 
  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Thursday, September 09, 2010 3:02 PM
  To: dev@sling.apache.org
  Subject: Re: adding a subnode to a resource/node which has a
  dot('.') in
  its name does not work
 
 
  Hi,
 
  I can confirm this behaviour with the trailing /*.
 
  If you POST to http://localhost:8080/sling-logo.png/;
  -- note the
  trailing slash without an astersik ! -- your actually
  get

[jira] Created: (SLING-1723) jQuery JCR Explorer - step 2

2010-09-02 Thread Clemens Wyss (JIRA)
jQuery JCR Explorer - step 2


 Key: SLING-1723
 URL: https://issues.apache.org/jira/browse/SLING-1723
 Project: Sling
  Issue Type: New Feature
  Components: Extensions
Reporter: Clemens Wyss
Assignee: Clemens Wyss
Priority: Minor


+ switch between JCR and resource view on the repo
+ choose/change workspace
+ reference support
+ import/export subtrees
+ nt:file - file upload

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



jcr:mixinTypes property cannot be casted to a javax.jcr.Property

2010-08-31 Thread Clemens Wyss
in the jQuery JCR explorer I iterate over the properties of a resource
making use of org.apache.sling.api.resource.PersistableValueMap. I.e.
var properties = 
resource.adaptTo(Packages.org.apache.sling.api.resource.PersistableValueMap);

I then try to cast the property to javax.jcr.Property,

var property = properties.get( id, Packages.javax.jcr.Property );

Now when I browse through /jcr:system/jcr:nodeTypes
(e.g./jcr:system/jcr:nodeTypes/nt:folder) the property
jcr:mixinTypes fails to cast. In these cases I fall back to the
string representation of the property. In case of
/jcr:system/jcr:nodeTypes/nt:folder I get something like:

[Ljava.lang.Object;@dbd726

BUT I would expect jcr:mixinTypes to be a multivalued Name property?
Hence it should cast properly to Property.

Also noticeable:
I have no problems with the jcr:supertypes property, which is also
 a multivalued Name property.


RE: mixinTypes property cannot be casted to a javax.jcr.Property

2010-08-31 Thread Clemens Wyss
looks like in these cases the property jcr:mixinTypes exists, BUT
it is empty, hence
 JcrPropertyMap#convertToType(final CacheEntry entry, ClassT type)
returns null (instead of the multivalued Property).
Whether this is correct or not is open to discussion...

 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Tuesday, August 31, 2010 10:38 AM
 To: 'dev@sling.apache.org'
 Subject: jcr:mixinTypes property cannot be casted to a
 javax.jcr.Property


 in the jQuery JCR explorer I iterate over the properties of a resource
 making use of org.apache.sling.api.resource.PersistableValueMap. I.e.
 var properties =
 resource.adaptTo(Packages.org.apache.sling.api.resource.Persis
 tableValueMap);

 I then try to cast the property to javax.jcr.Property,

 var property = properties.get( id, Packages.javax.jcr.Property );

 Now when I browse through /jcr:system/jcr:nodeTypes
 (e.g./jcr:system/jcr:nodeTypes/nt:folder) the property
 jcr:mixinTypes fails to cast. In these cases I fall back to the
 string representation of the property. In case of
 /jcr:system/jcr:nodeTypes/nt:folder I get something like:

 [Ljava.lang.Object;@dbd726

 BUT I would expect jcr:mixinTypes to be a multivalued Name property?
 Hence it should cast properly to Property.

 Also noticeable:
 I have no problems with the jcr:supertypes property, which is also
  a multivalued Name property.



[jira] Commented: (SLING-1603) SlingServlet service

2010-08-31 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12904934#action_12904934
 ] 

Clemens Wyss commented on SLING-1603:
-

I guess Engine is implemented with the strategy pattern in mind? Strategies for 
request processing? 
If so, I would call the interface Engine more appropriately 
RequestProcessing, or RequestProcessor and hence EngineImpl would become 
SlingRequestProcessing or SlingRequestProcessor. #processRequest could then 
become #process. 
As this is only a naming-issue it's not really that important... :-)

 SlingServlet service
 

 Key: SLING-1603
 URL: https://issues.apache.org/jira/browse/SLING-1603
 Project: Sling
  Issue Type: Improvement
  Components: Engine
Affects Versions: Engine 2.0.6
Reporter: Bertrand Delacretaz
Assignee: Bertrand Delacretaz
Priority: Minor
 Attachments: SLING-1603-fmeschbe.patch, SLING-1603.patch, 
 SLING-1603.patch


 For SLING-550 I need to call the SlingMainServlet outside of the web 
 container's request/response cycle.
 I'll attach a patch that introduces a new SlingServlet interface that 
 SlingMainServlet implements.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Howto determine whether the user is authenticated/logged in

2010-08-30 Thread Clemens Wyss - MySign AG
what is the appropriate way to determine whether a user is authenticated/logged 
in? Anything more explicit than
!request.resourceResolver.getUserID().equals(anonymous)
?

How about on the client side (javascript)? Anything else than
anonymous != Sling.getSessionInfo.userID
?


RE: Howto determine whether the user is authenticated/logged in

2010-08-30 Thread Clemens Wyss
 I also
 recently thought about extending this servlet by adding
 another property
 authType which is fed with the value of the
 HttpServletRequest.getAuthType() method.
you would extend SessionInfoProvider?
+1, authType is session related and, as you mentioned,
more stable than 'anonymous != Sling.getSessionInfo.userID'
Also, I could use it right now in the jQuery JCR Explorer ;-)

 -Original Message-
 From: Felix Meschberger [mailto:fmesc...@gmail.com]
 Sent: Monday, August 30, 2010 2:29 PM
 To: dev@sling.apache.org
 Subject: Re: Howto determine whether the user is
 authenticated/logged in


 Hi,

 On 30.08.2010 14:05, Clemens Wyss - MySign AG wrote:
  what is the appropriate way to determine whether a user is
 authenticated/logged in? Anything more explicit than
  !request.resourceResolver.getUserID().equals(anonymous)
  ?

 On the server side, the correct thing is to check the value of the
 HttpServletRequest.getAuthType() method. If this method returns null,
 the request is not authenticated.

 Checking for the anonymous user id is not stable for two reasons: A
 user may have authenticated as the anonymous user or the
 user used for
 unauthenticated request is not necessairily called anonymous.

 
  How about on the client side (javascript)? Anything else than
  anonymous != Sling.getSessionInfo.userID
  ?

 The client currently is a problem, because the Sling session
 information
 servlet is incomplete and does not have this information. I also
 recently thought about extending this servlet by adding
 another property
 authType which is fed with the value of the
 HttpServletRequest.getAuthType() method.

 WDYT ?

 Regards
 Felix



[jira] Updated: (SLING-1671) New features for jQuery JCR Explorer - step 1

2010-08-27 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss updated SLING-1671:


Attachment: sling-1671-clemens.patch

as promised an initial commit of the jQuery JCR Explorer. More to come.
Build/installation instructions remain the same:
1) build the plugin 
mvn package
2) install the plugin
3) http://localhost:8080/.explorer.html
4) Login
browse the repo, add/modify nodes/properties, Query the repo

 New features for jQuery JCR Explorer - step 1
 -

 Key: SLING-1671
 URL: https://issues.apache.org/jira/browse/SLING-1671
 Project: Sling
  Issue Type: New Feature
  Components: Extensions
Reporter: Clemens Wyss
Assignee: Clemens Wyss
Priority: Minor
 Attachments: sling-1671-clemens.patch


 + property (type) specific editors (e.g. date, boolean)
 + search (SQL2, JQDOM, sql and xpath)
 + optimized tree (navigation)
 + pluggable resource/node editors

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1671) New features for jQuery JCR Explorer - step 1

2010-08-27 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12903403#action_12903403
 ] 

Clemens Wyss commented on SLING-1671:
-

regarding the pluggable resource/node editors:
within the /libs/sling/servlet/default/explorer/edit folder you can place 
custom esp's to override the default editor for specific sling:resourceTypes. 
As an example I placed the sling_redirect.esp in there, which handles nodes of 
sling:resourceType == 'sling:redirect', such as the root-node/folder.

This feature/behavior is of course (and not only, I guess ;-) ) to be 
discussed


 New features for jQuery JCR Explorer - step 1
 -

 Key: SLING-1671
 URL: https://issues.apache.org/jira/browse/SLING-1671
 Project: Sling
  Issue Type: New Feature
  Components: Extensions
Reporter: Clemens Wyss
Assignee: Clemens Wyss
Priority: Minor
 Attachments: sling-1671-clemens.patch


 + property (type) specific editors (e.g. date, boolean)
 + search (SQL2, JQDOM, sql and xpath)
 + optimized tree (navigation)
 + pluggable resource/node editors

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



RE: [jira] Commented: (SLING-1671) New features for jQuery JCR Explorer - step 1

2010-08-27 Thread Clemens Wyss
without any change from my side your proposed use case, which makes sense, 
works, as well:
Hence, instead of placing the custom editors into 
/libs/sling/servlet/default/explorer/edit you can, no would, place them into 
/apps/sling/servlet/default/explorer/edit

 -Original Message-
 From: Felix Meschberger [mailto:fmesc...@gmail.com]
 Sent: Friday, August 27, 2010 3:54 PM
 To: dev@sling.apache.org
 Subject: Re: [jira] Commented: (SLING-1671) New features for
 jQuery JCR
 Explorer - step 1


 Hi,

 On 27.08.2010 15:29, Clemens Wyss (JIRA) wrote:
 
  [
 https://issues.apache.org/jira/browse/SLING-1671?page=com.atla
ssian.jira.plugin.system.issuetabpanels:comment- 
tabpanelfocusedCommentId=12903403#action_12903403 ]
 
  Clemens Wyss commented on SLING-1671:
  -
 
  regarding the pluggable resource/node editors:
  within the /libs/sling/servlet/default/explorer/edit folder
 you can place custom esp's to override the default editor for
 specific sling:resourceTypes. As an example I placed the
 sling_redirect.esp in there, which handles nodes of
 sling:resourceType == 'sling:redirect', such as the root-node/folder.
 
  This feature/behavior is of course (and not only, I guess
 ;-) ) to be discussed

 I like this feature ! +100 as we say ;-)

 Yet, the intention of the separation of /apps and /libs is
 (at least in
 our case at Day) that we (Day) provide stuff in /libs while customers
 and partners provide extensions/overwrites in /apps.

 Now from the POV of Sling, I would assume that we (Sling) provide
 defaults below /libs and users of Sling (people implementing
 applications with Sling) will add extensions in the /apps area.

 My question: Is such functionality supported by your code ?
 Or can it be
 added ?

 For example the ResourceResolver.getResource(String) method
 will use the
 search path (ResourceResolver.getSearchPath()) to resolve
 relative paths.

 Regards
 Felix

 
 
  New features for jQuery JCR Explorer - step 1
  -
 
  Key: SLING-1671
  URL:
 https://issues.apache.org/jira/browse/SLING-1671
  Project: Sling
   Issue Type: New Feature
   Components: Extensions
 Reporter: Clemens Wyss
 Assignee: Clemens Wyss
 Priority: Minor
  Attachments: sling-1671-clemens.patch
 
 
  + property (type) specific editors (e.g. date, boolean)
  + search (SQL2, JQDOM, sql and xpath)
  + optimized tree (navigation)
  + pluggable resource/node editors
 



RE: [jira] Commented: (SLING-1671) New features for jQuery JCR Explorer - step 1

2010-08-27 Thread Clemens Wyss
when I try to access (i.e. get the subnodes) a file named _sling_redirect.esp I 
get the follwoing response:

!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
html
head
title404 No resource found/title
/head
body
h1No resource found (404)/h1
pThe requested URL 
/libs/sling/servlet/default/explorer/edit/_sling_redirect.esp.explorer.item.html
 resulted in an error in 
org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet./p
h3Request Progress:/h3
pre
  0 (2010-08-27 19:24:50) TIMER_START{Request Processing}
  0 (2010-08-27 19:24:50) COMMENT timer_end format is {lt;elapsed 
msecgt;,lt;timer namegt;} lt;optional messagegt;
  0 (2010-08-27 19:24:50) LOG Method=GET, 
PathInfo=/libs/sling/servlet/default/explorer/edit/_sling_redirect.esp.explorer.item.html
  0 (2010-08-27 19:24:50) TIMER_START{ResourceResolution}
 16 (2010-08-27 19:24:50) TIMER_END{16,ResourceResolution} 
URI=/libs/sling/servlet/default/explorer/edit/_sling_redirect.esp.explorer.item.html
 resolves to Resource=NonExistingResource, 
path=/libs/sling/servlet/default/explorer/edit/sling:redirect.esp.explorer.item.html
 16 (2010-08-27 19:24:50) LOG Resource Path Info: SlingRequestPathInfo: 
path='/libs/sling/servlet/default/explorer/edit/sling:redirect.esp.explorer.item.html',
 selectorString='esp.explorer.item', extension='html', suffix='null'
 16 (2010-08-27 19:24:50) TIMER_START{ServletResolution}
 16 (2010-08-27 19:24:50) TIMER_START{resolveServlet(NonExistingResource, 
path=/libs/sling/servlet/default/explorer/edit/sling:redirect.esp.explorer.item.html)}
 16 (2010-08-27 19:24:50) TIMER_END{0,resolveServlet(NonExistingResource, 
path=/libs/sling/servlet/default/explorer/edit/sling:redirect.esp.explorer.item.html)}
 Using servlet org.apache.sling.servlets.get.DefaultGetServlet
 16 (2010-08-27 19:24:50) TIMER_END{0,ServletResolution} 
URI=/libs/sling/servlet/default/explorer/edit/_sling_redirect.esp.explorer.item.html
 handled by Servlet=org.apache.sling.servlets.get.DefaultGetServlet
 16 (2010-08-27 19:24:50) LOG Applying request filters
 16 (2010-08-27 19:24:50) LOG Calling filter: 
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
 16 (2010-08-27 19:24:50) 
TIMER_START{org.apache.sling.servlets.get.DefaultGetServlet#0}
 16 (2010-08-27 19:24:50) 
TIMER_END{0,org.apache.sling.servlets.get.DefaultGetServlet#0}
 16 (2010-08-27 19:24:50) TIMER_START{handleError:status=404}
 16 (2010-08-27 19:24:50) TIMER_END{0,handleError:status=404} Using handler 
org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet
 16 (2010-08-27 19:24:50) TIMER_END{16,Request Processing} Dumping 
SlingRequestProgressTracker Entries
/pre
hr
addressApacheSling/2.0 (Java HotSpot(TM) Client VM 1.6.0_17; Windows XP 5.1 
x86)/address
/body
/html
--
what is happening? How come
'URI=/libs/sling/servlet/default/explorer/edit/_sling_redirect.esp.explorer.item.html
 resolves to
Resource=NonExistingResource, 
path=/libs/sling/servlet/default/explorer/edit/sling:redirect.esp.explorer.item.html'
?

 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Friday, August 27, 2010 6:40 PM
 To: 'dev@sling.apache.org'
 Subject: RE: [jira] Commented: (SLING-1671) New features for
 jQuery JCR
 Explorer - step 1


 without any change from my side your proposed use case, which
 makes sense, works, as well:
 Hence, instead of placing the custom editors into
 /libs/sling/servlet/default/explorer/edit you can, no would,
 place them into /apps/sling/servlet/default/explorer/edit

  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Friday, August 27, 2010 3:54 PM
  To: dev@sling.apache.org
  Subject: Re: [jira] Commented: (SLING-1671) New features for
  jQuery JCR
  Explorer - step 1
 
 
  Hi,
 
  On 27.08.2010 15:29, Clemens Wyss (JIRA) wrote:
  
   [
  https://issues.apache.org/jira/browse/SLING-1671?page=com.atla
 ssian.jira.plugin.system.issuetabpanels:comment-
 tabpanelfocusedCommentId=12903403#action_12903403 ]
  
   Clemens Wyss commented on SLING-1671:
   -
  
   regarding the pluggable resource/node editors:
   within the /libs/sling/servlet/default/explorer/edit folder
  you can place custom esp's to override the default editor for
  specific sling:resourceTypes. As an example I placed the
  sling_redirect.esp in there, which handles nodes of
  sling:resourceType == 'sling:redirect', such as the
 root-node/folder.
  
   This feature/behavior is of course (and not only, I guess
  ;-) ) to be discussed
 
  I like this feature ! +100 as we say ;-)
 
  Yet, the intention of the separation of /apps and /libs is
  (at least in
  our case at Day) that we (Day) provide stuff in /libs while
 customers
  and partners provide extensions/overwrites in /apps.
 
  Now from the POV of Sling, I would assume

[jira] Updated: (SLING-1671) New features for jQuery JCR Explorer - step 1

2010-08-26 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss updated SLING-1671:


Description: 
+ property (type) specific editors (e.g. date, boolean)
+ search (SQL2, JQDOM, sql and xpath)
+ optimized tree (navigation)
+ pluggable resource/node editors


  was:
+ property (type) specific editors (e.g. date, boolean)
+ search (SQL2, JQOM, sql and xpath)
+ optimized tree (navigation)
+ pluggable resource/node editors



 New features for jQuery JCR Explorer - step 1
 -

 Key: SLING-1671
 URL: https://issues.apache.org/jira/browse/SLING-1671
 Project: Sling
  Issue Type: New Feature
  Components: Extensions
Reporter: Clemens Wyss
Priority: Minor

 + property (type) specific editors (e.g. date, boolean)
 + search (SQL2, JQDOM, sql and xpath)
 + optimized tree (navigation)
 + pluggable resource/node editors

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1671) New features for jQuery JCR Explorer - step 1

2010-08-26 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12902825#action_12902825
 ] 

Clemens Wyss commented on SLING-1671:
-

btw, I am the Assignee ;-) but can't assign myself...

 New features for jQuery JCR Explorer - step 1
 -

 Key: SLING-1671
 URL: https://issues.apache.org/jira/browse/SLING-1671
 Project: Sling
  Issue Type: New Feature
  Components: Extensions
Reporter: Clemens Wyss
Priority: Minor

 + property (type) specific editors (e.g. date, boolean)
 + search (SQL2, JQDOM, sql and xpath)
 + optimized tree (navigation)
 + pluggable resource/node editors

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1671) New features for jQuery JCR Explorer - step 1

2010-08-26 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12902824#action_12902824
 ] 

Clemens Wyss commented on SLING-1671:
-

we intend to release an initial version this afternoon, or tomorrow

 New features for jQuery JCR Explorer - step 1
 -

 Key: SLING-1671
 URL: https://issues.apache.org/jira/browse/SLING-1671
 Project: Sling
  Issue Type: New Feature
  Components: Extensions
Reporter: Clemens Wyss
Priority: Minor

 + property (type) specific editors (e.g. date, boolean)
 + search (SQL2, JQDOM, sql and xpath)
 + optimized tree (navigation)
 + pluggable resource/node editors

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Assigned: (SLING-1671) New features for jQuery JCR Explorer - step 1

2010-08-26 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss reassigned SLING-1671:
---

Assignee: Clemens Wyss

 New features for jQuery JCR Explorer - step 1
 -

 Key: SLING-1671
 URL: https://issues.apache.org/jira/browse/SLING-1671
 Project: Sling
  Issue Type: New Feature
  Components: Extensions
Reporter: Clemens Wyss
Assignee: Clemens Wyss
Priority: Minor

 + property (type) specific editors (e.g. date, boolean)
 + search (SQL2, JQDOM, sql and xpath)
 + optimized tree (navigation)
 + pluggable resource/node editors

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



RE: WebDAV

2010-08-23 Thread Clemens Wyss
We intend to implement this feature into the jQuery Explorer, i.e. being able 
to switch between JCR-View and Sling/Resource-View. In the end WebDAV only 
makes sense for folders/files, whereas the explorer is more generic...

 -Original Message-
 From: Ian Boston [mailto:ianbos...@gmail.com]on Behalf Of Ian Boston
 Sent: Monday, August 23, 2010 3:12 PM
 To: dev@sling.apache.org
 Subject: Re: WebDAV


 Looks very interesting, and might solve some of the problems
 we have been having caused by pooled content that has no structure.

 Presumably the webdav is writable and will present anything
 that is resolvable.

 Any idea how it copes with non listable parent resources?
 (listChildren returns an empty list)

 Ian


 On 23 Aug 2010, at 13:58, Felix Meschberger wrote:

  Hi all
 
  I stumbled upon a nice library to create WebDAV servers [1]
 and set out
  to create a simple WebDAV server to serve the Sling resource tree
  (everything available through the ResourceResovler) over WebDAV in a
  filesystem-like structure to enable file system mapping.
 
  In a sense it is comparable to the jcr/webdav bundle but
 exposing the
  whole resource tree instead of just the repository. In
 fact, resources
  registered using the Filesystem provider are even exposed
 as read/write.
 
  Currently this stuff is in my whitebox [2] for you to play
 around with.
  Wenn deployed the WebDAV server is at /milton (e.g.
  http//localhost:/milton).
 
  WDYT ? Would such a thing make sense in Sling 6 (or Sling 7) ?
 
  Regards
  Felix
 
  [1] http://milton.ettrema.com/index.html
  [2] http://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/milton




RE: WebDAV

2010-08-23 Thread Clemens Wyss
 They are complements not concurrents ;-)
+100 :-)

 -Original Message-
 From: Felix Meschberger [mailto:fmesc...@gmail.com]
 Sent: Monday, August 23, 2010 3:25 PM
 To: dev@sling.apache.org
 Subject: Re: WebDAV


 Hi,

 On 23.08.2010 15:17, Clemens Wyss wrote:
  We intend to implement this feature into the jQuery
 Explorer, i.e. being able to switch between JCR-View and
 Sling/Resource-View. In the end WebDAV only makes sense for
 folders/files, whereas the explorer is more generic...

 They are complements not concurrents ;-)

 Having a switch in the explorer is interesting, indeed.

 Regards
 Felix

 
  -Original Message-
  From: Ian Boston [mailto:ianbos...@gmail.com]on Behalf Of
 Ian Boston
  Sent: Monday, August 23, 2010 3:12 PM
  To: dev@sling.apache.org
  Subject: Re: WebDAV
 
 
  Looks very interesting, and might solve some of the problems
  we have been having caused by pooled content that has no structure.
 
  Presumably the webdav is writable and will present anything
  that is resolvable.
 
  Any idea how it copes with non listable parent resources?
  (listChildren returns an empty list)
 
  Ian
 
 
  On 23 Aug 2010, at 13:58, Felix Meschberger wrote:
 
  Hi all
 
  I stumbled upon a nice library to create WebDAV servers [1]
  and set out
  to create a simple WebDAV server to serve the Sling resource tree
  (everything available through the ResourceResovler) over
 WebDAV in a
  filesystem-like structure to enable file system mapping.
 
  In a sense it is comparable to the jcr/webdav bundle but
  exposing the
  whole resource tree instead of just the repository. In
  fact, resources
  registered using the Filesystem provider are even exposed
  as read/write.
 
  Currently this stuff is in my whitebox [2] for you to play
  around with.
  Wenn deployed the WebDAV server is at /milton (e.g.
  http//localhost:/milton).
 
  WDYT ? Would such a thing make sense in Sling 6 (or Sling 7) ?
 
  Regards
  Felix
 
  [1] http://milton.ettrema.com/index.html
  [2]
 http://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/milton
 
 
 



[jira] Created: (SLING-1680) FsResourceProvider takes VERY long to register/unregister AND finally throws an OutOfMemoryError

2010-08-23 Thread Clemens Wyss (JIRA)
FsResourceProvider takes VERY long to register/unregister AND finally throws an 
OutOfMemoryError


 Key: SLING-1680
 URL: https://issues.apache.org/jira/browse/SLING-1680
 Project: Sling
  Issue Type: Bug
  Components: JCR
 Environment: WinXP, latest-greatest Sling (from trunk)
Reporter: Clemens Wyss


Given the Sling Web Console
When I configure an instance of the filesystem resource provider in terms of 
provider root and filesystem location, e.g.:
Provider root: /tmp
Filesystem Root: c:/tmp

it takes very long to handle the request an finally ends in an OutOfMemoryError:

23.08.2010 15:56:08.446 *ERROR* [FelixStartLevel] org.apache.sling.fsresource 
[org.apache.sling.fsprovider.internal.FsResourceProvider] The activate method 
has thrown an exception (java.lang.OutOfMemoryError: Java heap space) 
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at 
java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at 
java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)
at java.lang.StringBuilder.append(StringBuilder.java:203)
at 
org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:253)
at 
org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
at 
org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
at 
org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
at 
org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
at 
org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
at 
org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
at 
org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
at 
org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
at 
org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
at 
org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
at 
org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
at 
org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
at 
org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
at 
org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
at 
org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
at 
org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
at 
org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
at 
org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
at 
org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
at 
org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
at 
org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
at 
org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
at 
org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
at 
org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
at 
org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
at 
org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
at 
org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
23.08.2010 15:56:08.446 *ERROR* [FelixStartLevel] org.apache.sling.fsresource 
[org.apache.sling.fsprovider.internal.FsResourceProvider] Failed creating the 
component instance; see log for reason
23.08.2010 15:56:08.446 *ERROR* [FelixDispatchQueue] org.apache.sling.fsresource
 FrameworkEvent ERROR (org.osgi.framework.ServiceException: Service factory 
returned null.) org.osgi.framework.ServiceException: Service factory returned 
null.
at 
org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:340)
at 
org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:221)
at 
org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:295)
at org.apache.felix.framework.Felix.getService(Felix.java:3007)
at 
org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:329)
at 
org.osgi.util.tracker.ServiceTracker.addingService

[jira] Commented: (SLING-1680) FsResourceProvider takes VERY long to register/unregister AND finally throws an OutOfMemoryError

2010-08-23 Thread Clemens Wyss (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12901417#action_12901417
 ] 

Clemens Wyss commented on SLING-1680:
-

I can confirm that c:/ tmp is very deep and has many, many files( 
100'000)/folders(40'000 ) ;-)
I guess this bug/issue, being not a real world use case, can be ignored?

 FsResourceProvider takes VERY long to register/unregister AND finally throws 
 an OutOfMemoryError
 

 Key: SLING-1680
 URL: https://issues.apache.org/jira/browse/SLING-1680
 Project: Sling
  Issue Type: Bug
  Components: JCR
 Environment: WinXP, latest-greatest Sling (from trunk)
Reporter: Clemens Wyss

 Given the Sling Web Console
 When I configure an instance of the filesystem resource provider in terms of 
 provider root and filesystem location, e.g.:
 Provider root: /tmp
 Filesystem Root: c:/tmp
 it takes very long to handle the request an finally ends in an 
 OutOfMemoryError:
 23.08.2010 15:56:08.446 *ERROR* [FelixStartLevel] org.apache.sling.fsresource 
 [org.apache.sling.fsprovider.internal.FsResourceProvider] The activate method 
 has thrown an exception (java.lang.OutOfMemoryError: Java heap space) 
 java.lang.OutOfMemoryError: Java heap space
 at java.util.Arrays.copyOf(Arrays.java:2882)
 at 
 java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
 at 
 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)
 at java.lang.StringBuilder.append(StringBuilder.java:203)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:253)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.createStatus(FileMonitor.java:219)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor.access$000(FileMonitor.java:36)
 at 
 org.apache.sling.fsprovider.internal.FileMonitor$DirStatus.init(FileMonitor.java:255)
 23.08.2010 15:56:08.446 *ERROR* [FelixStartLevel] org.apache.sling.fsresource 
 [org.apache.sling.fsprovider.internal.FsResourceProvider] Failed creating the 
 component instance; see log for reason
 23.08.2010 15:56:08.446 *ERROR* [FelixDispatchQueue] 
 org.apache.sling.fsresource
  FrameworkEvent ERROR (org.osgi.framework.ServiceException: Service factory 
 returned null.) org.osgi.framework.ServiceException: Service factory returned 
 null

RE: [DISCUSS] Correct listing of resource children (follow up to SLING-1672)

2010-08-23 Thread Clemens Wyss
I can confirm that case 1) does work.

 If a ResourceProvider has a root of
 /foo/bar, then it
 shouldn't be expected to return resources for anything not
 starting with /foo/bar.
agree, but in case of listChildren on any path/node/resource we could consult 
all resource providers (which correspond to/include this path) and concat all 
children. Hence we might even end up with same-named-siblings coming from 
different resource providers

 -Original Message-
 From: Justin Edelson [mailto:justinedel...@gmail.com]
 Sent: Monday, August 23, 2010 6:20 PM
 To: dev@sling.apache.org
 Subject: Re: [DISCUSS] Correct listing of resource children (follow up
 to SLING-1672)


 Case 1 should be working in trunk now. What's the
 Sling-Bundle-Resources header look like?

 In terms of case 2, if this was to be implemented, I don't think it
 should be up to the ResourceProvider implementation to create the
 SyntheticResource. If a ResourceProvider has a root of
 /foo/bar, then it
 shouldn't be expected to return resources for anything not
 starting with
 /foo/bar.

 Even though this is easy to workaround, if we're serious about
 supporting WebDAV over the resource tree, supporting this is probably
 necessary.

 Justin

 On 8/23/10 4:17 AM, Mike Müller wrote:
  Hi
 
  When getting a resource the case seems to be clear:
  The first resource provider which returns a resource
  *wins*. And the resource providers are called in order
  starting with the provider which is registered for the
  longest part of the requested path.
  With ResourceResolver#listChildren it's a bit trickier.
  Assume the following:
 
  structure in the JCR:
 
  /foo
  /foo/bar
  /foo/bar/test
 
  and in another resource provider:
 
  /foo/bar
  /foo/bar/myresource
 
  case 1)
  ResourceResolver#listChildren( /foo/bar ) should now
  list the following
 
  test
  myresource
 
  case 2)
  Assume another provider:
  /some/path/resource
  /some/path/resource2
 
  What should ResourceResolver#listChildren( / ) list?
  From my understanding it should list:
 
  foo
  some
 
  where may be a SyntheticResource.
 
  case 1) and case 2) are not returning the expected result, at least
  not if you use a bundle resource provider. I haven't looked into the
  details so I can't say if it's a problem of the bundle resource
  provider or a more general problem with the resource resolver
  implementation.
 
  Maybe security could be a problem. But a resource provider at least
  can access the user id via ResourceResolver#getUserID, and
 list children
  only if access is allowed. I don't know if this behavour of a
  resource provider is intended.
 
  WDYT?
 
  best regards
  mike




RE: [DISCUSS] Correct listing of resource children (follow up to SLING-1672)

2010-08-23 Thread Clemens Wyss
 I can confirm that case 1) does work.
...at least for FsResourceProvider resources, but not for 
BundleResourceProvider resources :-(
Mixing jcr resources with bundle resources still doesn't work as expected.

Having:
 Sling-Bundle-Resources
   
 /res/sling/explorer;overwrite:=true;uninstall=true;path:=/libs/sling/explorer
 /Sling-Bundle-Resources
and then creating the res/sling/explorer jcr structure (through WebDAV for 
example) only enlists the jcr tree but not the mixed in bundle resources

 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Monday, August 23, 2010 7:56 PM
 To: 'dev@sling.apache.org'; 'jus...@justinedelson.com'
 Subject: RE: [DISCUSS] Correct listing of resource children (follow up
 to SLING-1672)


 I can confirm that case 1) does work.

  If a ResourceProvider has a root of
  /foo/bar, then it
  shouldn't be expected to return resources for anything not
  starting with /foo/bar.
 agree, but in case of listChildren on any
 path/node/resource we could consult all resource providers
 (which correspond to/include this path) and concat all
 children. Hence we might even end up with same-named-siblings
 coming from different resource providers

  -Original Message-
  From: Justin Edelson [mailto:justinedel...@gmail.com]
  Sent: Monday, August 23, 2010 6:20 PM
  To: dev@sling.apache.org
  Subject: Re: [DISCUSS] Correct listing of resource children
 (follow up
  to SLING-1672)
 
 
  Case 1 should be working in trunk now. What's the
  Sling-Bundle-Resources header look like?
 
  In terms of case 2, if this was to be implemented, I don't think it
  should be up to the ResourceProvider implementation to create the
  SyntheticResource. If a ResourceProvider has a root of
  /foo/bar, then it
  shouldn't be expected to return resources for anything not
  starting with
  /foo/bar.
 
  Even though this is easy to workaround, if we're serious about
  supporting WebDAV over the resource tree, supporting this
 is probably
  necessary.
 
  Justin
 
  On 8/23/10 4:17 AM, Mike Müller wrote:
   Hi
  
   When getting a resource the case seems to be clear:
   The first resource provider which returns a resource
   *wins*. And the resource providers are called in order
   starting with the provider which is registered for the
   longest part of the requested path.
   With ResourceResolver#listChildren it's a bit trickier.
   Assume the following:
  
   structure in the JCR:
  
   /foo
   /foo/bar
   /foo/bar/test
  
   and in another resource provider:
  
   /foo/bar
   /foo/bar/myresource
  
   case 1)
   ResourceResolver#listChildren( /foo/bar ) should now
   list the following
  
   test
   myresource
  
   case 2)
   Assume another provider:
   /some/path/resource
   /some/path/resource2
  
   What should ResourceResolver#listChildren( / ) list?
   From my understanding it should list:
  
   foo
   some
  
   where may be a SyntheticResource.
  
   case 1) and case 2) are not returning the expected
 result, at least
   not if you use a bundle resource provider. I haven't
 looked into the
   details so I can't say if it's a problem of the bundle resource
   provider or a more general problem with the resource resolver
   implementation.
  
   Maybe security could be a problem. But a resource
 provider at least
   can access the user id via ResourceResolver#getUserID, and
  list children
   only if access is allowed. I don't know if this behavour of a
   resource provider is intended.
  
   WDYT?
  
   best regards
   mike
 
 



RE: resource.resourceResolver.listChildren only lists jcr nodes?

2010-08-20 Thread Clemens Wyss
there is a typo in the subject, should be:
'request.resourceResolver.listChildren only lists jcr nodes?'

 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Friday, August 20, 2010 11:20 AM
 To: 'dev@sling.apache.org'
 Subject: resource.resourceResolver.listChildren only lists jcr nodes?


 in my esp-script I have the follwoing line:

 var childResources = request.resourceResolver.listChildren(
 resource );

 To me (having explicitly definde bundle resources) it looks
 as if this only lists jcr nodes but not all resources.
 Is this yet another esp limitation (of the wrapper behind
 'resource'), or does listChildren really only return jcr nodes?

 Asked the other way round:
 given a path, how do I enlist (in esp) all resources below that path?



[jira] Created: (SLING-1671) New features for jQuery JCR Explorer - step 1

2010-08-20 Thread Clemens Wyss (JIRA)
New features for jQuery JCR Explorer - step 1
-

 Key: SLING-1671
 URL: https://issues.apache.org/jira/browse/SLING-1671
 Project: Sling
  Issue Type: New Feature
  Components: Extensions
Reporter: Clemens Wyss
Priority: Minor


+ property (type) specific editors (e.g. date, boolean)
+ search (SQL2, JQOM, sql and xpath)
+ optimized tree (navigation)
+ pluggable resource/node editors


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



RE: resource.resourceResolver.listChildren only lists jcr nodes?

2010-08-20 Thread Clemens Wyss
in my pom.xml I have:
Sling-Bundle-Resources

/res/sling/explorer;overwrite:=true;uninstall=true;path:=/libs/sling/explorer
/Sling-Bundle-Resources

i.e. I map /res/sling/explorer to /libs/sling/explorer. And I can directly 
access the files beneath /res/sling/explorer, e.g. 
http://localhost:8080/res/sling/explorer/css/explorer.css

now when I enlist on the root (/) I don't see 'res'? Should or shouldn't I?

 -Original Message-
 From: Felix Meschberger [mailto:fmesc...@gmail.com]
 Sent: Friday, August 20, 2010 11:31 AM
 To: dev@sling.apache.org
 Subject: Re: resource.resourceResolver.listChildren only lists jcr
 nodes?


 Hi,

 No, the listChildren method is implemented to return all
 child resources
 in the Resource tree, not only JCR nodes.

 And no, the ResourceResolver is not specifically wrapped.

 Regards
 Felix

 On 20.08.2010 11:20, Clemens Wyss wrote:
  in my esp-script I have the follwoing line:
 
  var childResources = request.resourceResolver.listChildren(
 resource );
 
  To me (having explicitly definde bundle resources) it looks
 as if this only lists jcr nodes but not all resources.
  Is this yet another esp limitation (of the wrapper behind
 'resource'), or does listChildren really only return jcr nodes?
 
  Asked the other way round:
  given a path, how do I enlist (in esp) all resources below
 that path?



RE: resource.resourceResolver.listChildren only lists jcr nodes?

2010-08-20 Thread Clemens Wyss
 Hmm, this looks like a strane setup.
no wonder, it's from me ;-) Basically I just wanted a bundle resource (to test 
with) and I thought this was simplest way to get one.

 This header setup is for initial
 content not for bundle resources
the overwrite/uninstall args or the path-redirection?
Again: resolving seems to work, but not enlisting.

 This might be a bug in the bundle resource provider.
have you got enough info's to track this down?

 -Original Message-
 From: Felix Meschberger [mailto:fmesc...@gmail.com]
 Sent: Friday, August 20, 2010 1:36 PM
 To: dev@sling.apache.org
 Subject: Re: resource.resourceResolver.listChildren only lists jcr
 nodes?


 Hi,


 On 20.08.2010 11:54, Clemens Wyss wrote:
  in my pom.xml I have:
  Sling-Bundle-Resources
 
 /res/sling/explorer;overwrite:=true;uninstall=true;path:=/libs
 /sling/explorer

 Hmm, this looks like a strane setup. This header setup is for initial
 content not for bundle resources.

 But yes, you are right, you should be able to see the /res resource
 (synthetic) and then /res/sling, /res/sling/explorer and
 everything below.

 This might be a bug in the bundle resource provider.

 Regards
 Felix

  /Sling-Bundle-Resources
 
  i.e. I map /res/sling/explorer to /libs/sling/explorer. And
 I can directly access the files beneath /res/sling/explorer,
 e.g. http://localhost:8080/res/sling/explorer/css/explorer.css
 
  now when I enlist on the root (/) I don't see 'res'? Should
 or shouldn't I?
 
  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Friday, August 20, 2010 11:31 AM
  To: dev@sling.apache.org
  Subject: Re: resource.resourceResolver.listChildren only lists jcr
  nodes?
 
 
  Hi,
 
  No, the listChildren method is implemented to return all
  child resources
  in the Resource tree, not only JCR nodes.
 
  And no, the ResourceResolver is not specifically wrapped.
 
  Regards
  Felix
 
  On 20.08.2010 11:20, Clemens Wyss wrote:
  in my esp-script I have the follwoing line:
 
  var childResources = request.resourceResolver.listChildren(
  resource );
 
  To me (having explicitly definde bundle resources) it looks
  as if this only lists jcr nodes but not all resources.
  Is this yet another esp limitation (of the wrapper behind
  'resource'), or does listChildren really only return jcr nodes?
 
  Asked the other way round:
  given a path, how do I enlist (in esp) all resources below
  that path?
 



Why does currentNode.getNodes() not return a NodeIterator?

2010-08-19 Thread Clemens Wyss
my esp script starts as follows:
if (currentNode)
{
  var nodes = currentNode.getNodes( );

  var size = nodes.getSize();
...

I keep getting:
Uncaught SlingException org.mozilla.javascript.EcmaError: TypeError: getSize is 
not a function, it is org.mozilla.javascript.Undefined

what am I missing? I know I shouldn't be usign currentNode at all, but after 
all currentNode is not null and the doc says that getNodes() always returns a 
NodeIterator...


RE: Why does currentNode.getNodes() not return a NodeIterator?

2010-08-19 Thread Clemens Wyss
you say getNodes() returns properties?

AND currentNode doesn't provide its child nodes?

Is currentNode at all an instance of javax.jcr.Node?

 -Original Message-
 From: Felix Meschberger [mailto:fmesc...@gmail.com]
 Sent: Thursday, August 19, 2010 4:01 PM
 To: dev@sling.apache.org
 Subject: Re: Why does currentNode.getNodes() not return a
 NodeIterator?


 Hi Clemens,

 This is a problem of an early decision to convert the result of a
 getNodes() call into a JavaScript object where the returned nodes are
 properties.

 Thus the result is not a NodeIterator, unfortunately.

 Regards
 Felix

 On 19.08.2010 15:37, Clemens Wyss wrote:
  my esp script starts as follows:
  if (currentNode)
  {
var nodes = currentNode.getNodes( );
 
var size = nodes.getSize();
  ...
 
  I keep getting:
  Uncaught SlingException org.mozilla.javascript.EcmaError:
 TypeError: getSize is not a function, it is
 org.mozilla.javascript.Undefined
 
  what am I missing? I know I shouldn't be usign currentNode
 at all, but after all currentNode is not null and the doc
 says that getNodes() always returns a NodeIterator...



RE: Sling Resource/JCR Explorer

2010-08-18 Thread Clemens Wyss
 My intent with the contribution was to simple get it out
 there in case there was anything useful for your development.
thank you

Clemens

 -Original Message-
 From: Mike Moulton [mailto:m...@meltmedia.com]
 Sent: Wednesday, August 18, 2010 11:49 PM
 To: dev@sling.apache.org
 Subject: Re: Sling Resource/JCR Explorer


 Clemens,

 Sorry I have not responded. I got sick over the weekend and
 just got back on my feet.

 Per Felix's request, I have sent over a CLA for my code. Your
 welcome to do with it what you will.

 At this point I do not have much time to aid in development
 work so I defer to you to organize things however you wish.
 My intent with the contribution was to simple get it out
 there in case there was anything useful for your development.

 I hope to have time in the near future to contribute further,
 until then, I look forward to using your enhancements to the explorer.

 -- Mike



 On Aug 17, 2010, at 1:36 AM, Clemens Wyss wrote:

  looks like Mike Moulton is off again, or in lack of time ;-)
 
  Hence I shall take over.
 
  In order to not loose time on the various libs that Mike
 incorporated, I will start with the plain lightweight jQuery
 explorer and add conceptual ideas/implementations from Mike
 if appropriate.
 
  The initial goal is to make the tree (which is central, the
 heart so to say) dynamic:
  + dynamic loading [of sub trees] (ajax/json)
  + reloading of sub trees (ajax/json)
 
  Secondly I will attempt to improve the properties editor:
  + loading properties through json(?)
  + multivalue property editing
  + property type specific editors (date, reference, ...)
 
  By end of the week I should be able to tell, whether an
 integration into Sling 6 makes sense
 
  -Original Message-
  From: Clemens Wyss [mailto:clemens...@mysign.ch]
  Sent: Sunday, August 15, 2010 2:40 PM
  To: 'dev@sling.apache.org'
  Subject: RE: Sling Resource/JCR Explorer
 
 
  Well, something which basically works reasonably well
 such that you
  would recommend using it ;-)
  Me being new to sling can hardly recommend a sling pro a
  tool ;-) I therefore suggest some of the sling pros have
  glimpse at Mike's codebase (in action) and then come up with
  the mininal extension that are required to make it usable
 
  I would love to see a combined effort
  +1, but I don't know whether it makes sense to have two work
  on same (rather small) code base (which is not even under
  version control, at least I am not allowed to commit, don't
  know about Mike).
  When I started off on thursday, I had the code which was in
  the repo and started working on that. On saturday Mike came
  up with his donation, which I think is good. Now if he has
  time, it would make sense if he continued, cause he knows his
  codebase better than I do AND he is more into sling than I am
  and hence faster
 
 
  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Sunday, August 15, 2010 2:15 PM
  To: dev@sling.apache.org
  Subject: Re: Sling Resource/JCR Explorer
 
 
  Hi,
 
  On 15.08.2010 14:06, Clemens Wyss wrote:
  you could get something release-worthy
  what would you regard release worthy? ;-)
 
  Well, something which basically works reasonably well
 such that you
  would recommend using it ;-)
 
  There is no hard line to draw, though. But as Mike said,
 it would be
  cool to have something in out-of-the-box.
 
 
  Now that Mike Moulton has come up with his extensions, he'd
  be the person to give appropriate estimations
 
  Maybe I was missing something from the discussions, but I
  was thinking
  that your stuff, Clemens, and Mike's stuff could be like a
  complement
  and be merged. Or am I completely wrong ?
 
  I would love to see a combined effort, if possible. If not,
  so be it. ;-)
 
  Regards
  Felix
 
 
  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Sunday, August 15, 2010 1:56 PM
  To: Sling Developers
  Subject: Sling Resource/JCR Explorer
 
 
  Hi all,
 
  I see some activity on our JQuery based explorer and reading
 
   I would love to see a mature explorer ship as a part of Sling,
   and any work I can do to help that, I will do.
 
  I can only confirm this.
 
  Do you guys you could get something release-worthy within a
  week or two
  such that this might be included with the Sling 6 release ?
 
  What do others think of promoting the JQuery based
  explorer from the
  commons area to the bundles area and include it with Sling 6 ?
 
  Regards
  Felix
 
 
 




RE: Sling Resource/JCR Explorer

2010-08-17 Thread Clemens Wyss
looks like Mike Moulton is off again, or in lack of time ;-)

Hence I shall take over.

In order to not loose time on the various libs that Mike incorporated, I will 
start with the plain lightweight jQuery explorer and add conceptual 
ideas/implementations from Mike if appropriate.

The initial goal is to make the tree (which is central, the heart so to say) 
dynamic:
+ dynamic loading [of sub trees] (ajax/json)
+ reloading of sub trees (ajax/json)

Secondly I will attempt to improve the properties editor:
+ loading properties through json(?)
+ multivalue property editing
+ property type specific editors (date, reference, ...)

By end of the week I should be able to tell, whether an integration into Sling 
6 makes sense

 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Sunday, August 15, 2010 2:40 PM
 To: 'dev@sling.apache.org'
 Subject: RE: Sling Resource/JCR Explorer


  Well, something which basically works reasonably well such that you
  would recommend using it ;-)
 Me being new to sling can hardly recommend a sling pro a
 tool ;-) I therefore suggest some of the sling pros have
 glimpse at Mike's codebase (in action) and then come up with
 the mininal extension that are required to make it usable

  I would love to see a combined effort
 +1, but I don't know whether it makes sense to have two work
 on same (rather small) code base (which is not even under
 version control, at least I am not allowed to commit, don't
 know about Mike).
 When I started off on thursday, I had the code which was in
 the repo and started working on that. On saturday Mike came
 up with his donation, which I think is good. Now if he has
 time, it would make sense if he continued, cause he knows his
 codebase better than I do AND he is more into sling than I am
 and hence faster


  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Sunday, August 15, 2010 2:15 PM
  To: dev@sling.apache.org
  Subject: Re: Sling Resource/JCR Explorer
 
 
  Hi,
 
  On 15.08.2010 14:06, Clemens Wyss wrote:
   you could get something release-worthy
   what would you regard release worthy? ;-)
 
  Well, something which basically works reasonably well such that you
  would recommend using it ;-)
 
  There is no hard line to draw, though. But as Mike said, it would be
  cool to have something in out-of-the-box.
 
  
   Now that Mike Moulton has come up with his extensions, he'd
  be the person to give appropriate estimations
 
  Maybe I was missing something from the discussions, but I
 was thinking
  that your stuff, Clemens, and Mike's stuff could be like a
 complement
  and be merged. Or am I completely wrong ?
 
  I would love to see a combined effort, if possible. If not,
  so be it. ;-)
 
  Regards
  Felix
 
  
   -Original Message-
   From: Felix Meschberger [mailto:fmesc...@gmail.com]
   Sent: Sunday, August 15, 2010 1:56 PM
   To: Sling Developers
   Subject: Sling Resource/JCR Explorer
  
  
   Hi all,
  
   I see some activity on our JQuery based explorer and reading
  
 I would love to see a mature explorer ship as a part of Sling,
 and any work I can do to help that, I will do.
  
   I can only confirm this.
  
   Do you guys you could get something release-worthy within a
   week or two
   such that this might be included with the Sling 6 release ?
  
   What do others think of promoting the JQuery based
  explorer from the
   commons area to the bundles area and include it with Sling 6 ?
  
   Regards
   Felix
  
 



RE: extending jQuery JCR Resource explorer

2010-08-15 Thread Clemens Wyss
Hi Mike,
 I plan on making this UI cleaner too
I'd defer this till the end. Functionality/usability is more important. After 
all this is a developer tool.

More importantly the basic structure/design of the explorer has to be re-thought
- dynamic tree
  - reloading
  - partial/lazy loading (?)
- plugin (node/type) editors
- handling/editing multivalued properties. At the moment we don't have enough 
information (just the ulli's) in the client for this...

  + properties are no more being edited inline, which makes sense
 I did this because I planned on eventually making the UI's
 customizable, via plugins, based on primary type, etc.
also proposed by Bertrand

 - Principal / Group management
10) usermanagement

 - Node type browser / management
?

 - Content loading / exporting interface
6) nt:file - file upload
7) import/export subtrees, format to be defined

You say I plan on making. Any time frame? In order to prevent duplicate 
work/effort I can/would wait till you are done. WDYT

Regards
Clemens


 -Original Message-
 From: Mike Moulton [mailto:m...@meltmedia.com]
 Sent: Sunday, August 15, 2010 7:09 AM
 To: dev@sling.apache.org
 Subject: Re: extending jQuery JCR Resource explorer


 On Aug 13, 2010, at 10:47 PM, Clemens Wyss wrote:

  I had a first look at your explorer. If I get this right:
  + new, more appealing, GUI
 I plan on making this UI cleaner too, just didn't have time
 to have one of my designers make me a better comp.

  + new js-tree
 The big problem with this tree is it pre-loads the entire
 tree structure. This will not scale well. This is definitely
 an item I think needs work.

  + properties are no more being edited inline, which makes sense
 I did this because I planned on eventually making the UI's
 customizable, via plugins, based on primary type, etc.

  + privileges, minimal
 The reading of privileges is there, it's still missing
 editing. Though, this should be rather easy given the
 existing framework I have in there.

  did I miss a hidden feature?
 Nothing hidden that comes to mind. I had planned some
 additional features though, given time. Like...

 - Principal / Group management
 - Custom UI Plugins
 - Node type browser / management
 - Content loading / exporting interface

 
  -Original Message-
  From: Clemens Wyss [mailto:clemens...@mysign.ch]
  Sent: Saturday, August 14, 2010 7:20 AM
  To: 'dev@sling.apache.org'
  Subject: RE: extending jQuery JCR Resource explorer
 
 
  Hi Mike,
  cool. If you don't mind, I will take your code base and
  build upon this

 Your welcome to use it as you wish. As I have time, I can
 help further this along as well.

 
  Thx
  Clemens
 
  -Original Message-
  From: Mike Moulton [mailto:m...@meltmedia.com]
  Sent: Saturday, August 14, 2010 12:00 AM
  To: dev@sling.apache.org
  Subject: Re: extending jQuery JCR Resource explorer
 
 
  I'm a little late to this thread but I wanted to bring this
  up anyway. A while back when I first was learning Sling I
  created an extended explorer based on the original version in
  the contrib. section. My explorer uses jQuery and
  accomplished most of the items of the current jQuery
  explorer. Before an extended set of work started on
  enhancements I wanted to donate this codebase in case it's of
  any use in this effort. I would love to see a mature explorer
  ship as a part of Sling, and any work I can do to help that,
  I will do.
 
  I created SLING-1653 [1] with the codebase in it.
 
  [1] https://issues.apache.org/jira/browse/SLING-1653
 
 
  On Aug 13, 2010, at 9:21 AM, Bertrand Delacretaz wrote:
 
  On Thu, Aug 12, 2010 at 4:26 PM, Clemens Wyss
  clemens...@mysign.ch wrote:
  ...Anything important/fancy missing? How would you
  priorize these features?..
 
  A nice thing would be to use the Sling script resolution
 to plugin
  custom content editors based on resource types.
 
  Maybe just use .explorer.edit selectors to generate a
 composite UI
  where users can plugin their own editing components, and define a
  simple set of guidelines/constraints that those components must
  follow.
 
  -Bertrand
 
 
 

 -- Mike



RE: Sling Resource/JCR Explorer

2010-08-15 Thread Clemens Wyss
you could get something release-worthy
what would you regard release worthy? ;-)

Now that Mike Moulton has come up with his extensions, he'd be the person to 
give appropriate estimations

 -Original Message-
 From: Felix Meschberger [mailto:fmesc...@gmail.com]
 Sent: Sunday, August 15, 2010 1:56 PM
 To: Sling Developers
 Subject: Sling Resource/JCR Explorer


 Hi all,

 I see some activity on our JQuery based explorer and reading

I would love to see a mature explorer ship as a part of Sling,
and any work I can do to help that, I will do.

 I can only confirm this.

 Do you guys you could get something release-worthy within a
 week or two
 such that this might be included with the Sling 6 release ?

 What do others think of promoting the JQuery based explorer from the
 commons area to the bundles area and include it with Sling 6 ?

 Regards
 Felix



RE: Sling Resource/JCR Explorer

2010-08-15 Thread Clemens Wyss
 Well, something which basically works reasonably well such that you
 would recommend using it ;-)
Me being new to sling can hardly recommend a sling pro a tool ;-) I therefore 
suggest some of the sling pros have glimpse at Mike's codebase (in action) 
and then come up with the mininal extension that are required to make it 
usable

 I would love to see a combined effort
+1, but I don't know whether it makes sense to have two work on same (rather 
small) code base (which is not even under version control, at least I am not 
allowed to commit, don't know about Mike).
When I started off on thursday, I had the code which was in the repo and 
started working on that. On saturday Mike came up with his donation, which I 
think is good. Now if he has time, it would make sense if he continued, cause 
he knows his codebase better than I do AND he is more into sling than I am and 
hence faster


 -Original Message-
 From: Felix Meschberger [mailto:fmesc...@gmail.com]
 Sent: Sunday, August 15, 2010 2:15 PM
 To: dev@sling.apache.org
 Subject: Re: Sling Resource/JCR Explorer


 Hi,

 On 15.08.2010 14:06, Clemens Wyss wrote:
  you could get something release-worthy
  what would you regard release worthy? ;-)

 Well, something which basically works reasonably well such that you
 would recommend using it ;-)

 There is no hard line to draw, though. But as Mike said, it would be
 cool to have something in out-of-the-box.

 
  Now that Mike Moulton has come up with his extensions, he'd
 be the person to give appropriate estimations

 Maybe I was missing something from the discussions, but I was thinking
 that your stuff, Clemens, and Mike's stuff could be like a complement
 and be merged. Or am I completely wrong ?

 I would love to see a combined effort, if possible. If not,
 so be it. ;-)

 Regards
 Felix

 
  -Original Message-
  From: Felix Meschberger [mailto:fmesc...@gmail.com]
  Sent: Sunday, August 15, 2010 1:56 PM
  To: Sling Developers
  Subject: Sling Resource/JCR Explorer
 
 
  Hi all,
 
  I see some activity on our JQuery based explorer and reading
 
I would love to see a mature explorer ship as a part of Sling,
and any work I can do to help that, I will do.
 
  I can only confirm this.
 
  Do you guys you could get something release-worthy within a
  week or two
  such that this might be included with the Sling 6 release ?
 
  What do others think of promoting the JQuery based
 explorer from the
  commons area to the bundles area and include it with Sling 6 ?
 
  Regards
  Felix
 



RE: extending jQuery JCR Resource explorer

2010-08-13 Thread Clemens Wyss
will I be able to update/add/delete the values of multivalued properties 
through the Sling REST API (SlingPostServlet?)?

 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Friday, August 13, 2010 7:22 AM
 To: 'dev@sling.apache.org'
 Subject: RE: extending jQuery JCR Resource explorer


  2, 4, 5, 6, 10
 ok, so you think/say mixin types is not that much a topic?

  ACL view/edit
 good point, though this mandates 10) ;-)

  Reference/Path property support
 Links? dragdrop?

  I need to make some modifications to the explorer to support
  non-default workspaces, but hopefully that change will be
  minor (keeps slipping off my list).
 is there a jira entry for this task?

 Is esp the right serverside approach? Or would groovy (me,
 coming from Ruby), or even Java be helpful?

 Clemens

  -Original Message-
  From: Justin Edelson [mailto:justinedel...@gmail.com]
  Sent: Thursday, August 12, 2010 9:07 PM
  To: dev@sling.apache.org
  Subject: Re: extending jQuery JCR Resource explorer
 
 
  Nice of you to ask about prioritization...
 
  2, 4, 5, 6, 10
 
  Would be the highest priority items for me. I'd also add
  these to your list:
 
  ACL view/edit
  Reference/Path property support
 
  I need to make some modifications to the explorer to support
  non-default workspaces, but hopefully that change will be
  minor (keeps slipping off my list).
 
  Justin
 
 
  On Aug 12, 2010, at 10:26 AM, Clemens Wyss
  clemens...@mysign.ch wrote:
 
   As promised, I (actually it's we, MySign) intend to
  extend the jQuery JCR Resource (contrib/explorers/jQuery)
  explorer in order to make it more valuable for developers.
  
   Features currently available (as of May 17th 2010, rev 945149):
   + login
   + browse JCR
   + add node (name, sling:resourceType and jcr:primaryType
  have to be entered manually (input field))
   + delete node
   + view properties (multivalue properties are shown inline
  in an input field)
   + modify/update property (single value properties only)
   + delete property
  
   desirable features:
   1) jcr:primaryNodeType properties should be selectable
   2) view/add/edit/delete multivalued properties
   3) view/add/edit/delete mixin types, mixin types should be
  selectable
   4) simplified input for known types, such as date (see
  also 1) and 3) )
   5) search/filter functionality (SQL2, JQOM?)
   6) nt:file - file upload
   7) import/export subtrees, format to be defined
   8) input validation
   9) ajax'ify the client
   10) usermanagement
   more to come...
  
   WDYT? Anything important/fancy missing? How would you
  priorize these features?
 



where is the esp-syntax described?

2010-08-13 Thread Clemens Wyss
e.g. is there an else if or elsif? How about a switch/case?
Thx


RE: extending jQuery JCR Resource explorer

2010-08-13 Thread Clemens Wyss
Hi Mike,
cool. If you don't mind, I will take your code base and build upon this

Thx
Clemens

 -Original Message-
 From: Mike Moulton [mailto:m...@meltmedia.com]
 Sent: Saturday, August 14, 2010 12:00 AM
 To: dev@sling.apache.org
 Subject: Re: extending jQuery JCR Resource explorer


 I'm a little late to this thread but I wanted to bring this
 up anyway. A while back when I first was learning Sling I
 created an extended explorer based on the original version in
 the contrib. section. My explorer uses jQuery and
 accomplished most of the items of the current jQuery
 explorer. Before an extended set of work started on
 enhancements I wanted to donate this codebase in case it's of
 any use in this effort. I would love to see a mature explorer
 ship as a part of Sling, and any work I can do to help that,
 I will do.

 I created SLING-1653 [1] with the codebase in it.

 [1] https://issues.apache.org/jira/browse/SLING-1653


 On Aug 13, 2010, at 9:21 AM, Bertrand Delacretaz wrote:

  On Thu, Aug 12, 2010 at 4:26 PM, Clemens Wyss
 clemens...@mysign.ch wrote:
  ...Anything important/fancy missing? How would you
 priorize these features?..
 
  A nice thing would be to use the Sling script resolution to plugin
  custom content editors based on resource types.
 
  Maybe just use .explorer.edit selectors to generate a composite UI
  where users can plugin their own editing components, and define a
  simple set of guidelines/constraints that those components must
  follow.
 
  -Bertrand




RE: extending jQuery JCR Resource explorer

2010-08-13 Thread Clemens Wyss
I had a first look at your explorer. If I get this right:
+ new, more appealing, GUI
+ new js-tree
+ properties are no more being edited inline, which makes sense
+ privileges, minimal
did I miss a hidden feature?

 -Original Message-
 From: Clemens Wyss [mailto:clemens...@mysign.ch]
 Sent: Saturday, August 14, 2010 7:20 AM
 To: 'dev@sling.apache.org'
 Subject: RE: extending jQuery JCR Resource explorer


 Hi Mike,
 cool. If you don't mind, I will take your code base and
 build upon this

 Thx
 Clemens

  -Original Message-
  From: Mike Moulton [mailto:m...@meltmedia.com]
  Sent: Saturday, August 14, 2010 12:00 AM
  To: dev@sling.apache.org
  Subject: Re: extending jQuery JCR Resource explorer
 
 
  I'm a little late to this thread but I wanted to bring this
  up anyway. A while back when I first was learning Sling I
  created an extended explorer based on the original version in
  the contrib. section. My explorer uses jQuery and
  accomplished most of the items of the current jQuery
  explorer. Before an extended set of work started on
  enhancements I wanted to donate this codebase in case it's of
  any use in this effort. I would love to see a mature explorer
  ship as a part of Sling, and any work I can do to help that,
  I will do.
 
  I created SLING-1653 [1] with the codebase in it.
 
  [1] https://issues.apache.org/jira/browse/SLING-1653
 
 
  On Aug 13, 2010, at 9:21 AM, Bertrand Delacretaz wrote:
 
   On Thu, Aug 12, 2010 at 4:26 PM, Clemens Wyss
  clemens...@mysign.ch wrote:
   ...Anything important/fancy missing? How would you
  priorize these features?..
  
   A nice thing would be to use the Sling script resolution to plugin
   custom content editors based on resource types.
  
   Maybe just use .explorer.edit selectors to generate a composite UI
   where users can plugin their own editing components, and define a
   simple set of guidelines/constraints that those components must
   follow.
  
   -Bertrand
 
 



RE: extending jQuery JCR Resource explorer

2010-08-13 Thread Clemens Wyss
 A nice thing would be to use the Sling script resolution to plugin
 custom content editors based on resource types.
sounds interesting

 -Original Message-
 From: Bertrand Delacretaz [mailto:bdelacre...@apache.org]
 Sent: Friday, August 13, 2010 6:22 PM
 To: dev@sling.apache.org
 Subject: Re: extending jQuery JCR Resource explorer


 On Thu, Aug 12, 2010 at 4:26 PM, Clemens Wyss
 clemens...@mysign.ch wrote:
  ...Anything important/fancy missing? How would you priorize
 these features?..

 A nice thing would be to use the Sling script resolution to plugin
 custom content editors based on resource types.

 Maybe just use .explorer.edit selectors to generate a composite UI
 where users can plugin their own editing components, and define a
 simple set of guidelines/constraints that those components must
 follow.

 -Bertrand



bug in contrib/explorers/jQuery

2010-08-12 Thread Clemens Wyss
I found a little bug (which mainly showed up in FF) and have a patch ready to 
fix it.
Where (at https://issues.apache.org/jira/browse/SLING) should I file the bug 
and patch?

Are there any plans to extend this lightweight resource explorer? What 
additional features would make sense?


RE: bug in contrib/explorers/jQuery

2010-08-12 Thread Clemens Wyss
 Just create an issue assigned to the extensions component.
ok

so it's a nice way for people to get involved.
my intention :-)

Nevertheless I need some extensions/features which would make sense...

 -Original Message-
 From: Bertrand Delacretaz [mailto:bdelacre...@apache.org]
 Sent: Thursday, August 12, 2010 8:28 AM
 To: dev@sling.apache.org
 Subject: Re: bug in contrib/explorers/jQuery


 On Thu, Aug 12, 2010 at 8:21 AM, Clemens Wyss
 clemens...@mysign.ch wrote:
  I found a little bug (which mainly showed up in FF) and
 have a patch ready to fix it.
  Where (at https://issues.apache.org/jira/browse/SLING)
 should I file the bug and patch?

 Just create an issue assigned to the extensions component.

  ...Are there any plans to extend this lightweight resource
 explorer?...

 I haven't heard of any plans but patches are more than welcome, having
 a more complete explorer out of the box would be cool.

 Contributing to that doesn't require deep knowledge of Sling's
 internal, so it's a nice way for people to get involved.

 -Bertrand



[jira] Created: (SLING-1645) jQuery explorer (contrib/explorers/jQuery) does not display properly in Firefox

2010-08-12 Thread Clemens Wyss (JIRA)
jQuery explorer (contrib/explorers/jQuery) does not display properly in Firefox
---

 Key: SLING-1645
 URL: https://issues.apache.org/jira/browse/SLING-1645
 Project: Sling
  Issue Type: Bug
  Components: Extensions
 Environment: Firefox
Reporter: Clemens Wyss
Priority: Minor


when launching the explorer in Firefox the root nodes are being replicated 
beneath the root nodes. See screenshot.

reason:
On the repo's root function init_load unnecessarily calls loadPath with an 
empty path. jQuery's $('p#') maps to all p's and ppends the root nodes to all 
root nodes

workaround:
in loadPath, check whether it is being called with an empty path, i.e. for root

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SLING-1645) jQuery explorer (contrib/explorers/jQuery) does not display properly in Firefox

2010-08-12 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss updated SLING-1645:


Attachment: jQuery_explorer_in_FF.png

 jQuery explorer (contrib/explorers/jQuery) does not display properly in 
 Firefox
 ---

 Key: SLING-1645
 URL: https://issues.apache.org/jira/browse/SLING-1645
 Project: Sling
  Issue Type: Bug
  Components: Extensions
 Environment: Firefox
Reporter: Clemens Wyss
Priority: Minor
 Attachments: jQuery_explorer_in_FF.png


 when launching the explorer in Firefox the root nodes are being replicated 
 beneath the root nodes. See screenshot.
 reason:
 On the repo's root function init_load unnecessarily calls loadPath with an 
 empty path. jQuery's $('p#') maps to all p's and ppends the root nodes to all 
 root nodes
 workaround:
 in loadPath, check whether it is being called with an empty path, i.e. for 
 root

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SLING-1645) jQuery explorer (contrib/explorers/jQuery) does not display properly in Firefox

2010-08-12 Thread Clemens Wyss (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clemens Wyss updated SLING-1645:


Attachment: explorer.js.diff

a patch/diff to solve this bug

 jQuery explorer (contrib/explorers/jQuery) does not display properly in 
 Firefox
 ---

 Key: SLING-1645
 URL: https://issues.apache.org/jira/browse/SLING-1645
 Project: Sling
  Issue Type: Bug
  Components: Extensions
 Environment: Firefox
Reporter: Clemens Wyss
Priority: Minor
 Attachments: explorer.js.diff, jQuery_explorer_in_FF.png


 when launching the explorer in Firefox the root nodes are being replicated 
 beneath the root nodes. See screenshot.
 reason:
 On the repo's root function init_load unnecessarily calls loadPath with an 
 empty path. jQuery's $('p#') maps to all p's and ppends the root nodes to all 
 root nodes
 workaround:
 in loadPath, check whether it is being called with an empty path, i.e. for 
 root

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



esp - enlist jcr:primaryType's and or sling:resourceType's ?

2010-08-12 Thread Clemens Wyss
How can I enlist all available jcr:primaryType's from within esp?

How can I enlist all available sling:resourceType's from within esp?


  1   2   >