Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Felix Meschberger
Hi David, Am Montag, den 21.01.2008, 08:25 +0100 schrieb David Nuescheler: Hi guys, I have been trying to access the JCR session from my .esp script to create content for an import script that needs to create many nodes in the repository. I think my initial thought was to get access to

Re: File Upload Problem

2008-01-21 Thread Felix Meschberger
Hi Alexander, If you upload the file with a multipart/form-data POST, Sling will already have read the input and will provide the data in the RequestParameterMap as RequestParameter instances, which allow you access to the uploaded file data. Hope, this helps. Regards Felix Am Montag, den

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Bertrand Delacretaz
On Jan 21, 2008 9:39 AM, Felix Meschberger [EMAIL PROTECTED] wrote: ...The better way is to do: Session session = request.getResourceResolver().adaptTo(Session.class);... If the Resource is a JCR node, it would be convenient to have direct access to a session variable, or JcrSession to

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Felix Meschberger
Hi, Am Montag, den 21.01.2008, 09:58 +0100 schrieb Bertrand Delacretaz: On Jan 21, 2008 9:39 AM, Felix Meschberger [EMAIL PROTECTED] wrote: ...The better way is to do: Session session = request.getResourceResolver().adaptTo(Session.class);... If the Resource is a JCR node, it

Documentation plan (was: esp script not parsing)

2008-01-21 Thread Bertrand Delacretaz
On Jan 19, 2008 4:14 PM, Peter Svensson [EMAIL PROTECTED] wrote: ...What I would like to be provided with is something like this... You doc plan below makes sense - getting some up-to-date getting started docs is next on my plate once SLING-149 is over. One thing that's important in docs is to

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Carsten Ziegeler
Bertrand Delacretaz wrote: On Jan 21, 2008 9:39 AM, Felix Meschberger [EMAIL PROTECTED] wrote: ...The better way is to do: Session session = request.getResourceResolver().adaptTo(Session.class);... If the Resource is a JCR node, it would be convenient to have direct access to a session

Re: Documentation plan (was: esp script not parsing)

2008-01-21 Thread Peter Svensson
Yes, I think so. Now I only need to understand how things work so I can write about them :) I like the idea to have small, concise documents targeting one thing at a time - ideally visible on the screen without scrolling. Is there some kind of publicly accessible SLing server that can be used for

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Bertrand Delacretaz
On Jan 21, 2008 10:15 AM, Felix Meschberger [EMAIL PROTECTED] wrote: ...Having this in mind, retrieving the session from the Resource is not appropriate. For this reason, the Session is available from the ResourceResolver's adaptTo method. ... So (as Carsten also suggests), we could ask the

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Carsten Ziegeler
Felix Meschberger wrote: Hi, Am Montag, den 21.01.2008, 10:27 +0100 schrieb Bertrand Delacretaz: On Jan 21, 2008 10:15 AM, Felix Meschberger [EMAIL PROTECTED] wrote: ...Having this in mind, retrieving the session from the Resource is not appropriate. For this reason, the Session is available

Re: Documentation plan (was: esp script not parsing)

2008-01-21 Thread Bertrand Delacretaz
On Jan 21, 2008 10:27 AM, Peter Svensson [EMAIL PROTECTED] wrote: ...Is there some kind of publicly accessible SLing server that can be used for writing 'live' documentation?... Our wiki is at http://cwiki.apache.org/confluence/display/SLING/wiki - but writing to it requires an account. In my

[jira] Created: (SLING-178) Jobs should not need a job id

2008-01-21 Thread Carsten Ziegeler (JIRA)
Jobs should not need a job id - Key: SLING-178 URL: https://issues.apache.org/jira/browse/SLING-178 Project: Sling Issue Type: Improvement Components: Event Reporter: Carsten Ziegeler

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Bertrand Delacretaz
On Jan 21, 2008 10:37 AM, Carsten Ziegeler [EMAIL PROTECTED] wrote: Felix Meschberger wrote: Sure, still this would all just be convenience :-) Of course, we WANT Sling to be convenient to use ;-) ...For jsp we could hard-code this in the sling taglib for the defineObjects tag and we

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Carsten Ziegeler
Bertrand Delacretaz wrote: On Jan 21, 2008 10:37 AM, Carsten Ziegeler [EMAIL PROTECTED] wrote: Felix Meschberger wrote: Sure, still this would all just be convenience :-) Of course, we WANT Sling to be convenient to use ;-) ...For jsp we could hard-code this in the sling taglib for

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Felix Meschberger
Hi, Am Montag, den 21.01.2008, 10:51 +0100 schrieb Bertrand Delacretaz: On Jan 21, 2008 10:37 AM, Carsten Ziegeler [EMAIL PROTECTED] wrote: Felix Meschberger wrote: Sure, still this would all just be convenience :-) Of course, we WANT Sling to be convenient to use ;-) Sure, but

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Bertrand Delacretaz
On Jan 21, 2008 11:17 AM, Felix Meschberger [EMAIL PROTECTED] wrote: ...Coming back to David's initial problem, that the ScriptableNode does not provide the getSession() method: We have SLING-154 [1], which is concerned with completing the ScriptableNode implementation, and there is a way to

Re: empty string handling in the ujax post servlet

2008-01-21 Thread Tobias Bocanegra
On 1/21/08, Felix Meschberger [EMAIL PROTECTED] wrote: Hi, Am Samstag, den 19.01.2008, 22:31 +0100 schrieb Tobias Bocanegra: hi, the current ujax post servlet writes back all eligible input values to their respective properties. if the input values are empty strings, properties with

Re: empty string handling in the ujax post servlet

2008-01-21 Thread Bertrand Delacretaz
On Jan 19, 2008 10:31 PM, Tobias Bocanegra [EMAIL PROTECTED] wrote: ...I think all the above could be handled with a default value hint: ./[EMAIL PROTECTED] = -- treat them as empty strings (1). ./[EMAIL PROTECTED] = ujax:ignore -- ignore them (2) ./[EMAIL PROTECTED] = ujax:null -- remove

Re: Documentation plan (was: esp script not parsing)

2008-01-21 Thread Peter Svensson
I don't have a working printer at home, but I'll do it tomorrow when I'm at a client. Cheers, PS On Jan 21, 2008 10:47 AM, Bertrand Delacretaz [EMAIL PROTECTED] wrote: On Jan 21, 2008 10:27 AM, Peter Svensson [EMAIL PROTECTED] wrote: ...Is there some kind of publicly accessible SLing server

Re: empty string handling in the ujax post servlet

2008-01-21 Thread Tobias Bocanegra
...I think all the above could be handled with a default value hint: ./[EMAIL PROTECTED] = -- treat them as empty strings (1). ./[EMAIL PROTECTED] = ujax:ignore -- ignore them (2) ./[EMAIL PROTECTED] = ujax:null -- remove them (3) ./[EMAIL PROTECTED] = foobar -- normal default value

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Tobias Bocanegra
Coming back to David's initial problem, that the ScriptableNode does not provide the getSession() method: We have SLING-154 [1], which is concerned with completing the ScriptableNode implementation, and there is a way to access the Session, I think, we do not need to do anything else at the

Re: Documentation plan (was: esp script not parsing)

2008-01-21 Thread Felix Meschberger
Hi, Am Montag, den 21.01.2008, 10:47 +0100 schrieb Bertrand Delacretaz: On Jan 21, 2008 10:27 AM, Peter Svensson [EMAIL PROTECTED] wrote: ...Is there some kind of publicly accessible SLing server that can be used for writing 'live' documentation?... Our wiki is at

Re: Sling JSON format

2008-01-21 Thread Felix Meschberger
Hi Peter, Not on the first one, but on a page like Scripting in Sling How-To or such... Regards Felix Am Samstag, den 19.01.2008, 15:57 +0100 schrieb Peter Svensson: This is great. This info should be on the first page of the So, you want to become a Sling wizard page in the Wiki :)

[jira] Updated: (SLING-149) Create the Sling Launchpad, based on microsling-core code

2008-01-21 Thread Bertrand Delacretaz (JIRA)
[ https://issues.apache.org/jira/browse/SLING-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bertrand Delacretaz updated SLING-149: -- Summary: Create the Sling Launchpad, based on microsling-core code (was: Merge

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread David Nuescheler
Hi Guys, Felix says: Coming back to David's initial problem, that the ScriptableNode does not provide the getSession() method: We have SLING-154 [1], which is concerned with completing the ScriptableNode implementation, and there is a way to access the Session, I think, we do not need to do

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread Carsten Ziegeler
David Nuescheler wrote pointless-rant Carsten says: For instance, if you have a non-jcr-resource this resource ... Can we please not use that as an argument... I really think we should focus on the real use-cases we have at hand. I know I sound like a broken record regarding the abstraction

[jira] Commented: (SLING-149) Create the Sling Launchpad, based on microsling-core code

2008-01-21 Thread Bertrand Delacretaz (JIRA)
[ https://issues.apache.org/jira/browse/SLING-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12560994#action_12560994 ] Bertrand Delacretaz commented on SLING-149: --- Moved the

Re: Sling Launchpad: How to get access to the current JCR session from .esp

2008-01-21 Thread David Nuescheler
I think you missinterpreted my comment and quoted my statement out of context. ;) i competely agree... regards, david

[jira] Resolved: (SLING-154) Allow access to Node and Property Methods on ScriptableNode and ScriptableProperty

2008-01-21 Thread Felix Meschberger (JIRA)
[ https://issues.apache.org/jira/browse/SLING-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger resolved SLING-154. - Resolution: Fixed Fix Version/s: 2.0.0 Assignee: Felix Meschberger

How does one build Sling?

2008-01-21 Thread Peter Svensson
Hi, I'm attempting again to grok how to write a new version of JsonItemWriter, et.c. But I think I need to download the whole thing,s ince I only have a version of usling at the moment. I've tried to look in the docs for a checkout and build process, but couldn't find one. COuld someone point me

Re: How does one build Sling?

2008-01-21 Thread Bertrand Delacretaz
On Jan 21, 2008 3:41 PM, Peter Svensson [EMAIL PROTECTED] wrote: ...I've tried to look in the docs for a checkout and build process, but couldn't find one. COuld someone point me out to some info on this?... Install a Java 5 JVM and Maven (I use 2.0.7). Checkout with an svn client from

Re: File Upload Problem

2008-01-21 Thread Alexander Saar
Hi Felix, thanks for the reply. I switched to using request.getRequestParameterMap() in my POST.jsp, but nothing changed and the error is the same. After inspecting the stack trace and my repository again I think the error occurs when Sling tries to read the input and build the request

[jira] Updated: (SLING-154) Allow access to Node and Property Methods on ScriptableNode and ScriptableProperty

2008-01-21 Thread Bertrand Delacretaz (JIRA)
[ https://issues.apache.org/jira/browse/SLING-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bertrand Delacretaz updated SLING-154: -- Attachment: SLING-154.partial.patch Rev 613895 breaks my launchpad-webapp integration

[jira] Commented: (SLING-154) Allow access to Node and Property Methods on ScriptableNode and ScriptableProperty

2008-01-21 Thread Bertrand Delacretaz (JIRA)
[ https://issues.apache.org/jira/browse/SLING-154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12561066#action_12561066 ] Bertrand Delacretaz commented on SLING-154: --- To be clear, what I mean by breaks my

Re: How does one build Sling?

2008-01-21 Thread Bertrand Delacretaz
On Jan 21, 2008 3:55 PM, Bertrand Delacretaz [EMAIL PROTECTED] wrote: ...Checkout with an svn client from http://svn.apache.org/repos/asf/incubator/sling/trunk/... Note that the launchpad stuff is broken in the current HEAD revision (see SLING-154), if you want to try it before we fix that

Re: How does one build Sling?

2008-01-21 Thread Peter Svensson
Hmm. I should know by now what Launchpad does, but am I right in assuming that that means that esp parsing while be disabled as well? Cheers, PS On Jan 21, 2008 6:06 PM, Bertrand Delacretaz [EMAIL PROTECTED] wrote: On Jan 21, 2008 3:55 PM, Bertrand Delacretaz [EMAIL PROTECTED] wrote:

[jira] Created: (SLING-181) Standart FileServlet throws InternalServletError for nt:file resource

2008-01-21 Thread christian (JIRA)
Standart FileServlet throws InternalServletError for nt:file resource - Key: SLING-181 URL: https://issues.apache.org/jira/browse/SLING-181 Project: Sling Issue Type: Bug

Re: How does one build Sling?

2008-01-21 Thread Bertrand Delacretaz
On Jan 21, 2008 6:14 PM, Peter Svensson [EMAIL PROTECTED] wrote: ...Hmm. I should know by now what Launchpad does, but am I right in assuming that that means that esp parsing while be disabled as well?... Not sure what you mean - the Launchpad works very similarly to microsling-core, but

Re: Documentation plan (was: esp script not parsing)

2008-01-21 Thread Padraic I. Hannon
+1 here as well. -paddy

[jira] Reopened: (SLING-154) Allow access to Node and Property Methods on ScriptableNode and ScriptableProperty

2008-01-21 Thread Felix Meschberger (JIRA)
[ https://issues.apache.org/jira/browse/SLING-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger reopened SLING-154: - Reopen because my fix was completely broken. Thanks Bertrand for providing the patch.

[jira] Updated: (SLING-154) Allow access to Node and Property Methods on ScriptableNode and ScriptableProperty

2008-01-21 Thread Felix Meschberger (JIRA)
[ https://issues.apache.org/jira/browse/SLING-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger updated SLING-154: Attachment: SLING-154_2.patch Slightly modified patch: * Add getClassName() method to