Raghu Sundar

Ranch Hand
+ Follow
since Aug 01, 2013
Raghu likes ...
Eclipse IDE Chrome Java
Merit badge: grant badges
For More
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
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Raghu Sundar

Hi Tim,

Thanks for the reply.

To deal with large data live scrolling is implemented.Do i need to do something else to deal with large dataset?
As you suggested i tried explicitly implementing datamodel but its of no use.Scrolling,column filtering is not working.Cell editing which used to work before datamodel implementation is not working now,getting null pointer exception in the cell edit listener method,pointing the row id (which is the primary key in the POJO class)

Cell edit listener method snippet



The following are the changes i made with managed bean

managed bean


I referred lpModel as value attribute in the data table and removed the rowKey attribute.

Datamodel class
9 years ago
JSF
I have a primefaces editable datatable with column filtering feature.The datatable has live scrolling feature.The problem that i am facing here is that both filtering and scrolling are happening correctly with Request scoped managed bean but when the scope of the same bean is changed to view scope(javax.faces.bean.ViewScoped) then the filtering happens but on removing the keyed in key word from filter box the table content is not reset to original state and also i am not able to scroll down to next set of records on reaching the end of scrolling.Cell editing feature is working perfectly.

One thing that i observed is ,currently i am querying 5000 odd records to load into datatable.But if the number of records is limited below 5000 scrolling is happening correctly but problem with filtering remains same.I even tested by upgrading to Primefaces 5.1 from 3.5 but no luck .Can someone please help me how to resolve this issue,so that it works in view scoped.Thanks in advance

Code snippet of xhtml page



Managed bean



DAO class

9 years ago
JSF
I am trying to display dialog popup containing input text area on click of a command button in one of the column using the approach shown in showcase example .In my case the datatable is a multiple selection enabled with the implementation of datamodel.The pop-up with text area only appears when the datatable has same feature as shown in the showcase but when multiple selection is implemented (with or without datamodel implementation)nothing gets displayed in the text area and i get the following exception when i check a row and click on the command button.When i directly click on command button no exception is thrown.



My JSF page snippet



My managed bean



Is there any way using which i can display the content in dialog text area?
10 years ago
JSF
Hi,I am thinking of developing a new JSF application which is of mid size.I am thinking of using APIs like JPA,hibernate to handle database integration and persistence.I am not able to decide on the right choice among these two to be good to use with JSF.Can someone please help me make a right choice and also the right design pattern to use.
10 years ago
JSF
I have a form with primefaces input text(p:inputText).Many of the input text values are of the type currency in dollars.When i try to use ,it mandates the user to include $ symbol prepended to the value.Is there any way using which on blur of the field the dollar symbol is prepended and the number gets formatted with proper commas.
10 years ago
JSF
Hi Tim,Thanks for your reply.My actual requirement is that i have a webpage in my app built with JSF 2 and primefaces.It has a selectone menu and a commandlink to do an action by selecting appropriate option.One of the option is to preview pdf by selecting a record from the datatable.It is actually report generated at the background using record details and should be previewed in browser.I have implemented blockui for all the options and they are working good(The status indicator starts and stops with start and completion of action) except for previewing where the status indicator remains intact with pdf generated in separate window/tab.I need to manually refresh the page in order to hide the blockui indicator.The reason may be that the preview request is of non-ajax type and oncomplete action is not working on the component.

Can you please suggest me if there is any way using which the indicator can be hidden as soon the pdf gets previewed.
10 years ago
JSF
I am generating pdf and displaying it in separate window/tab using the approach described in BalusC Code: PDF handling.I need to display blockui ajax loader when i select the commandlink to display pdf.The pdf gets generated but the ajax loader image remains as it is.I need to manually refresh the page to hide it.Is there any way using which it can be hidden as soon as the pdf gets displayed.

My code snippet is as below

JSF page

snippet of Managed bean which is of request scope
10 years ago
JSF
Oops!!! Now i got to know how much negligent i am.Anyway,thanks for pointing out my mistake.
10 years ago
JSF
I have a JSF app and for some reasons i need to refresh the page on browser back button.I tried implementing the solution given in Force JSF to refresh page / view / form when back button is pressed ,the only difference is that my app runs with servlet version 2.5 so i did the mapping in web.xml as below



My filter class is



have included the jar servlet-api-2.5.jar.When i try to deploy app in tomcat server(version 6.0.29) i am getting the below error.



Please guide me how to fix this problem.
10 years ago
JSF
I have one row editable datatable.I have implemented email validation to one of the column where error message must display on blur of email field.This is working fine.I have a dialog with form to be displayed in the same page .Validation is implemented to this form also with on blur event.The dialog validation message gets displayed on blur but along with that the main form also displays the same validation message.This should not happen.

Any idea on how to fix this problem?

JSF page



The message with id lpcErrMsg is the one that i am displaying on blur in the main page when email format is wrong.And this message gets displayed with dialog field validation also although i have never referred to this id to be rendered in the dialog.

The message with id lpcDlgMsg is the message that i am displaying inside the dialog with widgetvar dlg on blur.As of now i have implemented blur event validation for the first required field in the dialog.
10 years ago
JSF
Is there any way using which we can catch the live scrolling event each time we reach the end of scrolling and new set of records get loaded in the datatable.This would be very helpful to make some customizations similar to what we can do with sort,row select events.
10 years ago
JSF
I was using managed bean which is of Request scoped,the reason why i used this scope was,i was getting java.io.NotSerializableException: com.microsoft.sqlserver.jdbc.SQLServerConnection.Now when i change to Viewscoped by declaring connection variable as transient (i have declared Datamodel object lpInfoList as also transient since i was getting NotSerializableException for DataModel object after i made connection variable as transient). Now for any selection operation i am getting exception as DataModel must implement org.primefaces.model.SelectableDataModel when selection is enabled or you need to define rowKey attribute and the row selection and check box selection events are not getting recognized.

Is it because i am putting all JDBC code inside managed bean,the viewscoped is not working?What should i need to do now in order to make this work?
10 years ago
JSF
Thanks Tim for your reply.I tried using getRowIndex() by catching both check box and row selection events but each time i am getting -1 as the index.With getRowData i am getting exception "javax.faces.model.NoRowAvailableException at javax.faces.model.ListDataModel.getRowData(ListDataModel.java:150)" .Below is my code snippet .

Ajax events:

in managed bean

When i try to retrieve lpInfoList.getRowIndex() any where in the bean it always gives 0.lpinfoList is the DataModel object wrapped by ListDataModel.
Please suggest how to get this functionality.
10 years ago
JSF
Thanks Tim for the reply.IpInfoList is indeed wrapped by ListDataModel,i have given bad naming convention.Can you please guide me where i need to invoke getCurrentRow method to get the row number of selected record,since i couldnot find that.
10 years ago
JSF
I have a primefaces datatable i need to display (selected row number) of (total number of rows) in the JSF page.I could get the row numbers displayed in one of the columns using rowIndexVar attribute but i am not getting any idea to display the same numbers separately in the input text on row select.

What should i need to do in JSF page or managed bean to get selected row number.

Please help me in this regard.

Below is my JSF page

10 years ago
JSF