Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Browse subform

Questions related to using nuBuilder Forte.
Locked
stevedb
Posts: 21
Joined: Tue Oct 16, 2018 12:21 am

Browse subform

Unread post by stevedb »

Hi,

Is it possible to have a subform that will just show the browse form?

I have a system where log entries are made and I want the form that launches the new log entry form to show the [read only] log history (along with some other stuff).

I can kind of do it with an edit subform with the objects set to readonly, but the browse form is nicer because it's paged and I can call-up related fields in the forms browse SQL.

Steve
stevedb
Posts: 21
Joined: Tue Oct 16, 2018 12:21 am

Re: Browse subform

Unread post by stevedb »

Hi,
I did it with an iframe; removing the breadcrums etc from the top with:

Code: Select all

nuRemoveHolders(1,2);
I also disabled clicking with a do nothing nuSelectBrowse function:

Code: Select all

function nuSelectBrowse(e) {
}
... but ...

I'm struggling to find the onmouseover event for the record highlighting which I would like to disable.
Also, if I try to remove the 'Action Holder' in nuRemoveHolders (value '0') the browse form's page navigation buttons don't work correctly, they just blank the browse records and you can't navigate back to get them back. This has nothing to do with it being in an iframe - it does it if it is the main form as well. This is either a 'bug' or at least a condition I need to protect against - but I'm not entirely sure where/how I would do that.

Steve
kev1n
nuBuilder Team
Posts: 4301
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Browse subform

Unread post by kev1n »

I have this code in a (iframe) form of mine to disable/modify some elements. The record navigation still works as it should (for me)

Code: Select all

if (nuFormType() == 'browse') {

   // disable record highlighting
   $("div[id^='nucell_']").unbind('mouseenter mouseleave');
					
   $('.nuActionButton').hide();
   $('#nuSearchField').hide();
   $('#nuActionHolder').hide();
   $('#nuBreadcrumbHolder').hide();

   // $('body').css('height', '200px'); // modify the height if you need this
   // $('#nubody').css({'background-color': '#F4F8F9' }); // modify the hex color if you need this
   $("[id^='nusort']").attr('onclick','');    	
}


function nuSelectBrowse(e) {
   // do nothing
}
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Browse subform

Unread post by admin »

stevendb,

You can do want you are asking by using a Run Object that uses the Browse Form you want to display and set the Method to Iframe.

https://wiki.nubuilder.cloud/ ... #Tab_-_Run


Steven
stevedb
Posts: 21
Joined: Tue Oct 16, 2018 12:21 am

Re: Browse subform

Unread post by stevedb »

Thanks kev1n, That's working perfectly!

For completeness ..
Seems that the browse form pagination problem is down to the removing of the nuActionHolder

Code: Select all

$('#nuActionHolder').remove(); // breaks pagination
$('#nuActionHolder').hide();   // works fine
As far as I can tell this is due to the pagination usage of nuSearchAction which uses elements in the nuActionHolder; which aren't there if you remove the nuActionHolder with nuRemoveHolders. Maybe there should be a nuHideHolders.

Steve
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Browse subform

Unread post by admin »

.
Locked