× Welcome to the ToolsJX forum!

How to add new field in web page of ToolsJX

  • s94goran
  • s94goran's Avatar Topic Author
  • Offline
  • New Member
  • New Member
9 years 2 months ago #2971

I have a great performance issue and I need to place a new field (check box) on a web page which will alter how search is done with ToolsJX to make it quicker.

I have a db-view which uses many tables with complex joins. One table (storage) is 100000+ rows.
My thinking is to split the big table into two tables - storage and storage_archive and have a UNION when needed.

When a row in storage is approved it normally will get a boolean set to true but now instead I want the whole row to be MOVED to storage_archive.

Almost every search is good enough to only search in storage which usually contains only 100 rows. The check box will be named something like "include archived rows in search (takes long time)"

I know I am a bit out of topic here because ToolsJX is not about check boxes =) How ever the result of dynamically enable the UNION between the tables will affect what the grid will present.

Please advice me with a
-best practice
-link or reference to web sites on how to build this
I understand that part of this is fundamental Joomla/php programming but anyway I need guidance on where to look/read further.

Thanks a million for your wonderful component and effort. You are the best =)


Please Log in or Create an account to join the conversation.

9 years 2 months ago #2978


I hope you are more or less fluent in PHP and JavaScript. Take a look into /components/com_grid/GridBuilder.php. There is a SearchForm function where the search form is generated. You can add your checkbox there.

Next take a look at /components/com_grid/grid.js there is a JS function searchjx. This function is called every time you click on something. The function pulls values from search form fields and generates get parameters for the url that is used for ajax call.

Next take a look at GridBuilder.php towards the top the get parameters are extracted and used later on in the query generation. You have to twink this file a little to get it running.



Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.182 seconds

Contact Us

Contact us on Facebook