Skip to main content
16-Pearl
June 5, 2015
Solved

Configure Auto Suggest Picker (SuggestTextBox) on object creation page?

  • June 5, 2015
  • 1 reply
  • 5953 views

Hi All,

I am trying to implement Auto Suggest picker (SuggestTextBox) on WTDocument/WTPart creation wizard in Windchill 10.1. Does anybody have done this before?

Can anyone please help me on this?

Appreciate your help.

Regards,

Shirish

Best answer by BineshKumar1

I think we did something similar in one of our projects. We created a custom wizard to add additional data input fields.

if you want to auto fill user,organization or context, I remember we have it OOTB. But for custom  objects, you will have to create a suggestion class (implementing Suggestable interface) which would basically do the query. This class should be registered as a service, This service could be called from suggestTextBox wrapper tag.

Thanks

Binesh
Barry Wehmiller International

1 reply

1-Visitor
June 10, 2015

I think we did something similar in one of our projects. We created a custom wizard to add additional data input fields.

if you want to auto fill user,organization or context, I remember we have it OOTB. But for custom  objects, you will have to create a suggestion class (implementing Suggestable interface) which would basically do the query. This class should be registered as a service, This service could be called from suggestTextBox wrapper tag.

Thanks

Binesh
Barry Wehmiller International

16-Pearl
June 10, 2015

Hi Binesh,

Yes, you're correct. I followed same approach (create a Suggestion class which implements Suggestable Interface).

I am able to make IBA text field to behave like a suggestible; however when I type something in the field it spins for a while and nothing is returned as suggestions.

In the MS logs below exception is logged:

ERROR : com.ptc.mvc.controllers.ExceptionController  - message : An unexpected error has occurred.  Contact your system administrator for assistance.

error:-------------java.lang.NullPointerException

java.lang.NullPointerException

        at com.ptc.core.components.suggest.SuggestableFactory.getSuggestions(SuggestableFactory.java:75)

        at com.ptc.jca.mvc.controllers.SuggestController.processRequest(SuggestController.java:96)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)

        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)

        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)

        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)

        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)

        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)

        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:574)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

        at com.ptc.jws.servlet.filter.WsdlServletFilter.doFilter(WsdlServletFilter.java:61)

In the UI it is behaving like this:

      Suggestable Picker.png

Note sure if I am missing something. I can share step-by-step instructions I followed to implement this feature.

Regards,

Shirish

1-Visitor
August 18, 2015

Hello Shirsh,

Can you please share your instructions?

I rencetly worked on auto suggest and it is working for me.

One thing I need to figure out is how to add a button to the Auto Suggest field and seen in the screenshot you posted.

Thank you,

Chaitanya A. Jagdale