Hi community,
I implemented a customer profile holding information about customers as an
XWiki application. Now in another app I'd like to have an optional field
that can contain the customer if it is related to one. Therefor I want to
list all customers (existing pages of App 1) as dropdown values of a field
of App 2.
To illustrate what I'd like to achieve:
App 1 (holding customer information):
|-- Page "Customer 1"
|-- Page "Customer 2"
...
App 2 (holding other information but can be customer related):
|-- Page 1
|-- Field "Customer" = Dropdown of Pages of App 1 (Customer 1, Customer
2 ...)
I'm rather new in scripting in XWiki/Velocity so I'd really appreciate some
help on this :)
Regards,
Dennis
Hi,
I am currently implementing my first XWiki application and starting to
learn velocity. There is one thing that makes me mad.
There is a static list field with code "ddlProductFamily".
I try to display the items in this list in a nice way (one below the other).
Different approaches including googling didn't lead to any outcome.
#foreach ($prodFam in $ddlProductFamily)
$prodFam\\
#end
#foreach ($prodFam in $doc.display('ddlProductFamily'))
$prodFam\\
#end
On the frontend it's always empty. Other #foreach loops work fine.
I'm sure I just misunderstand something but I can't find the fault myself.
Can somebody please help me?
Thanks in advance,
Dennis
Hi,
I'm trying to implement a basic password manager as an XWiki application. I
have short text fields for username and password. In view mode the password
is replaced by ********** to hide it from prying eyes.
Now I'd like to have a button next to the username and password fields for
copying the values to the clipboard.
I found two sources:
1.
http://extensions.xwiki.org/xwiki/bin/view/Extension/Cross-browser+JavaScri…
2. https://clipboardjs.com/
As the Wiki entry (1) is rather old I tried to replace it by (2) but I'm
not sure how to insert the code exactly.
I uploaded the clipboard.min.js as an attachment to the Application code
page.
My Application sheet looks like this:
{{velocity}}
{{html wiki="true"}}
#set ($discard = $doc.use('XPass.Code.XPassClass'))
#set($theSharedPanel = $xwiki.getDocument('XPass.Code'))
<script src="$theSharedPanel.getAttachmentURL('clipboard.min.js')"></script>
(% class="xform" %)
(((
<script>
var clipboard = new Clipboard('.btn');
clipboard.on('success', function(e) {
console.log(e);
});
clipboard.on('error', function(e) {
console.log(e);
});
</script>
; <label
for="XPass.Code.XPassClass_0_sTxtName">$escapetool.xml($doc.displayPrettyName('sTxtName',
false, false))</label>
: $doc.display('sTxtName')
; <label
for="XPass.Code.XPassClass_0_sListCategory">$escapetool.xml($doc.displayPrettyName('sListCategory',
false, false))</label>
: $doc.display('sListCategory')
; <label
for="XPass.Code.XPassClass_0_sTxtURL">$escapetool.xml($doc.displayPrettyName('sTxtURL',
false, false))</label>
: $doc.display('sTxtURL')
; <label
for="XPass.Code.XPassClass_0_lTxtDesc">$escapetool.xml($doc.displayPrettyName('lTxtDesc',
false, false))</label>
: $doc.display('lTxtDesc')
; <label
for="XPass.Code.XPassClass_0_sTxtUser">$escapetool.xml($doc.displayPrettyName('sTxtUser',
false, false))</label>
: $doc.display('sTxtUser')
; <label
for="XPass.Code.XPassClass_0_sTxtPassword">$escapetool.xml($doc.displayPrettyName('sTxtPassword',
false, false))</label>
:
#if ($context.display == 'edit')
$doc.display('sTxtPassword')
#else
~*~*~*~*~*~*~*~*~*~*
#end
<button class="btn" data-clipboard-target="$doc.display('sTxtPassword')">
<img src="assets/clippy.svg" alt="Copy to clipboard">
</button>
)))
{{/html}}
{{/velocity}}
Now then pressing the "Copy to clipboard" button the clipboard is not
updated and the console shows:
"ReferenceError: Clipboard is not defined"
I'm not sure where to place the scripts to make it work so mybe someone can
enlighten me.
Regards,
Dennis
Hi,
I'm having a hard time getting XWiki (on CentOS 7 / Tomcat 8.0.33) to work
with our companies new authenticated proxy.
First of all: in general the service user I'm using can successfully
authenticate on the proxy (tested in firefox on my computer and elinks on
the Linux machine). Before we had a proxy server not requiring
authentication and that worked like a charm.
I've already tried several approaches to make the authenticated proxy work:
1. approach via catalina.properties:
http.proxyUser=USERNAME
http.proxyPassword=Pass!W0rd
https.proxyHost=proxy.address.com
https.proxyPort=8080
http.nonProxyHosts=localhost|127.*|[::1]|several other internal domain
exceptions that worked before
restarted tomcat
When accessing the extensions settings page of the XWiki instance
(/bin/admin/XWiki/XWikiPreferences?editor=globaladmin§ion=XWiki.AddExtensions)
nothing can be found.
catalina.out shows
2016-08-08 15:48:16,405 [
http://10.170.64.121/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globalad…]
ERROR aultExtensionRepositoryManager - F
org.xwiki.extension.repository.search.SearchException: Failed to search
extensions based on pattern []
at
org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.search(XWikiExtensionRepository.java:417)
~[xwiki-commons-extension-repository-xwiki-7.4.4.
at
org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.search(XWikiExtensionRepository.java:434)
~[xwiki-commons-extension-repository-xwiki-7.4.4.
at
org.xwiki.extension.repository.internal.DefaultExtensionRepositoryManager.search(DefaultExtensionRepositoryManager.java:381)
[xwiki-commons-extension-api-7.4.4.ja
at
org.xwiki.extension.repository.internal.DefaultExtensionRepositoryManager.search(DefaultExtensionRepositoryManager.java:335)
[xwiki-commons-extension-api-7.4.4.ja
at
org.xwiki.extension.repository.internal.DefaultExtensionRepositoryManager.search(DefaultExtensionRepositoryManager.java:314)
[xwiki-commons-extension-api-7.4.4.ja
at
org.xwiki.extension.script.ExtensionManagerScriptService.search(ExtensionManagerScriptService.java:171)
[xwiki-platform-extension-script-7.4.4.jar:7.4.4]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.8.0_91]
[...]
Caused by: java.io.IOException: Invalid answer [407] from the server when
requesting [
http://extensions.xwiki.org/xwiki/rest/repository/search?start=0&number=20&…
]
at
org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.getRESTResource(XWikiExtensionRepository.java:245)
~[xwiki-commons-extension-repository-xwi
at
org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.getRESTObject(XWikiExtensionRepository.java:295)
~[xwiki-commons-extension-repository-xwiki
at
org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.search(XWikiExtensionRepository.java:415)
~[xwiki-commons-extension-repository-xwiki-7.4.4.
... 183 common frames omitted
407 indicates an authentication issue but the correct data is in
catalina.properties verified by using the same proxy settings in other
applications. I also tried "domain\USERNAME" followed by a tomcat restart
with the same outcome.
2. approach via separate squid instance (without authentication) that
authenticates on the parent proxy:
catalina.properties:
http.proxyHost=localhost
http.proxyPort=3128
https.proxyHost=localhost
https.proxyPort=3128
http.nonProxyHosts=localhost|127.*|[::1]|several other internal domain
exceptions that worked before
squid.conf:
http_access allow all
http_port 3128
coredump_dir /var/spool/squid
cache deny all
dns_v4_first on
cache_peer proxy.address.com parent 8080 0 no-query no-digest
no-netdb-exchange default login=USERNAME:Pass!W0rd
restarted tomcat
restarted squid
Again verified that it's working by using the squid instance in firefox and
elinks.
Again trying to access the extensions page of the XWiki instance no
extensions can be found.
Squids access.log shows:
127.0.0.1 TCP_MISS_ABORTED/000 0 POST
http://extensions.xwiki.org/xwiki/rest/repository/search - HIER_DIRECT/
104.25.106.17 -
catalina.out shows:
Caused by: java.io.IOException: Failed to request [
http://extensions.xwiki.org/xwiki/rest/repository/search]
at
org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.postRESTResource(XWikiExtensionRepository.java:281)
~[xwiki-commons-extension-repository-xw
at
org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.postRESTObject(XWikiExtensionRepository.java:304)
~[xwiki-commons-extension-repository-xwik
at
org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.search(XWikiExtensionRepository.java:460)
~[xwiki-commons-extension-repository-xwiki-7.4.4.
... 182 common frames omitted
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
~[na:1.8.0_91]
at
java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
~[na:1.8.0_91]
at java.net.SocketInputStream.read(SocketInputStream.java:170)
~[na:1.8.0_91]
at java.net.SocketInputStream.read(SocketInputStream.java:141)
~[na:1.8.0_91]
at
org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
~[httpcore-4.4.4.jar:4.4.4]
at
org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
~[httpcore-4.4.4.jar:4.4.4]
at
org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
~[httpcore-4.4.4.jar:4.4.4]
at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
~[httpclient-4.5.1.jar:4.5.1]
at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
~[httpclient-4.5.1.jar:4.5.1]
at
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
~[httpcore-4.4.4.jar:4.4.4]
at
org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
~[httpcore-4.4.4.jar:4.4.4]
at
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
~[httpcore-4.4.4.jar:4.4.4]
at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
~[httpcore-4.4.4.jar:4.4.4]
at
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
~[httpclient-4.5.1.jar:4.5.1]
at
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
~[httpclient-4.5.1.jar:4.5.1]
at
org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
~[httpclient-4.5.1.jar:4.5.1]
at
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
~[httpclient-4.5.1.jar:4.5.1]
at
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
~[httpclient-4.5.1.jar:4.5.1]
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
~[httpclient-4.5.1.jar:4.5.1]
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
~[httpclient-4.5.1.jar:4.5.1]
at
org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.postRESTResource(XWikiExtensionRepository.java:278)
~[xwiki-commons-extension-repository-xw
... 184 common frames omitted
Apart from XWiki/Tomcat I don't have any issues using the company proxy
directly or via my own squid instance.
I hope somebody can help me out here.
Regards,
Dennis
Hi,
You can use a SSX object to overwriting CSS instruction:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial#HM…
On my xwiki I use this extension:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Numbered+Headings
I modified the SSX object to displaynumbered lists like this:
A. Item One
A.1. Sub-Item 1
A.1.1 Sub-Sub Item 1
If you want I can send you my CSS code.
Pascal B
--------------------------------------------
En date de : Ven 5.8.16, rlarkin <rdlarkin(a)washeriff.net> a écrit :
Objet: [xwiki-users] Question regarding changing default format of Numbered Lists
À: users(a)xwiki.org
Date: Vendredi 5 août 2016, 18h06
Hello-
I am a new user and I have a question regarding changing the
default method
of numbering used for numbered lists. I am attempting to use
xwiki to store
our company policy, which as of now is kept in a series of
individual
documents. The difficulty is that management is insistent
that I maintain
the current numbering schema used for numbered lists which
is in the format:
A. Item One
1. Sub-Item 1
a. Sub-Sub Item 1
While I can do so manually using the xwiki syntax this is a
great deal of
work when dealing with dozens of lists within hundreds of
policies. In
addition I would like to make it as easy as possible for
whomever comes
after me. I believe that the css code for something like
this would be
something along the lines of:
ol {list-style-type:upper-alpha;}
ol ol {list-style-type:decimal;}
ol ol ol {list-style-type:lower-alpha;}
but I am uncertain as to whether this is the proper method
of implementing
this change, and if so am uncertain as to where that code
would go. Any help
would be appreciated.
--
View this message in context: http://xwiki.475771.n2.nabble.com/Question-regarding-changing-default-forma…
Sent from the XWiki- Users mailing list archive at
Nabble.com.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
Hello,
I want to create a wiki link which opens the current page in a given language. I tried the following:
{{velocity}} [[English>>doc:$doc.fullName/?language=en]]{{/velocity}}
But it does not work, it generates a create page link. I could not find anything on http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax?syntax=2.1§io… either.
How may I achieve this? Thank you.
Mario
The wiki will be used for low-volume updates and discussions on projects of non-profit organisation.
The owner name is aveq_consexec
Requested wiki name is aves
Best,
Isaac
Isaac Stethem
Conseiller à l’exécutif | Advisor to the Executive
Association pour la voix étudiante au Québec | Association for the Voice of Education in Québec
1-888-994-9177 x1
cons.exec(a)aveq-nous.ca
Les bureaux de l’AVEQ sont situés sur des terres Kanien’kehá:ka occupées
The AVEQ offices are located on occupied Kanien’kehá:ka territory
Hello,
I am trying to control access to XWiki based on the incoming IP address.
Currently, I have the wiki set up to allow view access to everyone
including guests, and write access to logged in users. This works fine on
the local LAN, but I'd like to allow external users access to the wiki as
well. I would like to force users accessing the Wiki from outside my
network to log on before they can view Wiki pages.
There doesn't seem to be any build in mechanism for filtering access by IP.
Is there a work-around that would let me to this?
Thanks.
Hello:
What would need to happen (install engine?) for me to be able to do the
following:
{{script language="javascript"}}
{{/sript}}
in other words, server side javascript
Dan
--
View this message in context: http://xwiki.475771.n2.nabble.com/Using-Javascript-as-a-scripting-language-…
Sent from the XWiki- Users mailing list archive at Nabble.com.
To whom it may concern:
I am sending this mail to request a new wiki on myxwiki.org <http://myxwiki.org/>.
Description: wiki for a small group to keep information on system admin, development and other misc. info
Owner name: chomg
wiki name: chomg.myxwiki.org <http://chomg.myxwiki.org/>
Thanks in advance.
Best,
Mike