JSF :: Updating Primefaces TabView Title
Mar 5, 2014
I have a TabView that generates the numbers of tabs, titles and content based off of the selected project from another field. I have managed to get it to load the proper number of tabs and content, but the first tab title displays the title of the first tab from the previous query.
The jsf is:
<h:panelGroup id="equipmentWrapper">
<p:tabView effect="blind">
<c:forEach items="#{databaseViewHandler.deviceTypes}" var="deviceType">
<p:tab title="#{deviceType.key}">
<ui:include src="#{deviceType.value}"/>
[Code] ....
And the method handling the content and number of tabs:
public DatabaseViewHandler() {
deviceTypes = new LinkedHashMap();
}
public Map<String, String> getDeviceTypes() {
return this.deviceTypes;
[Code] ....
The method findAssociatedEquipment() is called when it recieves a selected project to display.
The command button calls the update for panelGroup "equipmentWrapper". It updates fine for the ui:include and generates the correct number of tabs in the correct order.
So for example the first query might only generate one tab for an 881 device. Then if you select a project that should have a 2911 and 2960 it will correctly load both, but the title for the first tab will retain 881. Should you select a third it will have the title 2911 from the second project.
View Replies
ADVERTISEMENT
Nov 5, 2014
how to use a Primefaces TabView for input.
I have found this link that implements the behaviour of the TabView. It basically says to make my own Tab model.
But I want each tab to contain something like this:
I tried adding the inputTexts in my Tab model but it doesn't work, I guess I was way too optimistic :P
The only reason I want this is because I don't know how many tabs I need. It's totally dynamic, the number of Lectures is added on demand.
View Replies
View Related
Feb 24, 2011
I have developed a java GUI project. I put wrong name for my project. after some time i found it and then correct by right clicking and click rename tab.
Now i run my gui it shows old project name in title. i didnt get my new project name.. how can i change it to new name
View Replies
View Related
Mar 16, 2015
I change TreeTableColumn.text but I got a Exception
Exception in thread "JavaFX Application Thread" java.lang.ClassCastException:
javafx.scene.control.TreeTableColumn cannot be cast to javafx.scene.control.TableColumn
at com.sun.javafx.scene.control.skin.TableHeaderRow$10.invalidated(TableHeaderRow.java:277)
so I check TableHeaderRow . I find this method
private final InvalidationListener columnTextListener = new InvalidationListener() {
@Override public void invalidated(Observable observable) {
TableColumn<?,?> column = (TableColumn<?,?>) ((StringProperty)observable).getBean();
CheckMenuItem menuItem = columnMenuItems.get(column);
if (menuItem != null) {
menuItem.setText(getText(column.getText(), column));
}
}
};
why don't they use this
TableColumnBase<?,?> column = (TableColumnBase<?,?>) ((StringProperty)observable).getBean();
View Replies
View Related
Oct 4, 2014
i want to check my array for a title, if the title is there i want to call a method, if the title is not there i want an error message. I am not sure how to get this. i think my code would work if it didn't always finish the method. for example if true the method stops and does run whats after the for loop. but that isn't happening.
void markItemOnLoan(String title, String name, String date){
int i=0;
for (i = 0; i < numberOfItems; i++){
if (items[i].getTitle().equals(title)){
items[i].markOnLoan(name,date);
}
}
System.out.println("ERROR: Can not find that item. ");
}
View Replies
View Related
Jan 13, 2014
I developed a simple java gui . On running a frame opens with 5 buttons and each button opens another frame when selected. There are no errors and frames open and close as required however i see that only the main program frame has the icon and title that i assigned and the frames bieng called through the buttons have the default frame with java icon and no title although it's been specified in the code of these called frames. When these called frames are executed individually though the program the title and icon are displayed.
View Replies
View Related
Apr 9, 2015
I am familiar with php, but I don't know Java. We need a program, that will be able to scrape large amount of title tags from large sites, fast. I've been trying Seo Spider by Screaming Frog, and Xenu's Link Sleuth, but these programs are not good enough. They hang up, they save all the data in RAM, I think, and after a relatively short period of scraping, they stop working, become unresponsive, and so on.
Somebody recommended me getting a custom made program in Java, which would be able to scrape title tags only, from large sites (I am talking 25 - 50 million pages or more). I was told that it would not have a graphic interface, or anything like that. Nothing like this is needed too, we just need to have title tags.
View Replies
View Related
Dec 9, 2014
In a text file, I have individual titles (starting with ">" character), and under those titles, I have calculated values for a Counter. I want to search the entire text file for the highest counter under every title. After I get the highest counter, I would like to print it's title, name of the counter, and counter value. Example of the code I already have:
int letterCounter;
String line;
if (line.startsWith (">")) {
bw.write ("");
bw.write (line);
} else {
//code that counts how many total letters (letterCounter) under title
}
I am just trying to use basic concepts.
Sample of my text file:
>gi 91206428 ref NP_001035160.1 seven transmembrane helix receptor precursor [Homo sapiens]
letterCounter is 43
>gi 157412240 ref NP_001094800.1 C1GALT1-specific chaperone 1-like [Homo sapiens]
letterCounter is 7
>gi 117938299 ref NP_001071105.1 RAB6C-like [Homo sapiens]
letterCounter is 109
Sample of desired output:
>gi 117938299 ref NP_001071105.1 RAB6C-like [Homo sapiens]
letterCounter is 109
View Replies
View Related
Feb 23, 2014
I need to turn some strings from:
'1-the-high-street'
to:
'1 The High Street'
But...
if string is
'the-dog-and-duck'
I want to achieve
'The Dog and Duck'
...whereby the 'and' is NOT converted to title case
My code as follows:
String propertyPageTitle = "1-the-high-street";
propertyPageTitle = propertyPageTitle.replace("-", " ");
propertyPageTitle = WordUtils.capitalizeFully(propertyPageTitle);
System.out.println(propertyPageTitle);
prints: '1 The High Street'
How could I handle the second scenario so it does not convert 'and' to titlecase?
View Replies
View Related
Apr 29, 2014
I am using JSF2 with Primefaces. Here is my business requirement-Hidden field on JSF page should take the value from the session object that is set in managed bean. Session object is updated every time when the user submits the page. I am able to update the session object in the managed bean and able to get the value in the hidden field first time and after that i see the same value in the hidden field even though session object has different value. Here is the hidden field: <h:inputHidden id="xyz" value="xyz"/> i tried using sessionScope but still didn't work.
View Replies
View Related
Feb 20, 2015
I have a jTextPane set up and a panel with radioButtons. My jTextPane displays the contents of a text file I have chosen. The 3rd line, 4th index, displayed in my jTextPane specifies a value of type int. When I click my radioButton, I would like that value to increase by 1. So far, I have the following code. I tried to pane.setText(value + 1), but that doesn't seem to work. How do I update the value and display the updated value in jTextPane?
My code :
private final ActionListener actionListen = new ActionListener() {
for(String line: pane.getText().split("")){ String lineThree = line[3];
int value = lineThree.charAt(4); if(radioButton.isSelected()){
pane.setText(value+1); } }};
View Replies
View Related
Jul 25, 2014
Really need some simple and complete example on how to extends components (graphically and functionally) for primefaces 5.
For example I can't figure how to add custom attributes to existing component or define default values for existing attributes.
Is there any tutorial or a basic common way to achieve this goal or each component have to be extended in its way?
View Replies
View Related
Dec 31, 2013
I would like to create this type of chart with Primefaces (or another JSF API), what is the best component to use to do this:
[URL] .....
View Replies
View Related
Dec 23, 2012
i am having issues using the primefaces file upload, i have it set up, very much the same as the example version but it does not work, i never get the successful message and also where does it store the file once uploaded ?
heres my code so far :
web.xml
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
[Code]....
View Replies
View Related
Mar 22, 2015
i bought a theme from themeforest but the primefaces conflicts with the js of the theme. Is there any way to fix this conflict without changing all the js?
View Replies
View Related
Mar 20, 2015
The program runs well , it adds the applet but it dosn't update the interface unless I press "_"(Minimize) . To be more clear , the object paints a spring wich goes through 4 stages , it is added to the JFrame but it dosn't uptade until I minimize the frame , that is when it goes to the next stage .
The main class which calls the spring to be added to the frame :
public class principal implements ActionListener ,Runnable{
JTextField field;
JFrame frame;
private class Action implements ActionListener {
public void actionPerformed(ActionEvent event) {
frame.repaint();
[Code] .....
View Replies
View Related
Oct 18, 2014
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
[Code]....
I am trying to Make A GUI which has a Jcombo box i also want it to have a jlabel that up dates depending on which option the user selects from the JcomboBox
for exampl if i select lion i want it to say you chose lion on the Jlabel and if i choose ostrich i want it to say ostrich and so on
View Replies
View Related
Sep 26, 2014
I have two images. I want to be able to click them and kick off a call to a listener in Java to change a value in the bean. I also want the view to update my dropdown (labeled "menuModel") to either be rendered or not, depending on which image I click. Alternatively, I would be fine with the dropdown simply being disabled and enabled for the same criteria.
So far, the listener kicks off fine, and the value gets updated correctly in the bean. However, the view never gets updated. I have tried this a hundred different ways, but nothing seems to work. If I hit refresh on my browser, the view updates. But I want it to do it automatically.
I am using standard JSF 2.1.
<div style="font-family: Verdana; font-size: 10pt; color: #FFFFFF">
<h2>Calibrations</h2>
<h:form id="tunerSelectionForm" style="color: #000000">
<h:commandLink>
[Code] .....
View Replies
View Related
Jun 15, 2014
I have loaded the combo box at starting of program.When i am adding the element to combo box through database it's not updating visually.But the inserted data is successfully loaded in List.
void update_Attan() {
DefaultComboBoxModel nm = new DefaultComboBoxModel(new StudentMethods().update_combo_AttendanceType());
cmbStdAttType.setModel(nm);
}
View Replies
View Related
Sep 25, 2014
When I add an element to my array, I have to make sure that it stays a heap, ie every child is smaller than its parent. However the method that I am using for this, trickling up, is not updating the elements properly, it pretty much just leaves is as is.
Here is the relevant code:
public class MaxIntHeap {
int[] array;
int actualSize = 0;
public MaxIntHeap(){
array = new int[20];
[code].....
View Replies
View Related
Aug 14, 2014
Why the Progress Bar is not Working in Second attempt?When i am Invoking Below Method on actionPerformed at first attempt its Working Fine but After that Its Not Working at all....
void initWait() {
go.setEnabled(false);
browse.setEnabled(false);
choice.setEnabled(false);
wait.setVisible(true);
wait.setMinimum(0);
wait.setMaximum(Info.getMp3().length);
System.out.println(Info.getMp3().length);
wait.setStringPainted(true);
[code]...
for a better Understand see this Mp3Arranger.jar or see the Whole Project SourceCode
View Replies
View Related
Oct 22, 2014
My program is working fine. When I executes it, it shows me this:
The clock is 54 minutes over 23 (+41 seconds.
and when i press ENTER, it shows me this:
23:54:41
But then it won't show me the update. I want to update the time, for example when I started the execution the time was 23:54:41 but it must show me something like 23:54:45, because I need the current time.
I have searched the whole internet about this but I don't know how to use the "Date.update ();".
Here is my code
package p2;
import java.util.Calendar;
import java.util.Date;
import javax.swing.JOptionPane;
public class Time {
public void myTime() {
Calendar cal = Calendar.getInstance();
[Code] ....
View Replies
View Related
Mar 22, 2014
I'm having some problems styling the PrimeFaces upload tag <p:fileUpload /> in my application.
In my xhtml code I have the following:
<p:fileUpload id="fileUpload" fileUploadListener="#{filters.upload}"
allowTypes="#{filters.uploadTypes}" invalidFileMessage="#{filters.uploadBadType}"
sizeLimit="#{filters.uploadSize}" invalidSizeMessag="#{filters.uploadBadSize}"
update="fileUpload fileTable filterTab uploadMessage hiddenNum hiddenPhoto uploadError footer
namePhotSystem checkOverwrite"
description="Select Text File" disabled="#{filters.fileuploadDisabled}" fileLimit="1"
fileLimitMessage="You are only allowed to upload one file at a time"
styleClass="fileUploadClass" label="Choose the File to Upload" auto="true" />
This all works correctly, both the AJAX update and on the server, but I'm unable to get the button or buttons displayed in the way I need.
By including the following in my CSS:
.ui-fileupload.fileUploadClass {width:428px;}
.ui-icon-plusthick {display:none;}
.ui-button-text {width:200px; height:20px;}
the first sets the width of the button bar, and by looking at the HTML code generated by PrimeFaces, I discovered that the second hides the "+" to the left of the "Choose" button, which here has been replaced by the text "Choose the File to Upload". However, this text is displayed on two lines, with the word "Upload" on the second. I want the whole text to be on one line, but no matter what I do, I cannot get this to work properly. The third line of my CSS code does indeed reduce the height of the button, but the width does not work at all, and the last part of the text is simply lost. How do I put all the text on one line and adjust the width of the button?
Another question is that when I remove the auto="true" attribute from the tag, which I had originally, the "Upload" button is displayed to the right of the "Choose" button, and when a file is chosen but not yet uploaded, it is displayed below the button. This is a capability that I might still want, however, I am unable to style the display, and in particular the progress window to the right of the file name and size. All the files I want to upload are relatively small text files, and I want to adjust this window or even hide it completely. How is this done?
Incidentally, because the files are all quite small, I have disabled the display of the "Cancel" button, so either only the "Choose" button is shown, or the "Choose" and "upload" buttons.
View Replies
View Related
Nov 19, 2014
Currently I am having difficulties styling a particular prime faces element in a JSF application for work. I'm tasked with giving the ui a styling and color scheme acceptable to our project design. However I am finding myself unable to "hook" a particular pf element with an ID so that I can proceed with styling a imported .css file.
I'm trying to style the commandLink button to display in Orange 20px font with Italic but when I inspect the element in chrome after being rendered It doesn't even show its style linked to the assigned ID. The class style for mainMenuItem is being applied to the commandlink but is immediately over written by ui-widget. I'm trying to style that one single component(override/replace ui-widget with the properties in the #loggedInUserID)
Current .XHTML code and the css file has been linked with
<h:outputStylesheet library="css" name="masterPW.css"/>
<div class="mainMenuItem"><p:commandLink id="loggedInUserId" styleClass="maserPW.css" value="#{loginController.userFullName}"/>
</div><!--End of mainMenuItem-UserID div -->
[Code] ....
View Replies
View Related
Oct 2, 2011
<p:commandButton> of primefaces is not working but that same code working with <h:commandButton>Login bean is present with all valid getter and setter with loginAction
public String loginAction(){
if(userid.equals("ashok")&&
password.equals("admin")){
return "success";
} else {
return "login";
[code]....
View Replies
View Related
Jun 3, 2014
I have 4 Primefaces bar charts which sometimes renders, sometimes not. In one of them, I inject a http user session attribute and use it to render the chart (the idea is to show only the data that corresponds to the (logged in) user department).
There are 4 session beans which I'm using the javax.enterprise.context.RequestScoped. Sometimes, the Glassfish destroys the instance as expected, but sometimes not.Based on Exception below, how can I resolve it?
The xhtml below shows the main code for only 2 of the 4 bar charts:
<p:tab title="Horas de Treinamento (por Funci)" closable="true" >
<p:barChart id="horasBars" value="#{chartHorasFunci.modelHoras}"
legendPosition="ne"
orientation="horizontal"
seriesColors="AA5555, 00438F"
xaxisLabel="Horas" yaxisLabel="Funcis"
title="34 Horas de Treinamento (Orçado/Realizado) por Funci"
[Code] .....
The Exception:
SEVERE: Error Rendering View[/capacitacao/capacitacao/index.xhtml]
javax.el.ELException: /WEB-INF/include/capacitacao/capacitacao/List.xhtml @145,38 value="#{chartHorasFunci.modelHoras}": org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke private void br.com.bb.upb.diage.atb.capacitacao.beans.ChartHorasFunci.initialize() on br.com.bb.upb.diage.atb.capacitacao.beans.ChartHorasFunci@3e9c727c
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
[Code] .....
View Replies
View Related