Re: [xwiki-users] possible bug - inline editor evaluates form hidden variables on save

2011-09-30 Thread Marius Dumitru Florea
On Thu, Sep 29, 2011 at 9:19 PM, Scott Serr se...@theserrs.net wrote:

 I ran into an interesting side effect of having a form in my Class Sheet.

 input type=hidden name=parent value=${doc.fullName} /

 The above line is in a form which posts to the current page, but then 
 redirects to a sub-page.  The process is exactly like the FAQ Example.  The 
 trouble is, when doing Inline Editing on a page with the class object.  No 
 matter what you put in as the parent in the UI for the parent property, it 
 gets reset to itself on save.  The wiki and WYSYWIG editors don't do this of 
 course.

 I think this is a problem because...


 1. Should this form (and form element) really be evaluated?  No one hit the 
 submit button.

How did you save without hitting the submit button? (You said it gets
reset to itself on save).

 2. It doesn't seem very safe for variable spaces to mix so easily.  Unless 
 this is a feature.

Inline form edit mode is used to edit object properties. If you use
$doc.display method to generate your form fields then you'll see that
the field IDs/names look like this: ClassName_objectIndex_propertyName
, so they don't interfere with the rest of the (hidden) fields like
parent which is used to set the document title. If you generate the
form fields yourself then indeed you have to take care to use unique
IDs/names to prevent conflicts.

Hope this helps,
Marius

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Problem with Validation Regular Expression

2011-09-30 Thread Stéphanie
Hi everyone, 

I was trying to reproduce the tutorial of the form with validation and
tooltips. I have a field name that I want to be between 1 and 10
characters (like first_name in the tutorial). 
The Validation Regular Expression for this field is : /.{1,10}/ 

I've made others fields with Validation Regular Expression /.+/ and these
fields work without problem. 

But, when I enter the field name with more than 10 characters, the
Validation Message doesn't appears and my form is validated. 

But, I don't want my form to be validated, because the field name is too
long. Is there a problem anywhere (I copy all the code giving in the
tutorial) ? /.{1,10}/ is it a deprecated expression ? 

Please help me ^^ 

Best regards, 
Stéphanie  



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Problem-with-Validation-Regular-Expression-tp6847766p6847766.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Template for Blog

2011-09-30 Thread Arnaud bourree
2011/9/29 Sergiu Dumitriu ser...@xwiki.com:
 On 09/29/2011 02:49 AM, Arnaud bourree wrote:
 2011/9/15 Vincent Massolvinc...@massol.net:

 On Sep 15, 2011, at 12:27 AM, Sergiu Dumitriu wrote:

 On 09/14/2011 03:56 PM, Arnaud bourree wrote:
 Hello,

 Does someone made Template for Blog?
 I'm surprise that is not part of XWiki 3.1

 You mean a document template for blog posts? No, it's not in the
 sources, but it should be easy to create one.

 What Sergiu means is:
 http://extensions.xwiki.org/xwiki/bin/view/Extension/Administration+Application#HTemplatesCreationandAdministration

 Is that what you meant?


 Sorry for later response.
 Yes, that exactly what I mean.
 I've made a try with XWiki 2.7, but Post creation date field is one
 from template :-/
 I will retry on XWiki 3.1 and take you in touch.

 Ah, yes, you have to cheat a bit.

 1. Edit the BlogPostClass and uncheck the Empty is today checkbox from
 the Publish Date field
 2. Create the template, leaving the publish date empty
 3. Re-check the Empty is today checkbox in the class

 --
 Sergiu Dumitriu
 http://purl.org/net/sergiu/

I try it on both 2.7 and 3.1 instance without success.
I found in same time that there is one template BlogPostTemplate and
only BlogPostTemplateProvider is missing
But in any case, page created from template has never BlogPostClass object
May be something more to do to copy template object into new page?

Arnaud.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users