[Constellio 2.0 M2] Advanced search

118 views
Skip to first unread message

Cédric Maria-Sube

unread,
Nov 6, 2013, 9:20:04 AM11/6/13
to const...@googlegroups.com
Hello,

I'd like to add extra fields in the "Advanced search". I tried to do this through the administration "Search interface > Advanced search". When I click on one of the listed collections, I get the following error :

Unexpected RuntimeException

WicketMessage: Unable to find component with id 'autoComplete' in [MarkupContainer [Component id = 0]]. This means that you declared wicket:id=autoComplete in your markup, but that you either did not add the component to your page at all, or that the hierarchy does not match.
[markup = file:/D:/LOG_DEV/constellio_standalone_2.0M2/tomcat/webapps/constellio/WEB-INF/classes/com/doculibre/constellio/wicket/panels/admin/searchInterface/generalOptions/advancedSearch/AdvancedSearchOptionsPanel.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:wicket="http://wicket.sourceforge.net">
<wicket:panel>

<input id="enabled" type="checkbox" wicket:id="enabled"/>
<label for="enabled"><wicket:message key="enabled">[enabled]</wicket:message></label>
<br></br>
<wicket:message key="initialRules">["initialRules"]</wicket:message>
<select wicket:id="initialRules"></select>

<table class="dataAdmin">
<tr wicket:id="enabledRulesHeader">
<th><wicket:message key="indexField">[indexField]</wicket:message></th>
<th><wicket:message key="indexFieldEnabled">[indexFieldEnabled]</wicket:message></th>
<th><wicket:message key="autocomplete">[autocomplete]</wicket:message><span style="color:red; font-weight: bolder">*</span></th>
</tr>
<tr wicket:id="enabledRules">
<td><span wicket:id="indexFieldName"></span></td>
<td><input type="checkbox" wicket:id="enabled"/></td>
<td><input type="checkbox" wicket:id="autoComplete"/></td>
</tr>
</table>
<p style="color:red; width: 320px;">* <wicket:message key="needReindex">[key]</wicket:message></p>
</wicket:panel>
</html>, index = 39, current = '<input type="checkbox" wicket:id="autoComplete"/>' (line 21, column 8)]

Root cause:

org.apache.wicket.markup.MarkupException: Unable to find component with id 'autoComplete' in [MarkupContainer [Component id = 0]]. This means that you declared wicket:id=autoComplete in your markup, but that you either did not add the component to your page at all, or that the hierarchy does not match.
[markup = file:/D:/LOG_DEV/constellio_standalone_2.0M2/tomcat/webapps/constellio/WEB-INF/classes/com/doculibre/constellio/wicket/panels/admin/searchInterface/generalOptions/advancedSearch/AdvancedSearchOptionsPanel.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:wicket="http://wicket.sourceforge.net">
<wicket:panel>

<input id="enabled" type="checkbox" wicket:id="enabled"/>
<label for="enabled"><wicket:message key="enabled">[enabled]</wicket:message></label>
<br></br>
<wicket:message key="initialRules">["initialRules"]</wicket:message>
<select wicket:id="initialRules"></select>

<table class="dataAdmin">
<tr wicket:id="enabledRulesHeader">
<th><wicket:message key="indexField">[indexField]</wicket:message></th>
<th><wicket:message key="indexFieldEnabled">[indexFieldEnabled]</wicket:message></th>
<th><wicket:message key="autocomplete">[autocomplete]</wicket:message><span style="color:red; font-weight: bolder">*</span></th>
</tr>
<tr wicket:id="enabledRules">
<td><span wicket:id="indexFieldName"></span></td>
<td><input type="checkbox" wicket:id="enabled"/></td>
<td><input type="checkbox" wicket:id="autoComplete"/></td>
</tr>
</table>
<p style="color:red; width: 320px;">* <wicket:message key="needReindex">[key]</wicket:message></p>
</wicket:panel>
</html>, index = 39, current = '<input type="checkbox" wicket:id="autoComplete"/>' (line 21, column 8)]
at org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:464)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1345)
at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1402)
at org.apache.wicket.Component.renderComponent(Component.java:2524)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
at org.apache.wicket.Component.render(Component.java:2361)
at org.apache.wicket.markup.html.list.ListView.renderItem(ListView.java:634)
at org.apache.wicket.markup.html.list.ListView.renderChild(ListView.java:622)
at org.apache.wicket.markup.repeater.AbstractRepeater.onRender(AbstractRepeater.java:100)
at org.apache.wicket.Component.render(Component.java:2361)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1298)
at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:640)
at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
at org.apache.wicket.Component.renderComponent(Component.java:2524)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
at org.apache.wicket.Component.render(Component.java:2361)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1298)
at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1402)
at org.apache.wicket.Component.renderComponent(Component.java:2524)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
at org.apache.wicket.Component.render(Component.java:2361)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1298)
at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:640)
at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
at org.apache.wicket.Component.renderComponent(Component.java:2524)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
at org.apache.wicket.Component.render(Component.java:2361)
at org.apache.wicket.Component.renderComponent(Component.java:2464)
at org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:785)
at org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:662)
at org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:577)
at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1245)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:532)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.doculibre.constellio.filters.SetCharacterEncodingFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.doculibre.constellio.filters.LocalRequestFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Markup

The problem is in "file:/D:/LOG_DEV/constellio_standalone_2.0M2/tomcat/webapps/constellio/WEB-INF/classes/com/doculibre/constellio/wicket/panels/admin/searchInterface/generalOptions/advancedSearch/AdvancedSearchOptionsPanel.html":


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:wicket="http://wicket.sourceforge.net">
<wicket:panel>
    
    <input id="enabled" type="checkbox" wicket:id="enabled"/>
    <label for="enabled"><wicket:message key="enabled">[enabled]</wicket:message></label>
    <br></br>
    <wicket:message key="initialRules">["initialRules"]</wicket:message>
    <select wicket:id="initialRules"></select>
    
    <table class="dataAdmin">
        <tr wicket:id="enabledRulesHeader">
            <th><wicket:message key="indexField">[indexField]</wicket:message></th>
            <th><wicket:message key="indexFieldEnabled">[indexFieldEnabled]</wicket:message></th>
            <th><wicket:message key="autocomplete">[autocomplete]</wicket:message><span style="color:red; font-weight: bolder">*</span></th>
        </tr>
        <tr wicket:id="enabledRules">
            <td><span wicket:id="indexFieldName"></span></td>
            <td><input type="checkbox" wicket:id="enabled"/></td>
            <td><input type="checkbox" wicket:id="autoComplete"/></td>
        </tr>
    </table>
    <p style="color:red; width: 320px;">* <wicket:message key="needReindex">[key]</wicket:message></p>
</wicket:panel>
</html>


Did I miss something? The autocomplete parameters seem correctly defined. I've tried HTTP and DB connectors for the collections. They all generate this type of error.

Thanks in advance for your help,

Cédric



Bin Duan

unread,
Nov 6, 2013, 10:16:37 AM11/6/13
to const...@googlegroups.com
Hi Cédric,
 
I have checked that there is a little mismatch in our code which will cause this problem, and we will fix it in our next version. Thanks for your information and if you need this function right now, I can compile a sepcial version for you:)
 
Bin,

Cédric Maria-Sube

unread,
Nov 6, 2013, 2:51:54 PM11/6/13
to const...@googlegroups.com
Thanks Bin for your quick reply :).

When do you think the next version will be available?

Cheers,

Cédric

Nicolas Bélisle

unread,
Nov 6, 2013, 2:53:22 PM11/6/13
to const...@googlegroups.com
We're planning a release before Christmas featuring SolrCloud and many bugfixes. 
Possibly new connectors too. 

Regards, 

Nicolas

2013/11/6 Cédric Maria-Sube <cedr...@gmail.com>

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes Constellio.
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse constellio+...@googlegroups.com.
Pour envoyer un message à ce groupe, adressez un e-mail à const...@googlegroups.com.
Visitez ce groupe à l'adresse http://groups.google.com/group/constellio .
Pour plus d'options, visitez le site https://groups.google.com/groups/opt_out .

Cédric Maria-Sube

unread,
Nov 7, 2013, 4:25:51 AM11/7/13
to const...@googlegroups.com
In that case, if I can have a fixed version now, that would be perfect.

How can I proceed to receive it?

Thank you,

Cédric

Bin Duan

unread,
Nov 7, 2013, 9:49:03 AM11/7/13
to const...@googlegroups.com
Hi Cédric,

I have a easier way to solve this, just locate the java file in your version at com.doculibre.constellio.wicket.panels.admin.searchInterface.generalOptions.advancedSearch.AdvancedSearchOptionsPanel.java, change the word "autocomplete" to "autoComplete" at line 236, and after a recompile and redeployment, you will kick off the bug:)

Bin, 


2013/11/7 Cédric Maria-Sube <cedr...@gmail.com>

--

Cédric Maria-Sube

unread,
Nov 7, 2013, 9:59:26 AM11/7/13
to const...@googlegroups.com
Indeed ;).

Sorry for the trouble, and thanks for the help.
Reply all
Reply to author
Forward
0 new messages