Initialize contents of Coldfusion tab on page load. - coldfusion

Using Coldfusion 9, I have a cflayout tab control with two tabs. The first tab loads when the page loads by default, which is fine. I would also like the contents inside the second tab to be initialized on page load instead of loading when the user clicks the tab, but I don't want to actually select the second tab. I want the first tab to be remain the default(selected) tab.

Related

How to add and modify new sections in the dropdown menu (CHROMIUM SOURCE CODE)?

I need to add new sections to the dropdown menu at the right on the top of the chromium browser, how can i create new sections that popping up after i click on them and they open in another tab like chrome://settings , chrome://about ecc. , and how can i modify the page inside of it ?
Looking foward,
Thanks

APEX 5.1.3 -- Clicking the Edit Button in the Report Page Shows a Form for Inserting a New Record

I am using APEX 5.1.3 to build a new desktop web application. I created a pair of Report and Form pages, and then ran the application, entered the report page. The data in the table was shown correctly, and each row contained a pencil icon at the leftmost column -- all looking fine.
However, when I clicked on the pencil icon to enter the Form page, instead of showing the record and let the user update the record, all columns became blank. The Save button was not there, instead the Create button appeared. This became the same behavior as clicking the Create button in the report page. What did I do wrongly, and how could I correct this behavior?
Seems I can find the answer after clicking the APEX edit page here and there...
I go to the edit page of the Report Page, on the left side, under Content Body, select Attributes.
On the Right side, under Link, click Target.
A new window appears at the center. I found the page no. is correct, but the Set Items aren't. Hence I click on the ^ button to select the correct column on the left, and values on the right. Click OK and then Save and Run the page. The problem is then corrected.
The reason for the problem is that for whatever reason, my original version has a value item which does not exist at all. Hence the data can't be brought to the form page when the edit button is clicked in the report page.

Set active tab when navigating from one tab to another by button click

I have been struggling with this for a while now. I'm trying to navigate to one tab (let's say Home) to another (let's say About). I'm able to navigate that either the page get's added to nav stack, but then it's not changing active tab. That, or then we use select to set the active tab, which means that I lose the navigation stack. Here's the latter option code:
export class HomePage implements OnInit {
tab: Tabs;
constructor(public navCtrl: NavController) {
this.tab = this.navCtrl.parent;
}
navigate() {
this.tab.select(1);
}
But this means that as mentioned, I lose the nav stack and can't use the back button that would show if I use push. That brings us to the other option, when I use .push():
this.navCtrl.push(About)
The active tab won't change, but still shows Home as the active tab, even though we are successfully navigated to About tab.
So what I wish for, is to have both the 'Back' button and the active tab (About) selected when I'm clicking the button to go to About from Home. Here's a demo with the push option, as you can see the active tab does not change: https://plnkr.co/edit/6KIL8mxfTMCsvACpiD1K?p=preview
PS. I looked at this question, but it wasn't useful to me: Changing tabs dynamically in Ionic 2
I'm using Ionic 3
I don't think this is how the tabs component is intended to work. With tabbed navigation you kind of have n navigation stacks (where n is the number of different tabs you have) which means if you .push() a new page on the nav-stack you push it on the stack of the currently selected tab.
Switching to another tab kind of is the same as starting with a new root, you start with the initial page ([root]="yourFirstPage") and can then add new pages to this particular nav-stack (and you can pop them off the nav-stack with a back button).
In you particular example you are trying to .push() the About page on the stack of the Home page and expect the NavController to know that you intended to switch to another stack and to push a new page to the new stack.
One solution to your problem could be to always remember the previous tab when you use .select() and display back button manually in the navbar which uses .select(previousTab) on click.
I hope that makes things clearer for you.
It's the default behaviour to act like this. When you select a tab it clears the nav stack and set the root to another page. When you push your about page when in home page you're pushing a new page in your home nav stack, this is why it doesn't change and shoudn't change.
The reason to use tabs is that you can segment and divide stuff in they correct categories. When updating a product you don't whant the user the see, for example, billing information in the same stack of products since it doesn't belongs to that category.
The .select() method (whose you've implemented in your home.page.ts) is the closest you can have from beeing able to select a tab without clicking in a specific tab.
What you can do is simply remove about from beeing a tab and push it in home OR remove the button to go from the home to about page, since there's already a tab for this.
In any case what you want to do is an error that Ionic team removed the possibilities from people doing.
Hope this helps you.

Sitecore: Programmatically Exit Edit Mode in Page Editor

When in Sitecore's Page Editor mode clicks the Edit button, I have a DIV's style set to
top: 0;
so that it appears on top of the Page Editor buttons (Save, Save and Close, Insert, etc..). This div prevents the content editor from using the normal Page Editor buttons and forces them to use the custom Save, Save and Close, and Close buttons that I have added to the DIV.
Is there a way to programmatically exit Edit mode whenever they click on my custom Close or Save and Close button? I do not want to log them out of the Page Editor (just exit them out of edit mode). I only have 1 page where I am doing this, so I would rather not get into changing configurations in Sitecore to achieve this.
Check out this post: In Sitecore, how to change or set PageMode
It looks like you can do:
Context.Site.SetDisplayMode(Sitecore.Sites.DisplayMode.Normal, Sitecore.Sites.DisplayModeDuration.ResetAfterRequest);
Or, you can add sc_mode=normal or sc_mode=preview to the URL's query string.

Passing a text field value into popup page using URL

I am trying to pass the value of a text field from one page to another using the URL but failing miserably.
The reason for this is as follows:
I have an apex page which displays a machines properties (make, model, what products it makes, machine ID (:P1_INPUT)). Some machines can only make one product, other can make a variety.
I use a query to complete the following: If the machine only makes one type of product , the product number is displayed in :P1_item. If a machine can make more than one product it displays in :P1_item the world 'multiple'.
I want to build in the ability to click on a button next to :P1_Item, a popup appears with the products the machine makes if ‘multiple’ is displayed. I have the popup bit working but its not passing my :P1_INPUT from the page to the popup page text field :P3_OUPUT
The following code i have on the button, so when it is clicked, it opens a popup page (this works) and should populate the text field (P3_OUTPUT) with the value passed from P1_INPUT (this doesnt work).
My button is set to Redirect to URL and i have this in the URL target.
javascript:popupURL('f?p=&APP_ID.:HELLOWORLD:&SESSION.:::&P3_OUTPUT.:&P1_INPUT.')
I cant use a branch because i dont want the main page showing the machine properties to submit.
Your URL is wrong: f?p=&APP_ID.:HELLOWORLD:&SESSION.:::&P3_OUTPUT.:&P1_INPUT. : you want to provide a value for the item P3_OUTPUT while you have set &P3_OUTPUT. which is a substitution string and would put the value of P3_OUTPUT in the string.
You need to set the URL to f?p=&APP_ID.:HELLOWORLD:&SESSION.::::P3_OUTPUT:&P1_INPUT., which would correctly set the value of P3_OUTPUT and add an extra semi-colon between the session identifier and the arguments-values pair.