Lazy form bean functionality in 8.1.4
Hi All!
Is there any functionality in Workshop 8.1.4 which similar to struts lazy form bean functionality? I can't find any doc or example or forum item about it.
I need it to implement a functionality where my html form generated runtime and don't know in advance how many and what type of fields will it contain.
Any suggestion should be highly appreciated!
Thanks in advance!
S.
I can't be sure about exactly what's happening here, but I can point out several things.
The class "javax.servlet.jsp.el.VariableResolver" is associated with JSTL 1.1.x, and JSP 2.0. It's not part of JSTL 1.0.x. Make sure you really have version 1.0.6, and don't have 1.1 somewhere.
If you're just trying to use the JSTL, you shouldn't need several of those jars that you're presently including. You only need jstl.jar and standard.jar.
Why are you using the "rt" versions of these taglibs? Those don't even use the expression language. I would remove "_rt" from all of those references.
Note that if you're using Struts and the JSTL, you probably want to use Struts-EL, which is a version of the Struts jar that uses the EL to evaluate attribute values. Check the struts-user archive for some information about this. You'll find the struts-el distribution in the "contrib" directory of the Struts distribution.
Similar Messages
-
Hi, i m new to jsp . i m a bit confused bout the functionality of reset function in form bean class that extends ActionForm. Does this function resets the specified fields on client side or it requires a reset function in the action class too , to reset fields on server side
Sorry to be a bugger about this, but isn't there a Struts forum somewhere these Struts specific questions could go? I'm tired of clicking on these stupid things to find it's not even a JSP question.
Sorry, I feel better now. -
Retaining List Box Value in Form Bean
Hi All,
I want to retain the List Box populated using the Form bean.
Right now when i display the List Box in a page and submit the Form and come back
to same page again I do not get List Box populated.
In the JPF I do not get the all values of the List Box. I only get the selected
value of the ListBox.
Thx
HiteshHi sudha,
1. We can also use the FM
F4IF_INT_TABLE_VALUE_REQUEST
(here u will be able to capture the value)
2.
DATA : BEGIN OF itab OCCURS 0,
bukrs LIKE t001-bukrs,
butxt LIKE t001-butxt,
END OF itab.
SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BUKRS'
value_org = 'S'
dynprofield = 'MYLISTTAB'
dynpprog = sy-repid
dynpnr = sy-dynnr
TABLES
value_tab = itab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
3. In pai module,
use the code :
PROCESS ON VALUE-REQUEST.
field mylistab module abc.
where field = your field name
abc = module name (which contains the above coding in step 2)
regards,
amit m.
Message was edited by: Amit Mittal -
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 -
Forms Bean changes not being picked up from updated jar
I've got an existing, working Bean with a single static method which my forms use to check the last modified date on a file. I've been trying to add a second method, with no luck. In an attempt to see if my new jar was being picked up, I changed the existing method to simply return "testChange". When it continued to return the string representation of the file modification date, I assumed my jar change wasn't being read.
However, I eventually tried creating my new method in a separate class, this time not extending VBean, and include it in the same jar. I can now execute my new method just fine.
My questions are
1) Why didn't adding the new method to the existing class work?
2) Given that I can demonstrate my changed jar is being used by the form, how on earth is the old method still returning the file date, when the code doesn't do that anymore???
I've got it working, but I'd really like to understand why my previous attempts failed.
Original class:
public class myClass extends VBean
public static String getLastModified(String filename)
File file = new File(filename);
return Long.toString(file.lastModified());
Forms invocation:
FUNCTION get_last_modified_date (file_name_in IN SWtype.SW_long_string)
RETURN DATE
AS
v_last_modified SWtype.sw_long_string;
BEGIN
v_last_modified :=
fbean.invoke_char ('SW_WEBUTIL_BLK.SWFILEUTILS'
,1
,'getLastModified'
,file_name_in
return TO_DATE ('01/01/1970 00:00:00', 'DD/MM/YYYY HH24:MI:SS')
+ v_last_modified/(86400 * 1000);
END;
Method changed for testing:
public class myClass extends VBean
public static String getLastModified(String filename)
return "testChange";
New method:
public static boolean isValidUTF8(String filename) throws FileNotFoundException,
IOException
<if not valid UTF8>
return false;
return true;
Invoking the new method when it was in the bean (just returned null):
v_result := fbean.invoke_bool('SW_WEBUTIL_BLK.SWFILEUTILS'
,1
,'isValidUTF8'
,:my_blk.file_name
Invoking the imported Java method now that it's in its own class:
v_result := myfilevalidator.isValidUTF8(:upload_blk.source_file);
In case it's relevant, I'm using JDeveloper 10.1.3 and Forms Builder 10.1.2.0.2, running the forms locally on my OC4J instance.Why didn't adding the new method to the existing class work?
2) Given that I can demonstrate my changed jar is being used by the formBoth statements point to the direction that the "old" class is still there, but maybe in a different jar-file. java takes the first occurence of a class, so maybe for the "old" class it finds it in a different jar, but the "new" class is not found in that jar and therefore taken from the actual jar. check The archive or archive_jini-tag and remove all unused or redundant jars. You maj also try to clear the jar-cache. -
STRUTS - Cannot retrieve definition for form bean null -aaaarrrrgh
Hi Folks,
my head hurts and i become crazy... i know that a lot of people asked this question before, but i did not found any suitable solution.
I have simple a jsp page, containing a form which should be handled by struts. I tried everything, but i did not found my mistake.
Can anyone help me please?
JSP:
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ page contentType="text/html;charset=windows-1252"%>
<html:html locale="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Anmeldung f?r GOLEM Quickplayout</title>
</head>
<body>
<html:errors/>
<html:form action="checkLogin.do">
<table cellspacing="3" cellpadding="2" border="0" width="100%" align="left">
<tr>
<td>
<bean:message key="prompt.username"/>
</td>
<td>
<html:text property="username"/>
</td>
</tr>
<tr>
<td>
<bean:message key="prompt.password"/>
</td>
<td>
<html:text property="password"/>
</td>
</tr>
</table>
</html:form>i tryed a lot for the FORM -Tag, for instance:
<html:form action="checkLogin.do"> or
<html:form action="/checkLogin.do"> or
<html:form action="/checkLogin"> but all throws the same exception. :(
struts-config.xml
<form-beans>
<form-bean name="loginForm" type="de.orb.quick.view.LoginForm"/>
</form-beans>
<action-mappings>
<action path="/login" type="de.orb.quick.view.LoginAction" name="loginForm" input="/login.jsp" scope="session" unknown="true">
<forward name="success" path="/showData.jsp"/>
</action>
<action path="/checkLogin" type="de.orb.quick.view.CheckLogonAction" unknown="false" input="/login.jsp">
<forward name="success" path="/storeRequestData.do"/>
<forward name="failure" path="/login.do"/>
</action>
Exception:
javax.servlet.jsp.JspException: Cannot retrieve definition for form bean null
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:831)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
at _login._jspService(login.jsp:11) [/login.jsp]
LoginAction:
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
return mapping.findForward("success");
LoginForm:
public class LoginForm extends ActionForm {
private String password = "";
private String username = "";
public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping, request);
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
return super.validate(mapping, request);
public String getPassword() {
return password;
public void setPassword(String password) {
this.password = password;
public String getUsername() {
return username;
public void setUsername(String username) {
this.username = username;
}Sorry for this stupid question, but how can i avoid this exception while using struts TagLibs?
I tried to face the jsp with another action, but this does not change anything.
Thank you in advance
Mirkojavax.servlet.jsp.JspException: Cannot retrieve definition for form bean myfrom
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:831)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
at jsp_servlet.__index._jspService(__index.java:155)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6291)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3575)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2573)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151) -
Cannot retrieve definition for form bean null on action /submitCustomerForm
Can someone plz check my code...
while I try to run the code I got Stuck getting the above error report.
here is my code..
this is wat i wrote in JSP page
<html:form action="/submitCustomerForm">
and in my struts-config I ve..
<form-beans>
<form-bean name="CustomerForm" type="app1.CustomerForm" />
</form-beans>
<!-- ========== Global Forward Definitions ========= -->
<global-forwards><forward name="mainpage" path="index.jsp"></forward>
</global-forwards>
<!-- ========== Action Mapping Definitions ======== -->
<action-mappings>
<action
path="/submitCustomerForm"
type="app1.CustomerAction"
name="CustomerForm"
scope="request"
validate="true"
input="CustomerDetails.jsp" >
<forward name="success" path="/Success.jsp" />
<forward name="failure" path="/Failure.jsp" />
</action>
</action-mappings><html:form action="submitCustomerForm.do">the above is the way how you call your ActionServlet
if your ActionServlet mapping is
<servlet-mapping>
<servlet-name>ActionServlet</servlet>
<url-pattern>*.do<url-pattern>
</servlet-mapping> -
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. -
How to populate the form bean object for multiselect box in struts
hi, i am using two multi select boxes,one to populate the data by getting from the data base and another to fill the items selected from the first select box to store the values in the database..i need the information (how to declare the select boxes and how to write the form bean getters and setters for this one.) regarding this..
http://forum.java.sun.com/thread.jspa?threadID=5147813&messageID=9553925#9553925
-
Cannot create a Struts Form bean using jdeveloper 10g
Hello I'm new to jdeveloper and struts and triying to create a sample login page following this tutorial :http://www.oracle.com/technology/products/jdev/htdocs/handson/struts/strutshandson.html
But I have a little problem in the 3rd excercice (Building Struts Form Beans and Actions)
when I follow the instructions "Select File | New > Choose Web-Tier in the Categories, and select Struts > Select ActionForm from the Items > Click OK. "
there is no ActionForm Item ! the only available item is "Struts Controller page Flow" and I allready used this one to create the struts' project template !
(same thing : Struts Action in the next tutorial section is not available)
BTW : I have to use jdeveloper 9.0.5.2 and not a latest version1. Take a look at the class diagram for query model http://docs.oracle.com/cd/E17904_01/web.1111/b31973/af_query.htm#BABDGCHI
2. Also see if this helps you understand http://jobinesh.blogspot.in/2011/03/retrieving-viewcriteria-from-custom.html -
To call a bean function to set a property value with hx:ajaxRefreshRequest
I have an input box
I need to output some text onto an output box,When the input box value changes
I am using Ibm jsf implementation and RSA 7.0,JSF 1.1 implementation
I know how to call a bean property's setter method using this hx:refresh submit and associated behaviours and target actions.
As explained in this tutorial
http://www.ibm.com/developerworks/rational/library/06/1205_kats_rad2/
But my aim is to call a bean function other than the setter method,because i could do some business logic there and give output.This is possible via setters too,but i believe thats a poor programming practice.
Hope ppl have got a clear picture of my problem.
Help me in this.You can use any jsf implementation you want, I suggested you only the steps to accomplish the task but I don't know the components you are using...
You can also accomplish the task without Ajax at all using "classic" http requests but it will be very frustrating for your users...
Catch client side event (input value change) -> fire an action that update the model -> update presentation layer with up to date model values -
Hi,
I have the following urgent problem.
I created a pageflow which uses a form bean (created with a db control) to insert
values in a table. I overcame the disability to insert date values in the table
by converting this columns to string values in the table. But now I have to insert
a sysdate in a column that holds the row sampled date. How is it possible? I used
javascript without an success.
Code in jsp:
document[getNetuiTagName("myForm",this)][getNetuiTagName("date",this)].value=new
Date();(have used string values too)
<netui:hidden dataSource="{actionForm.sampled}" tagId="date"/>
Code in .jcx file
<xsd:element name="SAMPLED" type="xsd:dateTime" wld:JDBCType="DATE" minOccurs="0"
wld:TableName="theTable" nillable="true">
* </xsd:element>
Code in .jpf file
* <pageflow-object id="formbeanprop:portlets.Career.Submit_CV.Submit_CVController.DatabaseForm#sampled#java.sql.Timestamp"/>
public static class DatabaseForm extends RowSetForm
public java.sql.Timestamp getSampled()
return sampled;
public void setSampled(java.sql.Timestamp newOne)
registerChange("sampled");
this.sampled = newOne;
I have tried to use java.sql.Date too...
Any help would be very appreciated.
Thx,
VincentHi,
Hope You're using the template.fmb.
If your Custom Form is in INV module, use 'FND_ORG.CHOOSE_ORG;' in the pre-form.
Else Set the org id dynamically,
begin
MO_GLOBAL.SET_POLICY_CONTEXT(ACCESS_MODE,ORG_ID);
end;
Example:
begin
MO_GLOBAL.SET_POLICY_CONTEXT('S',101);
end;
S - Denotes that the current session will work for Single Org_id (101)
M - Denotes that the current session will work for Multiple Org_id
Thanks -
How to call the form bean value on jsp withthe help of jstl tag
hi
all friends
i am working in struts & i use jstl tag in jsp. i have one problem rise is how to call the form bean value in jsp page by using jstl tag.
i now how to retrive the value through jsp:logic
eg. <logic:empty name="userListForm" property="users">
NO USER FOUND
</logic:empty>
see * userListForm mean formbaen name.
* users means collection object.
so how can i write above e.g in jstlYou use the jstl core:if or core:choose combined with the EL:
<c:if test="${empty users.userListForm}">
NO USERS FOUND
</c:if>I suggest you lookup the jsp expression language (EL) using google, it's very powerful. -
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
Maybe you are looking for
-
A whole slew of iTunes on Windows even with a NEW iPod
So I've been having some minor problems with my iPod Photo. For the last few months whenever I connected it this weird window would appear saying AUTOPLAY with a little progress bar scanning across. It didn't bother me that much, but in the last few
-
Need to remove syles/images via CrystalReportViewer
I am trying to embed a report in the app. I only need the report (minus the toolbar, "main report" tab, printLayout and border gifs) I was able to remove the a) toolbar, b) "main report" tab, c) partial background style - using setDocumentViewType -
-
Image on jsp from database along with other elements on image.
Hi All, I wish to display an image which is stored in my database along with other contents on the page. I am able to display the image on an entirely new page but I do not wish to display it on a new page. Neither frames etc fit on my current page d
-
How do I clear (reset) keyframe points in Final Cut Pro?
I know there is a quick and single click to clear (reset to none) all keyframe points in the viewer window (motion tab). I just can't figure it out. I have to right click each and every keyframe point and click delete. But there is a way to wipe out
-
My iphone 4 has frozen, just showing itune icon and connector ?
my iphone4 has frozen it is just showing an itune icon and connector ? how can I unlock this ?