i have a question regarding the back/next button label for primefaces wizard. It is possible to customize the navigation button label like the following example:
Button label at step 0 -> Show button label text "Next 1"
Button label at step 1 -> Show button label text "Next 2" and button back label "Back 1"
Button label at step 2 -> Show button label text "Next 3" and button back label "Back 2"
...
Best regards,
Mux
Yes the component has two attributes the nextLabel and backLabel.
https://primefaces.github.io/primefaces/7_0/#/components/wizard?id=attributes
nextLabel null String Label of next navigation button.
backLabel null String Label of back navigation button.
Then do..
<p:wizard widgetVar="wgtWizard" nextLabel="Next #{component.step}" backLabel="Back #{component.step}">
But since the #component.step is not evaluated on every step you have to do it with JQuery JS code like this following:
var wizard = PF('wgtWizard');
var stepIndex = wizard.getStepIndex(wizard.currentStep);
wizard.nextNav.find('.ui-button-text').text('Next ' + stepIndex);
wizard.backNav.find('.ui-button-text').text('Back ' + (stepIndex-1));
Just execute that JS code on the wizard 'onback' and 'onnext' JS methods.
Related
I have the following code:
TextField vSuchenTextfield = new TextField("");
vLblSuchfeld.setMnemonicParsing(true);
vSuchenTextfield.setPromptText("Suchbegriff eingeben");
vLblSuchfeld.setLabelFor(vSuchenTextfield);
when I click on the vLblSuchfeld label with the mouse,
the text field vSuchenTextfield is not activated. What am I doing wrong?
If you want to bring focus to the textfield when you click on the label, I suggest you implement the following (untested) code:
TextField vSuchenTextfield = new TextField("");
vLblSuchfeld.setMnemonicParsing(true);
vSuchenTextfield.setPromptText("Suchbegriff eingeben");
vLblSuchfeld.setOnMouseClicked(event -> {
vSuchenTextfield.requestFocus();
});
I have two buttons YES and NO.
If user click on the yes Button the Dropdown menu like Spinner should appear
which contains other parameters related to Yes.
user will select one Parameter from that menu(dropdown menu)
I used this line for spinner button
android:background="#android:drawable/btn_dropdown"
OnClick method for Button:
ArrayList<String> spinnerArray = new ArrayList<String>();
spinnerArray.add("one");
spinnerArray.add("two");
spinnerArray.add("three");
spinnerArray.add("four");
spinnerArray.add("five");
ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, spinnerArray);
spinner.setAdapter(spinnerArrayAdapter);
spinner.setOnItemSelectedListener(this);
with this code my button is look like spinner but on Click dropdown menu not appearing.
How to do this.?????
set your spinner launch mode to dialog android:spinnerMode=dialog this will display a dialog on click and let the user choose a option.
I am implementing a datagridview and a button on it using below code:
$Column2 = $TR = New-Object System.Windows.Forms.DataGridViewButtonColumn
$Column2.width = 150
$Column2.name = "App Data"
$Column2.FlatStyle = 'Standard'
$DataGridView1.Columns.Add($Column2)
$Column2.UseColumnTextForButtonValue = $true
$Column2.AutoSizeMode = 'DisplayedCells'
$TR.Text = "Change Data"
When I click another button (not the one implemented on grid), I need to change the text of button implemented on grid to something. For example, from "Change Data" to "Delete Data".
And also how do I implement Click event for button implemented on the grid.
Thanks heaps for your help!
Nratawa
I have a 2 tabpanels in my tabcontainer and both the panel has their own header text.
I have put the tabcontainer inside a table.
Above the table (OR tabcontainer) I have a label and what I am trying to do is ... changing the label text as per tab selection ... code below:
if(tabcontainer.activetabindex == 0)
{
label1.text = tabpanel1.headertext;
}
else {label1.text = tabpanel2.headertext;}
But this is not working ... even if I select the panel2 my label displays the same text as panel1 header text ... it's not changing as I want.
Am I doing anything wrong? Please help.
Thanks,
Rahul
TabContainer changes active panel without postback, so your code doesn't fire.
You have to create javascript code and call it on tabchange in browser.
I have added a button to a tab panel in the center region by calling
var add = tabSelection.addButton({
id : 'add',
text : 'Add',
hidden : true,
tooltip : 'Please highlight the correct value and click Add to create new contact',
handler : addContact
});
There are two radio buttons in the west region in an accordion layout, labeled 'internal' and 'external'. I want the tool tip to be changed dynamically by capturing the radio button click.
I am able to capture the radio button click and when I set the tooltip of the button accordingly,
add.setToolTip('Please highlight the correct value and click Add to create new internalcontact'); if internal client is clicked.
add.setToolTip('Please highlight the correct value and click Add to create new external contact'); when external is clicked.
You need to initialise tooltips for it to work:
Ext.QuickTips.init();
And use qtip instead of tooltip.
Also worked for me (on ExtJS 4.1):
Ext.getCmp('buttonId').setTooltip('Tooltip you want to insert');
Another solution without using id, for e.g. with a button tooltip:
var prev_button = new Ext.button.Button({
cls: 'prevButton',
listeners: {
mouseover: function(btn) {
btn.setTooltip('1 ' + granularity.getValue()
+ ' ' + _('before'));
}
}
});