Hello,
Infos: I've a class to create some services (Prestations) with (at this
time) 3 fields: name, town and country.
They are created with a name for the doc, like MyService01, MyService02, etc
(for the tests)
Second part, there is another class used to evaluate each service. The
system needed is to have a form of evaluation created each time that any
person want make an evaluation for a service.
So, I would like to create a system of pages called like
MyService01_Eval_001, MyService01_Eval_002, MyService01_Eval_003, etc. for
an evaluation of MyService01, and MyService02_Eval_001,
MyService02_Eval_002, etc. for an evaluation of MyService02 for example.
My problem, when I want create an evalutation, I get back the name of the
service (spent in hidden parameter in the form) then I would like to use it
in the code to create page and call the class template of the second class
with the code:
code
#if($!request.xaction == 'createevaluationtype01')
#if($docname != '' !$xwiki.exists($docname))
#if($!request.xaction == 'createevaluationtype01')
$xwiki.copyDocument('EtudeCode.EtudeRatingType01Template', $docname)
#set($etudeDoc= $xwiki.getDocument($docname))
$etudeDoc.setTitle(${title})
$etudeDoc.setParent($doc.getFullName())
$etudeDoc.save()
$response.sendRedirect($etudeDoc.getURL('inline'))
#end
#end
#end
/code
The $docname value has the good name when I display it, like for example
MyService001_Eval_002, but when I click on button the page created is
called WebHome_Eval_002, I can't keep the name of the service evaluated.
Really, I don't understand why and I don't find any soluce to my problem
since now almost 3 days and after tried several methods :(
Someone could help me for this please ;)
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Problem-to-give-a-name-to-a-page-with-Class-tp5667152p5667152.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