Gm Miller

Greenhorn
+ Follow
since Jan 24, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Gm Miller

I'm using NetBeans 6.9.1, PrimeFaces 2.2RC1, JSF2, whatever Glassfish that comes w/ 6.9.1.

I'm trying to get past this error and cannot figure it out despite multiple internet searches on the topic.

Below are the code samples:
JSF2:


ManagedBeanCode:


Error Message from the GlassFish server:


The web page shows 10 patients initially. Checking the server log, the 8772 patients are documented in the System.out.println (this is correct). This also is the first page w/ first = 0 and pagesize = 10. Error comes when I either click an entry or I click the next button on the paginator.

If I 'redeploy' the app w/o any changes, the server log shows the following error messages w/o my interacting w/ the app at all:


Any help/ideas would be appreciated. I've not been able to determine what is causing the null pointer exception that shows w/ redeployment...

Thanks in advance...
14 years ago
JSF
Hoping that someone can help me out with my problem:

I have a database that I use to track patients, surgeries, and any complications for purposes of self directed quality improvement. Patients table/entity has basic demographics on each patient and has a patient_id field that is linked, one to many to the Surgery table/entity. Surgery table/entity lists each surgical procedure performed, and has a patient_id field that has the Many to One annotation (thus bidirectional).

I used NetBeans 6.8 to create a basic CRUD web application (just selected the appropriate tables, created the entity classes, and then the JSF pages from entity classes, which created the session beans and the controller beans). Also, creates a list.xhtml page (among others) for each table/entity. On the Patients/List.xhtml page is a datatable that lists all patients. I would like to create a column that has a SelectOneListbox in it that shows any surgical procedures performed on that patient. Below is an excerpt from my patients/list.xhtml page:

<h:panelGroup rendered="#{patientsController.items.rowCount > 0}">

<h:dataTable value="#{patientsController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">


<h:column>
<f:facet name="header">
<h:outputText value="listbox"/>
</f:facet>
<h:selectOneListbox id="dd" value="#{item.surgeryList}" size="1">
<f:selectItems
value="#{item.surgeryList}" var="invoiceCPTID"
itemValue="#{surgeryList.invoiceCPTID}"
itemLabel="#{surgeryList.invoiceCPTID.toString()}">
</f:selectItems>
</h:selectOneListbox>
</h:column>

When I compile and run the web app, the index.xhtml page appears, allowing me to choose the patients page, which appears and shows the first 100 patients in my MySQL db. The SelectOneListboxes also are in the column appropriately, with or without surgeries listed (correctly so). Problem is when I click on any URL Link (e.g., Next 100, or Edit,or View, or Destroy the selected row). Then I get a page that has multiple entries like the following:

Conversion Error setting value 'ZZZZZ00DL5' for 'null Converter'.

'ZZZZZ00DL5' is a SurgeryID. There are multiple listings for each of the surgery-IDs that are on the page, followed by the same first 100 patients. I've searched for this error on the web, and the suggested answers do not work.

My questions are:
1.) How can I make this work so that I can proceed to next page
2.) Many patients in my database have not had surgery, thus their SelectOneListbox is empty. I've tried to set the render=#{item.surgeryList.rowsAvailable}" or render="#{item.surgeryList.rowCount > 0}", but these don't work.

Thanks for any and all advice.

14 years ago
JSF