N Deepu

Greenhorn
+ Follow
since Jul 28, 2011
N likes ...
Eclipse IDE
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by N Deepu

Thanks for the response. I need to display the entire table on expand and hide it on collapse. Yeah it isn't going to collapse "else" section when I debug the code. Is the place where the method called wrong?
I've a table which has multiple columns as in my database table. Few of the columns are editable and the values entered by the user should be updated back in the database on click of submit. For this Ive a foreach loop with value as HashMap of list of bean.
Below is my foreach loop:


I'm iterating through a map called feeApprovalByFundId which is Map<String,List<MyBaseBean>>. How do I get the updated values of the columns like checkbox, input box? I'm able to get in a String or String array but I won't know to which key was that mapped to. (Eg. Fund1 will have 10 fees - I will have under one hashmap key).
I tried iterating like this :

8 years ago
I've to display a table only on click of the + (Expand) and + should get changed to - and I should collapse the table once - is clicked. I've the below code in the jsp page:



And my javascript method is as below:



When I click on '+' It just disappears and the expand doesn't work :argh: :banghead: . Could you tell me what's missing?Thanks in advance!!!
I want to set the time from the Analog Clock widget. For this I should be able to move the hour and the minute needles and also have a privelege to set AM and PM. how can I achieve this? Is there a way to move the needles of the widget or any other alternative way to set the time from the Analog clock widget?
12 years ago

Is this change for the lifetime of the application or some other combination?



I want to retrieve the latest values from the cache when the database is updated. It is fetching the new values after 120 seconds. How do I change?
I want to use a Second-Level chache in my code which has Spring and hibernate. I've made all the configurations in spring-persistence.xml for Ehcache configuration and the cache is working fine. My problem is that the configurations are already set by default in the ehcache-failsafe.xml. When I change the value in database and refresh the page, the changes are not reflected immediately since the timeToIdleSeconds="120" in the xml. I want to change this to 0 so that the changes are reflected immediately. I tried doing this : CacheManager manager = CacheManager.create();

Hi,

I'm trying to bind a p:datatable from JSF 2.0 Custom Component through Encode Method and I'm able to bind it also, with an issue.

This is my custom Tag in the xhtml page :



and at the encode method i've the following :



But when I try to run this it throws an exception saying p:datatable has to be within a form element, though my custom tag is within h:form tag

So I tried adding this line :



Now it adds the datatable. But one table within the custom tag as I'm doing this in encode method and one more in the form at the top as I've added to the form.

How do I solve this issue? Kindly help me out.

Thanks in advance
12 years ago
JSF
Hi all,

How can I update a datatable from the backing bean? I'm using JSF 2.0 and Primefaces 2.2.1.
I'm doing this by JSF custom component. So I've to bind the datatable from the encode method. And in run time I should update the table after entering few details in the other fields.
I tried populating through p:commandbutton(setUpdate) from back end. But it says I can't create a p:commandbutton without a form though I've a form in my xhtml page.
12 years ago
JSF
Hi all,

I'm searching for a basic Spring Web Flow application code on net but I'm unable to find. I'm suppose to cover the 3 chapters in the Web Flow tutorial given in the Springsource through an example. But the simple example is not found. Can someone please help me with a sample web flow application?

thanks in advance
12 years ago
I have a requirement to create a panel dynamically using jsf 2.0 custom components. The controls within the panel will be dynamically read from an xml and rendered on the selection of the corresponding object (Eg : If Person is selected, I should render a panel which will have controls related to person like : Person age field(inputtext), Person DOB(calendar) and so on).

I am trying to render it from the component class which extends UIComponentBase.


I have done this way. But I am getting a null pointer exception. How can the panel with the defined controls be rendered dynamically?

This is what I'm getting -

====Will Start Rendering====
inside the panel get method------
Sep 7, 2011 10:01:42 AM com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback visit
SEVERE: java.lang.NullPointerException
12 years ago
JSF
Hi,

I'm trying to use the Ajax with JSF 2.0 to render a panel on button click. In JSF 2.0 we've f:ajax for rendering dynamically. But in the samples i found online, I only saw outputtext being rendered. I'm trying to render a panel but it gives an exception.



But i get the following exception -
SEVERE: Error Rendering View[/welcome.xhtml]
javax.faces.FacesException: <f:ajax> contains an unknown id 'output' - cannot locate it in the context of the component j_idt9
at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.getResolvedId(AjaxBehaviorRenderer.java:278)
at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.appendIds(AjaxBehaviorRenderer.java:265)
at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.buildAjaxCommand(AjaxBehaviorRenderer.java:210)
at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.getScript(AjaxBehaviorRenderer.java:82)
at javax.faces.component.behavior.ClientBehaviorBase.getScript(ClientBehaviorBase.java:99)
12 years ago
JSF
This is my web.xml entry.



This is the exception I'm getting along with the exception already posted :

SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(Unknown Source)
at javax.faces.event.SystemEvent.<init>(SystemEvent.java:67)
at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:69)
at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:69)
at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:256)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:245)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)

SEVERE: Servlet.service() for servlet [jsp] in context with path [/New_Dynamic] threw exception [javax.servlet.ServletException: null source] with root cause
java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(Unknown Source)
at javax.faces.event.SystemEvent.<init>(SystemEvent.java:67)
at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:69)
at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:69)
at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:256)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:245)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)


What is the reason? Are the Jar files that are causing the problem? Or is it the web.xml mapping? I'm using JSF 2.0 with Primefaces 2. I should use the UIComponentBase class to define the JSF custom component. the Jar files might not be compatible is my analysis. Kindly help me. I'm stuck since 3 days.
12 years ago
JSF
Hi,

I've been getting the following exception with the configListener. I'm not understanding the problem!!

INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
Aug 29, 2011 11:00:54 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener
java.lang.NoClassDefFoundError: javax/faces/FacesException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:119)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4660)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.faces.FacesException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
... 14 more
12 years ago
JSF
http://www.ibm.com/developerworks/webservices/library/wa-spring3webserv/index.html

This is the link. Step by Step tutorial is given. It'l be helpfull.
12 years ago
JSF
JSF can be integrated with spring (REST webservices APIs to be included) to make it RESTful. There is a step by step tutorial in the IBM website about using the REST webservice along with spring and JSF. You can check the same for more information.
12 years ago
JSF