Passing a form bean with a link
Hii Javaties
I am passing some parameters from a jsp page to the action class in the following manner
�2=<bean write name="formbean" property="prop2" />Link
Can anyone tell me is this the right approach to pass paramters from a link .
Can i pass the whole form bean with a link ?
From what I understand you are using Struts, and as much as I know you have to configure struts so that when you click for example on a link with the url set as hello.do, it will actually get the hello form bean and handle it. However as much as I know you have to do this from the xml configuration!
I am not expert in struts however, but that is my feeling.
regards,
sim085
Similar Messages
-
Form bean with int property and netui:select tag
Hi,
I've recently started using WebLogic 8.1 for a client project. There's
been a bit of a learning curve, but I've been able to find most of my
answers in the docs or on the dev2dev site. This one, though, I've been
unable to manage.
I have a database table, call it foo. In it I have columns for id
(numeric) and name (string). I created a database control to read that
data:
select id, name
from foo
I then want to use this data to populate a select list in a form, which
is going to be used to submit new records for another table. For the data:
id name
1 Foo
2 Bar
3 Bletch
I want to generate a select list (this is the output HTML, not the netui
tags):
<select name="foo">
<option value="1">Foo</option>
<option value="2">Bar</option>
<option value="3">Bletch</option>
</select>
My first question is what the best way to do this is. I was able to get
this working by creating a database control, which returns an array of a
custom Foo class. I then pass that array into a utility method which
converts it into a Map, and pass that map to the netui:select tag in the
optionDataSource attribute. This works, but it seems rather roundabout,
so I'm wondering if there's a better way to do it, without needing the
conversion utility method in the middle. I tried playing around with
the control, I tried using different netui tags (I thought I could do it
with a repeater and netui:selectOption tags, but that didn't work), and
nothing else worked.
The second problem arose when I was tying the result to a Form Bean. I
created a bean with all the data that I was reading from the form, and
at first, I just made everything in the form bean be a String. For this
select, though, the values are ids, so I thought I'd just make them be
ints in the form bean instead. However, when I did that, WL decided
that it wanted to add in a default option with a value of 0:
<select name="foo">
<option value="1">Foo</option>
<option value="2">Bar</option>
<option value="3">Bletch</option>
<option value="0" selected>0</option>
</select>
I've tried to find a way to get rid of that 0, and I can't. Is there a
way to prevent it from sticking in a default value like that? Or do I
have to just leave it as a String in the form bean to get it to work the
way I want?
Thanks in advance for your help.
Joe Robins Tel: 212-918-5057
Thaumaturgix, Inc. Fax: 212-918-5001
19 W. 44th St., Suite 810 Email: [email protected]
New York, NY 10036 http://www.tgix.com
thau'ma-tur-gy, n. the working of miracles.wrt your 2nd problem, in the jpf, for the form bean, are you declaring your id
like this:
private int id;
if so, try declaring it w/ a valid value, like:
private int id = 1;
-tanya
Joe Robins <[email protected]> wrote:
Hi,
I've recently started using WebLogic 8.1 for a client project. There's
been a bit of a learning curve, but I've been able to find most of my
answers in the docs or on the dev2dev site. This one, though, I've been
unable to manage.
I have a database table, call it foo. In it I have columns for id
(numeric) and name (string). I created a database control to read that
data:
select id, name
from foo
I then want to use this data to populate a select list in a form, which
is going to be used to submit new records for another table. For the
data:
id name
1 Foo
2 Bar
3 Bletch
I want to generate a select list (this is the output HTML, not the netui
tags):
<select name="foo">
<option value="1">Foo</option>
<option value="2">Bar</option>
<option value="3">Bletch</option>
</select>
My first question is what the best way to do this is. I was able to
get
this working by creating a database control, which returns an array of
a
custom Foo class. I then pass that array into a utility method which
converts it into a Map, and pass that map to the netui:select tag in
the
optionDataSource attribute. This works, but it seems rather roundabout,
so I'm wondering if there's a better way to do it, without needing the
conversion utility method in the middle. I tried playing around with
the control, I tried using different netui tags (I thought I could do
it
with a repeater and netui:selectOption tags, but that didn't work), and
nothing else worked.
The second problem arose when I was tying the result to a Form Bean.
I
created a bean with all the data that I was reading from the form, and
at first, I just made everything in the form bean be a String. For this
select, though, the values are ids, so I thought I'd just make them be
ints in the form bean instead. However, when I did that, WL decided
that it wanted to add in a default option with a value of 0:
<select name="foo">
<option value="1">Foo</option>
<option value="2">Bar</option>
<option value="3">Bletch</option>
<option value="0" selected>0</option>
</select>
I've tried to find a way to get rid of that 0, and I can't. Is there
a
way to prevent it from sticking in a default value like that? Or do
I
have to just leave it as a String in the form bean to get it to work
the
way I want?
Thanks in advance for your help.
Joe Robins Tel: 212-918-5057
Thaumaturgix, Inc. Fax: 212-918-5001
19 W. 44th St., Suite 810 Email: [email protected]
New York, NY 10036 http://www.tgix.com
thau'ma-tur-gy, n. the working of miracles. -
Submit a html:form with a link
Hey everyone I have a html:form which am I correctly submitting with html:submitt buttons. But I was told to submit with links and not buttons :S So I'm trying to do it. I'm trying to do it like this:
<html:form action="/UpdateDeleteColecao.do" method="post" focus="colecao">
<table border="0" align="center">
<tr><td width="50%"> Cole��o </td><td width="50%"><html:text property="colecao" value="${requestScope.col.colecao}" readonly="true"/></td></tr>
<tr><td width="50%"> Descric�o </td><td width="50%"><html:text property="descricao" value="${requestScope.col.descricao}"/></td></tr>
<tr>
<td width="50%" align="center">
<html:link action="/UpdateDeleteColecao.do"> <bean:message key="button.add"/> </html:link>
</td>
<td width="50%" align="center">
<html:link action="/UpdateDeleteColecao.do"> <bean:message key="button.delete"/></html:link>
</td>
</tr>
</table><br/>
</html:form> It is not working. I get the following error:
java.lang.NullPointerException
auge.form.AddColecaoForm.validate(AddColecaoForm.java:39)It works perfectly with the html:submit buttons. My action is a LookupDispatchAction. Is there a way to do it? Oh, a second question. What if I wanted to put the submit links to this form in a second frame, would that be possible?
I wouldn't wanna use Javascript, because if it's disabled everything will fail terribly. SO, I wanna know if there's any other way.
ThanksI cannot use the typical regular HTML "a href",
because I have to call a struts action.No... you said you have to submit the form with a link. A link is an "a href", it's exactly what <html:link> generates. But a link cannot be used for form submitting except by invoking Javascript to do it programatically.
Using an action in <html:link>, presuming that's really refering to an action and not just the href value, which is what I'm not really sure of. It's been a while since I've used Struts. So maybe the action is the href part, and you can put "javascript:void(0);" there?
But I'm absolutely positive about the HTML/Javascript aspect. Struts tags don't alter how HTML works. They just make generating some HTML content easier. But in this case, I'm not sure that's helpful because I never found a simple way to get the actual form name that the <html:form> creates. -
Passing data from JSP to Action w/o form bean
I would like to invoke an action using the content of a table cell displayed on
a JSP as the action parameter. For example, assume the JSP has a table displaying
the data attributes for an Employee (i.e. name, age, salary, department, etc.).
I would like clicking the data vale for an attribute to display more detailed
information about that attribute. So if I click on department, it would invoke
a getDepartmentDetails action that would get the attributes for that department
and display them on second JSP. The department attribute on the first JSP would
be an HTML anchor. Since the getDepartmentDetails action would not have a form
bean, how could I pass it the department id? I've heard that SP2 will support
something called page inputs. Will this resolve this problem? Thanks.I have a table listing companies...I had a link over the company code to call an
action selectCompany so that it would display a company info page.
I did this...
<td><netui:anchor action="selectCompany"><netui:parameter name="companyId" value="{container.item.companyId}"></netui:parameter><netui:label
value="{container.item.companyCd}"></netui:label></netui:anchor></td>
when I highlighted over the html link it would show
http://localhost:7001/Admin/financialInstitution/selectCompany.do?companyId=27
in my selectCompany action...to retrieve the parms, i did this...
String compId = this.getRequest().getParameter("companyId");
int iCompId = 0;
// A company object is loaded based on the companyId parameter.
try {
iCompId = Integer.parseInt( compId );
} catch (Exception exc) {
hope that helps,
Tom
"Fred Criscuolo" <[email protected]> wrote:
>
I would like to invoke an action using the content of a table cell displayed
on
a JSP as the action parameter. For example, assume the JSP has a table
displaying
the data attributes for an Employee (i.e. name, age, salary, department,
etc.).
I would like clicking the data vale for an attribute to display more
detailed
information about that attribute. So if I click on department, it would
invoke
a getDepartmentDetails action that would get the attributes for that
department
and display them on second JSP. The department attribute on the first
JSP would
be an HTML anchor. Since the getDepartmentDetails action would not have
a form
bean, how could I pass it the department id? I've heard that SP2 will
support
something called page inputs. Will this resolve this problem? Thanks. -
Once completed the form, is it possible to receive the confirmation e-mail with a link addressing to a html archive?
I don't know if it is the best solution but you could filter the results to just that client's answers on the summary tab and then PDF that.
-
Form report with both edit and column link
hi experts,
How can we create form report with both edit and column link. Ie, the form should have both the Edit link and column link. When we click on the edit link(in page1) it should go for the page2 and the page2 should display the corresponding row fields which should be editable. but when i click the column link it should bring me to the next page but the corresponding values of the column should not be editable.
Regars,
KKhi,
Here i have achieved this by making the column link and page navigation. -
How to use coherence-web with a struts form bean
We are trying to switch to Glassfish 3.1 but when we switch the persistence-type from "replicated" to "coherence-web" our struts applications start failing. The first time we try the application the page loads. But all calls from then on end in error. The form bean is called FbCustomer. Any help is greatly appreciated!! Here is the error....
WARNING: StandardWrapperValve[action]: PWC1406: Servlet.service() for servlet action threw exception(Wrapped) java.io.IOException: readObject failed: java.lang.ClassNotFoundException: rav.einvoice.web.forms.FbCustomer
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
at com.tangosol.io.ResolvingObjectInputStream.resolveClass(ResolvingObjectInputStream.java:66)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2217)
at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2348)
at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2746)
at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:262)
at com.tangosol.coherence.servlet.OptimizedHolder.deserializeValue(OptimizedHolder.java:233)
at com.tangosol.coherence.servlet.OptimizedHolder.getValue(OptimizedHolder.java:64)
at com.tangosol.coherence.servlet.SplittableHolder.getValue(SplittableHolder.java:56)
at com.tangosol.coherence.servlet.AbstractHttpSessionModel.getAttribute(AbstractHttpSessionModel.java:130)
at com.tangosol.coherence.servlet.api23.HttpSessionImpl.getAttribute(HttpSessionImpl.java:81)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSession.getAttribute(CoherenceWebSession.java:461)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSessionFacade.getAttribute(CoherenceWebSessionFacade.java:87)
at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:777)
at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1554)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:280)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:864)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:761)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1050)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:231)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:724)ClassLoader: java.net.URLClassLoader@695f18fe
at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
at com.tangosol.coherence.servlet.OptimizedHolder.deserializeValue(OptimizedHolder.java:233)
at com.tangosol.coherence.servlet.OptimizedHolder.getValue(OptimizedHolder.java:64)
at com.tangosol.coherence.servlet.SplittableHolder.getValue(SplittableHolder.java:56)
at com.tangosol.coherence.servlet.AbstractHttpSessionModel.getAttribute(AbstractHttpSessionModel.java:130)
at com.tangosol.coherence.servlet.api23.HttpSessionImpl.getAttribute(HttpSessionImpl.java:81)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSession.getAttribute(CoherenceWebSession.java:461)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSessionFacade.getAttribute(CoherenceWebSessionFacade.java:87)
at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:777)
at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1554)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:280)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:864)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:761)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1050)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:231)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:724)Caused by: java.io.IOException: readObject failed: java.lang.ClassNotFoundException: rav.einvoice.web.forms.FbCustomer
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
at com.tangosol.io.ResolvingObjectInputStream.resolveClass(ResolvingObjectInputStream.java:66)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2217)
at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2348)
at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2746)
at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:262)
at com.tangosol.coherence.servlet.OptimizedHolder.deserializeValue(OptimizedHolder.java:233)
at com.tangosol.coherence.servlet.OptimizedHolder.getValue(OptimizedHolder.java:64)
at com.tangosol.coherence.servlet.SplittableHolder.getValue(SplittableHolder.java:56)
at com.tangosol.coherence.servlet.AbstractHttpSessionModel.getAttribute(AbstractHttpSessionModel.java:130)
at com.tangosol.coherence.servlet.api23.HttpSessionImpl.getAttribute(HttpSessionImpl.java:81)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSession.getAttribute(CoherenceWebSession.java:461)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSessionFacade.getAttribute(CoherenceWebSessionFacade.java:87)
at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:777)
at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1554)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:280)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:864)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:761)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1050)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:231)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:724)ClassLoader: java.net.URLClassLoader@695f18fe
at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2225)
at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2348)
at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2746)
at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:262) ... 38 moreCould you share with is the entire stacktrace?
It seems that your domain classes are not being founded by the classloader, and this could be a consequence of a lot of things, but in general, it is a classloader issue. Your classloader is broken by some reason. Check if dependencies are well solved, and check if there are some NoClassDefFoundErrors in the stacktrace. Sometimes when the classpath is wrong, the entire classloader brokes generating strange behaviors like this.
Also review the steps necessary to deploy Coherence*Web on GlassFish: http://docs.oracle.com/middleware/1212/coherence/COHCW/glassfish.htm#COHCW357
Remember for example that, different from WebLogic 12.1.2, you need to deploy coherence.jar and coherence-web.jar at your package deployment.
Cheers,
Ricardo Ferreira -
Passing values to form bean string array from dynamic added textboxes
Hi,
I am unable to pass values to form bean string array from a jsp in which I have incorporated dynamically adding of textboxes in javascript.
I have given add/delete row option in the jsp. If there is single row, this is working fine. But after adding a row, I am not able to either do any validations on added textboxes or pass the values to the String array form bean variable.
code snippet:
var cell6 = row.insertCell(4);
var element5 = document.createElement("input");
element5.type = "text";
element5.className = "formtext1";
element5.size = "5";
element5.value = "00.00";
element5.name= "qty"; // this is a string array of the form bean.
element5.onchange=function() {checkNumeric(this);};
cell6.appendChild(element5);
<html:text styleClass="formtext1" property="qty" value="" size="5" styleId="qty" onchange="checkNumeric(this)"/></td>
form bean declaration
private String[] qty; Please help.
Edited by: j2eefresher on Jan 12, 2010 11:23 PMShivanand,
There's no need to post that much code when you could create a very short test case that demonstrates only the problem you are having.
You're using &NAME. notation on something that isn't a page or application item. You can't reference PL/SQL variables that way (or any other way) outside the PL/SQL scope. For your situation, you could create a page item named P55_DOCID and assign it a value in the PL/SQL process (:P55_DOCID := DOCID;), then reference &P55_DOCID. in HTML areas like the success message.
Scott -
How to pass parameter onclick of a command link created in a managed bean
Hi,
I created a command link in a managed bean using RichCommandLink . I want to pass a parameter on click of the command link like we do using <f:attribute> on the jspx. As i have created a command link using the bean hence i want to pass it programmatically to another method . How should i pass the parameter via the command link. Please help..Hi,
can you please elaborate more on this.
i am not getting what you are trying to tell.
following is my actual code in java bean : :
RichCommandLink remove= new RichCommandLink();
remove.setId("E"+(rowID-1));
remove.setText("Remove");
FacesContext context = FacesContext.getCurrentInstance();
MethodExpression actionListener = context.getApplication().getExpressionFactory().createMethodExpression(context.getELContext(), "#{viewScope.test.onRemove}", null, new Class[] {ActionEvent.class});
remove.addActionListener(new MethodExpressionActionListener(actionListener));
childrenOfGroupLayout.add(remove);
Here i have created RichCommandLink in Bean, in this i want to add the <f:attribute>
how to add this in my current component.
can you give some example..
please help.. -
Update Multiple Rows with Form Beans
Hi,
I'm trying to update variable number of rows at once in an EJB with form beans and pageflow in Weblogic Workshop. Is this possible? If so, how?
Thanks!
Will... if your table does not contain exactly what you expect you could get:
'single row sub-query returns more than one row'
To prevent that, put a unique index on (name, version). If this combination is not always unique, you will need to cater for the possibility in the update statement. -
How do I request a refund for "Refund for In-App Purchases made by a minor"? I received an email on this with a link that takes me into a loop with no request form to fill out as the email states.
Did you do this
How to report/refund an issue with your iTunes Store, App Store, Mac App Store, or iBooks Store purchase
or maybe
1 - Use the Express lane and start here:
https://expresslane.apple.com
or the general place
Apple - Support -form iTunes Store - Contact Us
2 - Call Apple in your country by getting the number from here:
http://support.apple.com/kb/HE57 -
Problems with a link into Preview form
hi all.
I make a XML Form for news, it contain 4 forms " Show, Edit, ListEdit and Preview".
The problem is when i see the Preview forms, this have a link " Read more..", this link is set to Hyperlink=View , that will open a new windows with the details of the news. the new window have a link, but this doesn't work (show javaScript error).
error: open_url (url) don't exist in the source of page.
But if i see only the Show form the link works fine.
Can you help me please with this problem ?
thanks.Hi Vanessa,
This SQL works for me:
DECLARE @path varchar(50)
SELECT @path = cast(T0.BitmapPath as varchar) FROM OADP T0
select cast(@path + $[OITM.U_FieldName] as ntext(16))
/code
Regards,
Ibai Peñ -
Attaching a form component value with the link
Help! Desperate!
How do I attach list box value with the link. This is part of my code. I am struggling with the <a href part of the code. When the user clicks one of the options from the list box, that value should be attached to the link.
private String getWageFooter(String rate)
StringBuffer sb1 = new StringBuffer();
String typerate=rate;
sb1.append("<hr size=\"3\" width=\"550\">");
sb1.append("<table width=\"950\"><tr><td align=\"center\">");
sb1.append(" To change the Rate Type view");
sb1.append("<p>Click on a Rate Type in this list and click the<I><b>");
sb1.append("<font color=\"blue\">GO</font></b></I> button");
sb1.append("<br><select name=\"ratetype\"><option value=\"\">Select One");
sb1.append("<option value=\"All\">All Rate Types<option value=\"Hourly\">Hourly Wage");
sb1.append("<option value=\"Annual\">Annual Wage</select>");
sb1.append("<a href=\"occWageReport.jsp?typerate=");
sb1.append("<img src=\"../images/go.gif\" border=\"0\"></a>");
return sb1.toString();
SueAnybody! Any ideas how to attach the value of the item in the list box with the link as a querystring?
Sue -
Cannot retrieve definition for form bean null
Hi,
I have a page jsp which contains a form. This form contains an action
towards (page.do ).
I configured struts-config.xml file in whom I put a configuration of
action ( type=xxx.pageAction ) but not form because I have not need of
it.
During the execution it show that it tries to instantiate a bean of form
corresponding to a configuration of action and post this error message
" Root causes of ServletException javax.servlet.jsp. JspException:
Cannot retrieve definition for form bean null "
Could you indicate to me where is the problem ?
Here is my configuration :
< html:form action = " page.do " method = " post " >
</html:form >
<action path="/page"
type="xxx.pageAction">
<forward name="show" path="/page.jsp"/>
</action>
Thanks in advance
Rachid.
There's little reason to use Struts infrastructure to set this up since you have no model, and the controller aspect is well-defined (just go to "NewProject"!). You're basically providing a link from one page to another, akin to doing an <a href>, and you wouldn't use Struts to do a simple link :).
I would just just use standard HTML.
If you're okay with using Javascript, this is the simplest:
<input type="button" onClick="document.location='NewProject'">
Or you can use a standard HTML form, as you've basically done already:
<form action="NewProject" method="get">
<input type="submit" value="Create">
</form> -
How to reset values in a Data Form Bean?
I have created an ADF application that has a search facility in it. The architecture is as follows:
DataPage (search.jsp) --> DataAction (validateSearch) -->DataAction (refreshCollection) --> DataPage (results.jsp)
I have successfully created a data form bean to hold the data that is submitted in the search and bind it to the refresh method of the collection. I have also successfully overridden the validate method, which catches and throws and displays appropriate ActionErrors on the search.jsp page.
I have added a link back to the search.jsp page from the results.jsp page (as a user may wish to perform another search), the ActionErrors are resetting ok but I have not managed to work out how to reset the values of the actual data form bean.
I have tried several different ways of overriding the reset method within the data form bean but so far have been unsuccessful - I would appreciate any assistance with this matter.
Shown here is a basic example of a form bean that I have been trying different things out with - I can not get the reset method to even be called - please help!
package uk.dmf.eg02;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
public class searchForm extends ActionForm
String search;
public setupForm()
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
ActionErrors errors = new ActionErrors();
if (search.trim().length()==0)
errors.add("search", new ActionError("error.search"));
return errors;
public void reset(ActionMapping mapping, HttpServletRequest request)
System.err.println("EXECUTING RESET METHOD");
this.search = "";
public void setSearch(String search)
this.search = search;
public String getSearch()
return search;If you run in request scope the reset method is called, however in session scope is't only called once (or never?). See documentation of method reset():
public void reset(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Reset bean properties to their default state, as needed. This method is called before the properties are repopulated by the controller.
The default implementation does nothing. In practice, the only properties that need to be reset are those which represent checkboxes on a session-scoped form. Otherwise, properties can be given initial values where the field is declared.
If the form is stored in session-scope so that values can be collected over multiple requests (a "wizard"), you must be very careful of which properties, if any, are reset. As mentioned, session-scope checkboxes must be reset to false for any page where this property is set. This is because the client does not submit a checkbox value when it is clear (false). If a session-scoped checkbox is not proactively reset, it can never be set to false.
This method is not the appropriate place to initialize form value for an "update" type page (this should be done in a setup Action). You mainly need to worry about setting checkbox values to false; most of the time you can leave this method unimplemented.
Maybe you are looking for
-
General Ledger - Revaluation/Translation Process Question
Application Release Version: 11.5.10.2 MRC: Not turned on for new entities. (See details below) My customer has been using oracle from around 2001 and went through a process at the end of 2008 to setup a new chart of accounts and approx 6 different c
-
How do I remove Virtualbox from Macbook Pro?
Remove virtual box! I am having slow issues with Mavericks since I updated. I have plenty of ram. I posted a thread and this person helped me and found virtualbox on my computer. I have never used windows on my computer. I was told by apple store to
-
DOCTYPE Override in effect!
I recently inherited our website created in DW HTML 4.01. I changed it to XHTML 1.0 Transitional. When I validate each page using WC3, I get the following Warning for every page: The following notes and warnings highlight missing or conflicting inf
-
Relation between BP with Organization
Hi, Can any one help me by giving reference of any function module or table name so that I can get Organization Unit for a particular BP Number?
-
Attachments (SOAP-Exception)
!! HELP !!! It is Tomcat 5.5, Axis, JUnit, Xerces, JAF I use the Stub for client, java2wsdl, wsdl2java; My servlet-client writted me: java.lang.ClassCastException: org.apache.axis.message.SOAPBodyElement at org.apache.axis.encoding.ser.JAFDataHandler