Sree Jag

Ranch Hand
+ Follow
since Oct 14, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Sree Jag

Thanks Tom for such a clean and detailed explanation.

Actually i dint get what you were trying to do in that code. Let me give my problem:

I have 3 valueChangeListeners in a datatable on the JSP.

the first textbox will populate the entire row based on the textfield value.
The second and third valuechangelisteners update the costs of all the rows.

here is the jsp:





After i populate the first row, i select pInd and fAmount...fields
and now, if i enter the empNo in the second row and populate it, the values i entered in pInd and fAmount for the first row are lost.

Are these not supposed to be in the modelTable that is bound to the Backing beant? Am i missing something here?

and here is the code in the valueChangeListener and the binded HtmlDataTable:



When i see the console for the changed values, the Modeltable doesn't show the values selected for the first row.

i know that value change listener doesn't update all the request values. But i want the values selected in the first row too.

The backing bean is in session scope.

is there a way to get around this?

Thank you
18 years ago
JSF
anyone here?

can you gimme some ideas pl?
18 years ago
JSF
I have a datatable with 10 rows.
The first column in each row has a valuechange event. For e.g it's like, we enter the accountnumber and the valuechangeevent retrieves
the account information.

Now, i also have another column to display the cost. If user enters some amount, it should add up all the amounts in all the rows and
display it on a different column.

But the problem is, the user can enter a second account number at any point of time. then it will again be a valuechange event. now, since
it is a value change event, the information in the first row is not updated in the DataModel. As such, i am losing the previously entered
amount for the first row.

Is there a way to implement this functionality without losing the previous information?

Also, when we use "javascript:this.form.submit();" in the JSP, where does the submit go? In other words, is there a default action method
that we can specify to go to?

Thank you,
Seshu
18 years ago
JSF
I solved this puzzle. The problem was with another dropdown. I created an empty ArrayList to populate that dropdown. That was causing this exception. So, i added a new SelectItem object (new SelectItem("","")).

This fixed the problem
Hope this helps some one else.
18 years ago
JSF
hi,
I'm trying to fire a valueChangeEvent on a drop down. But i keep getting the following exception:

00000030 ServletWrappe E SRVE0068E: Could not invoke the service() method on servlet Faces Servlet. Exception thrown : javax.servlet.ServletException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1173)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:92)
at com.fbfs.cp.security.TestFilter.doFilter(TestFilter.java:50)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:626)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
---- Begin backtrace for Nested Throwables
java.util.NoSuchElementException
at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:96)
at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:122)
at javax.faces.component.UISelectOne.matchValue(UISelectOne.java:140)
at javax.faces.component.UISelectOne.validate(UISelectOne.java:113)
at javax.faces.component.UIInput.executeValidate(UIInput.java:796)
at javax.faces.component.UIInput.processDecodes(UIInput.java:383)
at javax.faces.component.UIForm.processDecodes(UIForm.java:139)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:908)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:908)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:908)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:341)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:81)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:201)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1173)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:92)
at com.fbfs.cp.security.TestFilter.doFilter(TestFilter.java:50)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:626)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

[10/23/06 10:59:04:025 EDT] 00000030 ServletWrappe E SRVE0014E: Uncaught service() exception root cause Faces Servlet: java.util.NoSuchElementException
at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:96)
at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:122)
at javax.faces.component.UISelectOne.matchValue(UISelectOne.java:140)
at javax.faces.component.UISelectOne.validate(UISelectOne.java:113)
at javax.faces.component.UIInput.executeValidate(UIInput.java:796)
at javax.faces.component.UIInput.processDecodes(UIInput.java:383)
at javax.faces.component.UIForm.processDecodes(UIForm.java:139)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:908)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:908)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:908)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:341)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:81)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:201)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1173)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:92)
at com.fbfs.cp.security.TestFilter.doFilter(TestFilter.java:50)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:626)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

[10/23/06 10:59:04:041 EDT] 00000030 WebApp E SRVE0026E: [Servlet Error]-[Faces Servlet]: java.util.NoSuchElementException
at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:96)
at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:122)
at javax.faces.component.UISelectOne.matchValue(UISelectOne.java:140)
at javax.faces.component.UISelectOne.validate(UISelectOne.java:113)
at javax.faces.component.UIInput.executeValidate(UIInput.java:796)
at javax.faces.component.UIInput.processDecodes(UIInput.java:383)
at javax.faces.component.UIForm.processDecodes(UIForm.java:139)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:908)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:908)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:908)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:341)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:81)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:201)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1173)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:92)
at com.fbfs.cp.security.TestFilter.doFilter(TestFilter.java:50)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:626)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

Here's my JSP Code:

<h:selectOneMenu styleClass="selectOneMenu" id="menu1"
value="#{lookupBO.currentLookup}"
onchange="submit();"
valueChangeListener="#{lookupBO.retrieveLookup}"
>
<f:selectItems value="#{lookupBO.listOfLookups}" />
</h:selectOneMenu></TD>



and the Backing Bean code that creates this list and handles the valueChangeEvent is:

SelectItem[] listOfLookups = new SelectItem[]{
new SelectItem("", ""),
new SelectItem("XXXX", "YYYYY"),
new SelectItem("AAAA", "BBBB")
};

public void retrieveLookup(ValueChangeEvent ve){

String value = "";

value = (String)ve.getNewValue();

System.out.println("********* The new Value is = "+value);
FacesContext fc = FacesContext.getCurrentInstance();
fc.renderResponse();
}



The request is not coming to this value change function at all.

Somone, please throw some light on this.

Thank you,
Seshu
18 years ago
JSF
Prabath,
Isn't that book a bit old. The last published date was around 2003 i guess. Hasn't the specification changed a lot? (i really don't know, so am curious)
Hello All,
This may be a dumb question to ask.
Let's say a application is deployed in a BEA cluster. The application runs on two different machines. if an error occurs in the application on one of the machines, that error is logged by Weblogic in its log file.

But how will the developer know which machine to check the log file for?
I mean, is there any mechanism for centralized logging or detecting which machine's log file is to be checked?

I hope i have explained the problem clearly.

Thanks in advance,
Seshu
19 years ago
session.setAttribute( "PdfUrl", "/pages/authorization.pdf" );
change it to:
session.setAttribute( "pdfUrl", "/pages/authorization.pdf" );

(notice that the capital 'P' is changed to 'p')

and now since the attribute is in session scope, you need not refer to it with your form bean. So, try this
<c ut value="${pdfUrl}"/>

Lemme know if this works.

Hope this helps,
Seshu
19 years ago
Hi all,
Did anyone use UPS Online tools to get live shipping charges for a shopping cart using java and XML?

if yes, can you please let me know how to do that... i mean a sample program

thanks in advance,
Seshu
hi there, could you please tell us how u sorted it out? i bet that would help out a lot of ppl here.
19 years ago
Hi all,
Did anyone use UPS Online tools to get live shipping charges for a shopping cart using java, XML?

if yes, can you please let me know how to do that... i mean a sample program

thanks in advance,
Seshu
19 years ago
or
<logic:iterate id="secondIteratorId" name="activeCase" property="accountNumbers">

-Seshu
19 years ago

Originally posted by auto expect:

<logic:iterate name="GetCaseForm" property="activeCaseList" id="activeCase" >
<logic:iterate id="activeCase" collection="accountNumbers">
<bean:write name="accountNumbers"/>
</logic:iterate>
</logic:iterate>
</td>

but this doesn't work



the second iterator should be something like this:

<logic:iterate id="secondIteratorId" property="activeCase.accountNumbers">


try this
Seshu
19 years ago

I think I might have to create another action bean but I'm just not sure.



Exactly...It's a best practice to access a JSP via a Action. So that the data for JSP can be constructed by the action file.

Seshu
19 years ago