Any idea to implement a way for user to quick locate to a specific menu item?

My project has hundreds of menu items, even they are categoried to levels of groups, it still not quick for user to locate a specific menu.

So I want to implement a quick search box, so that user can input parts of the menu content into the box, and it promote the matched ones, then user can select one and the box help navigate to the menu function.

Any ideas?

Hi @anjingjing,

There is a component, that implements exactly what you are looking for: Rich Search – CUBA Platform (it has gif images in the page, click on them to see the animation). Hope if fits.

Regards,
Aleksey

3 Likes

Thanks Aleksey. I forgot to the mention that I have tried this add-on before I post my topic, problem is I am using Cuba6.6.4 while it supports 6.8; after integration, it trys to fetch some not exists sec_filter fields.

I was told that higher version has big change on Single-sign-on, so it may take lots of time for me to upgrade,so I did not prefer to upgrade my cuba-version.

Any other suggestions? Or upgrade my cuba-version could be fast way?

Moreover,I have live system which customer is using online. If I upgrade Cuba version, I need to make sure live system works well, expecially the SSO feature works. So seems many research work needed. Do you have any idea about the effrots of upgrade cuba version?

Thanks again for your quick reply~

Hello, @anjingjing!

I downgraded Rich Search Addon to CUBA 6.6.4 specially for you :wink: (in separate repostiroy)

Please test it and write if there are questions.

(There are no styles and groups - they no compatibility with 6.6)

1 Like

Hi Zharenov,
Thank you. I will try in my project.

I searched internet to find a sentence to express my thanks, I did not find one. Please know that I really appreciate it, I was supprised.:smile:

1 Like

Thanks!

Glad to help.

Hi Zharenov,
unfortunately, it does not work with my application. I started a simple Cuba app using 6.6.4 and it works. But not with my app, maybe my app is complicated(the UI things/DB things are not creeated in cuba studio, this app was tranferred to me recently, I don’t know how the menu/other things created, it works well and I can see the xml, config files, but not show in studio). Below are the details, could you suggest how to analyze next step? The error thrown from cuba source code, I am not sure how to analyze next. Please help.

Below are details I have so far:

  1. firstly, I guess it may related to the way that my app designed/coded, you can see that UI/data modal not shown in studio; but there are indeed data model and menus/UIs exist in my app.
    image image

  2. while I try to import the add-on, after click ok, it threw error:
    image

Below is the studio log, could you share some clue about the analysis next?

2018-06-01 16:46:17,762 INFO  [com.haulmont.studio.backend.u.a] Sending usage statistics
2018-06-01 16:46:30,487 DEBUG [org.gradle.tooling.GradleConnector] Connecting from tooling API consumer version 3.4.1
2018-06-01 16:47:18,565 ERROR [com.haulmont.studio.ui.app.App] Exception occured
com.vaadin.server.ServerRpcManager$RpcInvocationException: Unable to invoke method click in com.vaadin.shared.ui.button.ButtonServerRpc
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:160)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:119)
at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:444)
at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:409)
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:274)
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1436)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:385)
at com.haulmont.studio.ui.app.aY.service(SourceFile:90)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158)
... 28 more
Caused by: com.vaadin.event.ListenerMethod$MethodException: Invocation of method buttonClick in com.haulmont.studio.ui.i failed.
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163)
at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1037)
at com.vaadin.ui.Button.fireClick(Button.java:377)
at com.vaadin.ui.Button$1.click(Button.java:54)
... 33 more
Caused by: java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
at java.util.regex.Matcher.reset(Matcher.java:309)
at java.util.regex.Matcher.(Matcher.java:229)
	at java.util.regex.Pattern.matcher(Pattern.java:1093)
	at java.util.regex.Pattern.split(Pattern.java:1206)
	at java.util.regex.Pattern.split(Pattern.java:1273)
	at com.haulmont.studio.backend.p.b.c(SourceFile:135)
	at com.haulmont.studio.backend.p.p.a(SourceFile:52)
	at com.haulmont.studio.ui.n.aL.a(SourceFile:438)
	at com.haulmont.studio.ui.n.aL.b(SourceFile:387)
	at com.haulmont.studio.ui.i.buttonClick(SourceFile:207)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
	... 38 more
2018-06-01 16:47:18,568 INFO  [com.haulmont.studio.backend.u.a] Sending usage statistics

It is strange. But you can add the component manually.

  1. Add dependency to build.gradle

    dependencies {
        ...
        appComponent("com.haulmont.addon.search:search-global:0.9-SNAPSHOT")
    }
    
  2. Add dependency to web.xml in core and web modules

    <context-param>
        <param-name>appComponents</param-name>
        <param-value>com.haulmont.cuba com.haulmont.addon.search</param-value>
    </context-param>
    

Hi @anjingjing,

It is impossible to make a blind guess what’s going wrong in your application. Dedicated support seems to be the best option for you - find more details here.

Regards,
Aleksey

1 Like