Jahia DX > Choicelist, how...

0 (0 Good)
0 (0 Bad)

Choicelist, how alow to select empty value

by  asd »  2011/10/24 08:57

Hi, we have a situation like this:

- fooChoiceList(weakreference, choicelist[nodes='$foo/boo;font:fooItems']) facetable

 The problem is that we can not select empty value in contribute mode. It is working good in edit mode (it is possible to select also empty value).

  (asd)

Number of messages  8
Registration date
0 (0 Good)
0 (0 Bad)

Re: Choicelist, how alow to select empty value

by  asd »  2011/11/04 09:42

It is really pitty that you do not answer on questions like this. This should be trivial answer for jahia expert or developers of Jahia.

 You can just simple say: "you can do it like this: ++++++" or just say: "sorry this is a bug, we will try to fix it soon". That would take you lesst then one minute.

Even the best software with bad documentation is trated like a bad software, documentation of jahia is in generaly bad, sorry that is just my oppinion. There is some general documentation.

  (asd)

Number of messages  8
Registration date
0 (0 Good)
0 (0 Bad)

Re: Re: Choicelist, how alow to select empty value

by  shuber »  2011/11/04 10:10

 

Hello,

First of all, I must put a small disclaimer that these forums are not a support area, and that there is no guarantee of answers by Jahia. The aim of this forum is for users to be able to share their experience and help each other, it is only when they have the time that Jahia employees may answer some questions. If you require real support, we do offer commercial services you may find here : http://www.jahia.com/cms/home/services.html

As for the problem you are having, this might be a limitation of the contribute mode, but as I am not an expert on this I won't risk making an absolute statement :) If you believe you've found a bug, feel free to report it in our bug tracker available here : http://jira.jahia.org/secure/Dashboard.jspa . I will also check if someone from the dev team has the time to check your question.

I think you are being a bit harsh about the documentation. There are quite a lot of resources online, including this one for contribute mode : http://www.jahia.com/community/documentation/jahiapedia/jahia-modules/contribute.html (and much more at http://www.jahia.com/community/documentation/jahiapedia/index.html) and we strive on completing them as time goes on, as well as when we get bugs about it :) I know I'm insisting about the bug tracker, but this is actually monitored by QA at Jahia and this is the best way to ensure that we keep track of user feedback.

Best regards,

  Serge Huber.

Serge Huber (shuber)

Number of messages  271
Registration date
0 (0 Good)
0 (0 Bad)

Re: Choicelist, how alow to select empty value

by  cedmail »  2011/11/04 10:27

Hi,

It seems like a small issue in the contribute module.

You can modify the "select.jsp" file to add an empty option available when creating content.

To have an empty option when editing a content the file to modify is base.contribute.edit.jsp.

 

Modify the block :

 

<c:when test="${propertyDefinition.selector eq selectorType.CHOICELIST}">
                                <jcr:propertyInitializers var="options" nodeType="${type.name}"
                                                          name="${propertyDefinition.name}"/>
                                <div jcr:id="${propertyDefinition.name}" class="choicelistEdit${currentNode.identifier}${fn:replace(propertyDefinition.name,':','_')}"
                                     jcr:url="<c:url value='${url.base}${currentNode.path}'/>"
                                     jcr:options="{<c:forEach items="${options}" varStatus="status" var="option"><c:if test="${status.index > 0}">,</c:if>'${option.value.string}':'${option.displayName}'</c:forEach>}">${prop.string}</div>
                            </c:when>
 
Add an empty option in the jcr:options json map.
 
Regards
misterCedricMailleux

Cedric Mailleux (cedmail)

Number of messages  11
Registration date
0 (0 Good)
0 (0 Bad)

Re: Re: Choicelist, how alow to select empty value

by  asd »  2011/11/04 11:26

Thank you a lot. It is magical 2 answers within first day of my harsh post.

  (asd)

Number of messages  8
Registration date
0 (0 Good)
0 (0 Bad)

Re: Re: Re: Choicelist, how alow to select empty value

by  shuber »  2011/11/04 13:34

You're welcome :)

Serge Huber (shuber)

Number of messages  271
Registration date
Contact
Share
Feedback

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page