Tim Resh

Ranch Hand
+ Follow
since Aug 09, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tim Resh

I have a xy line chart where each plotted point can be clicked ( I can specify a url or call a javascript function for each point you click on the chart). on the same page I have a datable displaying all the datapoints that make up the chart. This ends up being to much data to digest for the user. The user has requested that I only display the datapoint that the user clicks on in the same page under the xy chart. I am unsure of what to put in the clickable link(datapoint) and how to have the datatable filter the information from the clicked link on the same page. Any help or ideas would be appreciated.

below is my code for displaying




2 years ago
JSF
Thanks Tim, as usual your replies are of great help to me.


Tim Resh
2 years ago
JSF
SelectableDataModel is an interface only.


I changed everything back to ListDataModel and I get the following error. My datatable setup is included below. Some guidance would be appreciated.

Nov 18, 2015 3:23:01 PM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
SEVERE: Error Rendering View[/rem40/projectListEdit.xhtml]
java.lang.ClassCastException: javax.faces.model.ListDataModel cannot be cast to java.util.List
at org.primefaces.component.datatable.DataTable.findSelectedRowKeys(DataTable.java:1254)
at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:801)
at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:788)
at org.primefaces.component.datatable.DataTableRenderer.encodeRegularTable(DataTableRenderer.java:281)
at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:243)
at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:85)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)




2 years ago
JSF
I tried the ListDataModel but I get the following error

javax.faces.FacesException: DataModel must implement org.primefaces.model.SelectableDataModel when selection is enabled.

I will change my ListDataModel to SelectableDataModel and see what happens.
2 years ago
JSF
I have a datatable which has multiply command buttons in a single column for each row and I need to determine which button was clicked? Both buttons need to select the selectedProject so the target is the same for each button. How do you determine which button was clicked in order to select the project and then perform either an "Edit" or "Drill Down"?


2 years ago
JSF
Tim, I got everything working except I am always getting the wrong values since everything is determined at page load. I can't seem to get a refresh of the data . Here is the whole JSF file.

2 years ago
JSF
Tim, I'm not sure I am understanding exactly what you are saying, this is the last thing I tried and it did not work. Even my js code is not creating a chart anymore. I use the OnShow to call the code to create a chart where ever "mycube" is.

2 years ago
JSF
I need to get values from the Model using javascript. I have tried using #{model.field} but it only retrieves the value at the time of the model display. I need to put a button on the form and on the actionlistener go get the new data and then execute some javascript to display the data. An example would be to show a xy scattered plot graph with the current information from the screen which would be the most recent information being typed in and saved via the command buttom. I have tried using a dialogue and the oncomplete to execute the java script but the data is not updated. Any ideas on the correct approach to this would be great.

Thanks

Example code I tried
2 years ago
JSF
Tim, have you ever used butterfaces, omnifaces, or any other packaged JSF components?
2 years ago
JSF
Thanks Tim, yes I remember struts doing the same. I just wanted to make sure I was not missing anything. I am supporting both types of logins now. It just takes a change in properties file to use glassfish login. I also have to support Tomcat which does not have a nice user maintenance option. I'll take any thoughts on this if you have a better idea for tomcat. I also have to support a CAC card login, hence the properties file to control login ability. My login table also has all my user settings like theme, authorization to different screens and projects numbers, so I have to have a user login table anyway.
2 years ago
JSF
I'm developing a JSF web app with primefaces. I have noticed that if I have an error in any single xhtml page within my web app that my login xhtml does not work anymore. Once I fix the error my login page starts working.

for example: I am working on cubeConfigEdit.xhtml and it currently is not finished. My login.xhtml does not work until cubeConfigEdit.xhtml is finished and error free. This happens regardless of which page I am working on. Once the page is error free the login page starts working again. The error I see in the login.xhtml page via the browser is

XML Parsing Error: no element found Location: http://localhost:8080/pm2App/login.xhtml Line Number 1, Column 1:


Is this by design or is their a setting that overrides this behavior?

Any ideas?
2 years ago
JSF
I got it working. Vertical text within a row/column on a panelgrid. here's how;

1) put the above style text in a file called verticalStyle.css and then use

at the top of your xhtml file.

2) use the following to display text 90 degree clockwise


You will have to do some changes to any other fields or output as this will overlay the output without regards for height of the field.

Hope this makes sense
2 years ago
JSF
I am trying to insert some html tag like the following into a primefaces xhtml page but it does not display on the output with the other primefaces tags





This uses a css3 tags to rotate the text 90 degrees so I can have a word next to my graph that is vertical. Apparently jsf strips out the html tags.

Anybody ever tried this? How do you put in formatting to make the xhtml pages pretty and not plain, any suggestions? I already have the theme support but it still is pretty rough look.
2 years ago
JSF
Thanks Tim, I agree with all that you have said. I try to keep display and screen handling with detached entities and just merge them at the DAO to avoid DB and Entity locks. The extra layer avoids many problems in a multi user webapp.

I will look into the Spring Repository features you have described. I have never used Spring so this will give me the opportunity to try it out.

As for the Primefaces problem with orderlist, I have not been successful in making it work so I am switching to a dataTable since I can display additional info per row and allow sorting by columns. I thought orderlist would have been neat way for the user to order my list but no joy.

Once again Thanks for all your input.
2 years ago
JSF
Tim, I am getting no list of data just the surrounding box plus the controls for the orderlist. typesvaluesController.configValuesEntities does have 7 entries but does not display them. As for the other comments you are right I am not using EJB's. I am using JPA with Hibernate but I have never tried Spring. Do you know of any good examples of Spring JPA ORM and injecting them in a JSF backing bean?

I use a POJO maker and then add my annotations for JPA. I prefer annotations over xml configuration as it means less possible mistakes on my part.

Yes, I now know they are Models as you have pointed out before, unfortunately I cannot change Netbeans. I guess I could rename them, but I have a ebook called Primefaces Beginners Guide and they even call the JSF backing beans controllers, go figure.

I really appreciate all the help you give.

Thanks
2 years ago
JSF