Hi Sameera, I resolved the issue using jquery.form.js and ajaxForm method as you suggested. Using the preventDefault() method, the issue in click event was also fixed.
Thank you. Dilini Mihindra Mampitiya Arachchi Intern - Software Engineer WSO2 Inc. Mobile: +94 710 420 550 Email: dili...@wso2.com <http:///dilinimampitiya.wordpress.com> <https://twitter.com/dilu_7392> On Mon, Apr 4, 2016 at 12:57 PM, Sameera Medagammaddegedara < samee...@wso2.com> wrote: > Hi Dilini, > > I am sorry I made a mistake in the previous mail. The suggested solution > will only work for the click events, you will still experience the same > behaviour when pressing enter within the form. > > Please use the JQuery Form plugin along with the ajaxForm method [1] > > *Reference* > [1] http://malsup.com/jquery/form/#api > > On Mon, Apr 4, 2016 at 12:50 PM, Sameera Medagammaddegedara < > samee...@wso2.com> wrote: > >> Hi Chathura, >> >> Some fields supported by this search feature are not included in RXT. For >>> example, a process can have associated PDF files and the input provided for >>> the "Document content" field should match content of such PDF files (using >>> a Lucene based search). Therefore, I think the default advanced search >>> feature provided by ES cannot be used here. >>> >> My apologies I was not aware of this use case. >> >> @Dilini >> In the event callback which is registered for the search button click you >> will need to invoke the preventDefault function to by pass the default >> behavior of the submit button [1]. >> >> *Example* >> >> $('#process-search-btn').on('click',function(e){ >> >> e.preventDefault(); >> >> //Rest of the business logic >> >> }); >> >> Since an action attribute has not been specified in the default behaviour >> of the submit button is causing the request to be made to the create page >> itself [2]. >> >> *Reference* >> [1] https://api.jquery.com/event.preventdefault/ >> [2] >> http://stackoverflow.com/questions/1818249/form-with-no-action-and-where-enter-does-not-reload-page >> >> >> Thank You, >> Sameera >> >> On Mon, Apr 4, 2016 at 12:22 PM, Chathura Ekanayake <chath...@wso2.com> >> wrote: >> >>> Hi Sameera, >>> >>> Some fields supported by this search feature are not included in RXT. >>> For example, a process can have associated PDF files and the input provided >>> for the "Document content" field should match content of such PDF files >>> (using a Lucene based search). Therefore, I think the default advanced >>> search feature provided by ES cannot be used here. >>> >>> Regards, >>> Chathura >>> >>> >>> On Mon, Apr 4, 2016 at 12:12 PM, Dilini Mihindra <dili...@wso2.com> >>> wrote: >>> >>>> Hi Sameera, >>>> >>>> I am performing the search from the "Add New Process" page (with the >>>> url https://localhost:9443/publisher/assets/process/create). >>>> >>>> For convenience, I included the code in a document that is attached >>>> herewith. >>>> >>>> Thank you. >>>> >>>> Dilini Mihindra Mampitiya Arachchi >>>> Intern - Software Engineer >>>> WSO2 Inc. >>>> Mobile: +94 710 420 550 >>>> Email: dili...@wso2.com >>>> <http:///dilinimampitiya.wordpress.com> >>>> <https://twitter.com/dilu_7392> >>>> >>>> On Mon, Apr 4, 2016 at 11:01 AM, Sameera Medagammaddegedara < >>>> samee...@wso2.com> wrote: >>>> >>>>> Hi Dilini, >>>>> >>>>> *https://localhost:9443/publisher/assets/process/create?process-name=abc&process-provider=&process-tags=&process-description=&process-version=&process-lcState=&process-owner= >>>>>> <https://localhost:9443/publisher/assets/process/create?process-name=abc&process-provider=&process-tags=&process-description=&process-version=&process-lcState=&process-owner=>* >>>>>> >>>>>> Is this something default provided by ES? >>>>>> >>>>> No >>>>> >>>>> Instead of searching a process by name only, when a user adds a >>>>>> sub-process for a new process, I am implementing the functionality to do >>>>>> an >>>>>> advance search using more filters (ex: name, version, owner, description >>>>>> etc.) >>>>>> >>>>> This functionality is already present in the ES.The search query >>>>> supports all attributes present in the RXT definition. >>>>> >>>>> If so, how can I prevent this to show the search results once the user >>>>>> submits the form? >>>>>> >>>>> Can you please provide the following details: >>>>> >>>>> - From which page are you performing the search? >>>>> - Can you please provide a link/source to the custom template >>>>> files and the client side JavaScript used to implement the >>>>> functionality? >>>>> >>>>> >>>>> Thank You, >>>>> Sameera >>>>> >>>>> On Mon, Apr 4, 2016 at 10:26 AM, Dilini Mihindra <dili...@wso2.com> >>>>> wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I am currently working on an advance search functionality in the >>>>>> Process Center. Instead of searching a process by name only, when a user >>>>>> adds a sub-process for a new process, I am implementing the functionality >>>>>> to do an advance search using more filters (ex: name, version, owner, >>>>>> description etc.) >>>>>> >>>>>> However, when I enter a value in one of the search fields and click >>>>>> the search button or press enter, the response is redirected to the >>>>>> following. >>>>>> >>>>>> *https://localhost:9443/publisher/assets/process/create?process-name=abc&process-provider=&process-tags=&process-description=&process-version=&process-lcState=&process-owner= >>>>>> <https://localhost:9443/publisher/assets/process/create?process-name=abc&process-provider=&process-tags=&process-description=&process-version=&process-lcState=&process-owner=>* >>>>>> >>>>>> Is this something default provided by ES? If so, how can I prevent >>>>>> this to show the search results once the user submits the form? Any help >>>>>> would be highly appreciated. >>>>>> >>>>>> Thank you. >>>>>> >>>>>> Dilini Mihindra Mampitiya Arachchi >>>>>> Intern - Software Engineer >>>>>> WSO2 Inc. >>>>>> Mobile: +94 710 420 550 >>>>>> Email: dili...@wso2.com >>>>>> <http:///dilinimampitiya.wordpress.com> >>>>>> <https://twitter.com/dilu_7392> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Sameera Medagammaddegedara >>>>> Software Engineer >>>>> >>>>> Contact: >>>>> Email: samee...@wso2.com >>>>> Mobile: + 94 077 255 3005 >>>>> >>>> >>>> >>> >> >> >> -- >> Sameera Medagammaddegedara >> Software Engineer >> >> Contact: >> Email: samee...@wso2.com >> Mobile: + 94 077 255 3005 >> > > > > -- > Sameera Medagammaddegedara > Software Engineer > > Contact: > Email: samee...@wso2.com > Mobile: + 94 077 255 3005 >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev