Hi guys!
Here is a quick question that I hope gets a quick answer.=)
I have a Java Script var and a velocity var and what I want to do on the
macro.vm file is:
VelocityVar = JavaScriptVar
Anyone know if this is possible being one on server side and the other on
client side? And if possible how?
Thanks!
--
View this message in context: http://n2.nabble.com/Javascript-var-to-Velocity-Var-tp676366p676366.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi Vincent,
Sorry for not send the mail to the dev list. I just reply the mail.
On Sun, Aug 24, 2008 at 6:13 PM, Vincent Massol <vincent(a)massol.net> wrote:
>
> On Aug 24, 2008, at 10:15 AM, Vincent Massol wrote:
>
>>
>> On Aug 24, 2008, at 6:40 AM, Wang Ning wrote:
>>
>>> Hi,
>>>
>>> Yes, I think it's necessary, if the client want to control the output
>>> directory.
>>
>> Ok I've thought a bit about this and here's what I propose:
>>
>> 1) Introduce a new ConverterOutput interface with the following methods:
>> - saveImage(String imageName, InputStream imageData);
>> - saveDocument(InputStream documentData);
>
> Actually just realized that in some cases you'll have more than 1 output
> file so instead you should have:
>
> saveDocument(String documentName, InpuStream documentData);
>
> Also is there a notion of main file? When there are several files how do the
> user know which one is the start/main file?
If the use give the target File to output to, like then the main
result file is just it. We can get the main output file in the
DefaultOfficeConverter as I change the inputstream to File and create
a temp file for the main target output file.
>
>> 2) Modify Converter interface to be:
>>
>> void convert(InputStream sourceData, OfficeDocumentType sourceType,
>> ConverterOutput outputData, OfficeDocumentType outputType);
>>
>> 3) Provide 1 implementation of ConverterOutput for the moment (+ a mock
>> one for the unit tests of the Converter):
>
> I didn't mean a mock class but to use jmock as we're doing in other tests to
> dynamically mock the ConverterOutput interface.
>
[snip]
--
Thanks
Wang Ning
--
Thanks
Wang Ning
On Aug 24, 2008, at 6:40 AM, Wang Ning wrote:
> Hi,
>
> Yes, I think it's necessary, if the client want to control the
> output directory.
Ok I've thought a bit about this and here's what I propose:
1) Introduce a new ConverterOutput interface with the following methods:
- saveImage(String imageName, InputStream imageData);
- saveDocument(InputStream documentData);
2) Modify Converter interface to be:
void convert(InputStream sourceData, OfficeDocumentType sourceType,
ConverterOutput outputData, OfficeDocumentType outputType);
3) Provide 1 implementation of ConverterOutput for the moment (+ a
mock one for the unit tests of the Converter):
XWikiDocumentConverterOutput. This implementation stores the result of
the conversion in a XWiki Document (it's name/location is passed in
the constructor). In the future if we need other implementations we
could add them (like a FileConverterOutput, etc) but they're not
needed for now.
Note 1: 3) is much cleaner and allows to move some of the code in the
plugin to the XWikiDocumentConverterOutput class.
Note 2: We can fully read the sourceData internally to save the input
data to a file in a XWiki temporary directory (and thus control the
output of the image files by jodconverter)
WDYT?
Thanks
-Vincent
PS: In the future please use the mailing list for everything related
to xwiki.
>
> In jodconverter, there a two main interface:
>
> 1) void convertInternal(InputStream inputStream, DocumentFormat
> inputFormat, OutputStream outputStream, DocumentFormat outputFormat);
>
> 2) void convertInternal(File inputFile, DocumentFormat inputFormat,
> File outputFile, DocumentFormat outputFormat);
>
> The 1) just create a temp file for the outputstream in the system temp
> directory. So if you want to control the output file directory, you
> just have to change system temp directory which is not a way. In our
> case, we want to get all the output when convert to html. So I don't
> think this interface is enough.
>
> The 2) interface just can output all the result file to the
> outputFile's directory which can get from xwiki.getTempFile().
> Maybe you think we can use two Files in clients and deliver the
> FileOutputStream and FileInputStream to the 1) interface, you just get
> one output file in the FileOutputStream and can get the other results.
> The client still can't get the temp directory where the other output
> files.
>
> WDYT?
>
> On Sun, Aug 24, 2008 at 4:02 AM, Vincent Massol <vincent(a)massol.net>
> wrote:
>> Hi Wang,
>>
>> On Aug 23, 2008, at 9:55 PM, Wang Ning wrote:
>>
>>> Hi Vincent,
>>>
>>> I add a interface in the OfficeConverter
>>> void convert(File inputFile, OfficeDocumentType inputDocumentType,
>>> File outputFile,
>>> OfficeDocumentType outputDocumentType) throws
>>> OfficeConverterException;
>>> I think this useful.
>>
>> I don't think we need this since you can use a FileInputStream and a
>> FileOutputStream.
>>
>> Thanks
>> -Vincent
>>
>>> And I change the OfficeConverterPlugin that I can control the output
>>> directory of the conversion.
Hi Marius,
Just to let you know that it seems the editor you've committed on last
Friday doesn't use an updated version of the XWiki syntax and is thus
out of sync with the renderer. For example:
* Bold is **bold**, not *bold*
* Macros use 2 curly braces
* etc
We need to fix this ASAP since otherwise it won't work and we need to
release a working version for 1.6M1 (not everything should work but
easy stuff like this should work).
Thanks
-Vincent
Hi,
I've noticed that wikimodel uses the space character for representing
quotes in XWiki syntax. Here's Mikhail's explanation:
"
These events are send by quotation blocks.
Example:
> The first line
>> The second line
>> The third line
> The fourth line
Gives the following sequence of events:
<beginQuotation>
<beginQuotationLine>The first line
<beginQuotation>
<beginQuotationLine>The second line </endQuotationLine>
<beginQuotationLine>The third line</endQuotationLine>
</endQuotation>
</endQuotationLine>
<beginQuotationLine>The fourth line </endQuotationLine>
</endQuotation>
In XWiki syntax quotation lines are represented by spaces at the
beginning of each line. The quotation block is a block of lines
starting from a space-prefixed line.
Something like
. The first line
.. The second line
.. The third line
. The fourth line
(I used the "." symbol to show a space)
In CommonSyntax quotation blocks starts with the ">" symbol as I wrote
in the example above.
"
I don't think we've really been using leading spaces to represent
quotes, have we?
Also I don't think the space character is a good character for this.
So my question here:
Do we want to have a syntax for quotes/block quotes? And what
character to use?
I think we do want to have this syntax and the ">" character sounds
good to me.
WDYT?
Thanks
-Vincent
On Aug 23, 2008, at 1:07 AM, amelentev (SVN) wrote:
> Author: amelentev
> Date: 2008-08-23 01:07:59 +0200 (Sat, 23 Aug 2008)
> New Revision: 11992
>
> Added:
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/store/
> query/QueryException.java
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/store/
> query/QueryExecutor.java
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/store/
> query/QueryImpl.java
I really don't like to have Impl in class names. I'd really like that
we define it as a rule not to use them. All or classes are
implementations anywyay... I think it's also important it ends with
Query since all queries should do that.
I can propose:
- DefaultQuery
- BasicQuery
- BaseQuery
Thanks
-Vincent
PS: Haven't reviewed the commit, just this that jumped in front of my
eyes. If we're ok with it I'll put it in our best practices guide on
dev.xwiki.org
[snip}
Hi,
Right now wikimodel implements the following syntax for xwiki macros:
1)
{{macro param1="value1" param2="value2"}}content{{/macro}}
{{macro param1=value1 param2=value2}}content{{/macro}}
This is different from the original proposal of:
2)
{{macro:param1="value1"|param2="value2"}}content{{/macro}}
Notes:
* I think 1) is cleaner and easier to read
* There's no default param in 1) so you don't write something like:
{{include:Main.WebHome}}. You have to write: {{include
document=Main.WebHome}}
* 2) is the same as the current syntax
Which do we want?
I don't have any particular preference.
Thanks
-Vincent
Regarding extra lines with multiple enter/carriage returns:
+1 you bet- WYS should be WYG. If I put in 32 returns while typing, I want
32 empty lines on output.
Joshua Marks
CTO
Curriki: The Global Education and Learning Community
jmarks(a)curriki.org
www.curriki.org
****************************
Hi,
In the current rendering a link like [Space.MyPage] is displayed as
"My Page" (camelcase rendering + removal of space prefix) when no
alias is specified.
We need to decide what to do with the new rendering. There are several
options:
* MyPage
* Space.MyPage
* My Page
* wiki:Space.MyPage
* (the page title)
I propose to default to the page name without space nor wiki name
(i.e. "MyPage" in our example).
We could also make it configurable with variables like %w (wiki name),
%s (space name), %p (page name), %P (camel cased page name, i.e. "My
Page") and %t (page title).
The default would be %p but users could change it to %s.%p or %w:%s.%p
or whatever else they want.
WDYT?
Thanks
-Vincent
HI,
I have link [Panels>Panels.WebHome] in the *"Main"* Space.
And i want to display this only for the user who having admin rights for the
*"Panels"* Space.
I tried with this one *$hasAdmin* but it getting the rights for the current
space.
Any other way to do this...?
--
Prathap