m_am
asked on
Upload File in Jdeveloper
Hi ..
I have a jsp page that contains a form to edit and insert records, i want to have an upload utility in my form using jbo:FileUploadForm tag. How can i have a form within a form with a single submit button ..
I'll appreciate the help ..
Regards ..
PS: I'm not much aware of any of the Upload file tags in jdeveloper, including the one i'm using in my page, so i'd appreciate it if anyone could explain in detail or else give me a link that will have a similar example explained in details .. :D
========================== ========== ========== ========== ========
jsp code
======
<%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/fileaccess.tld" prefix="fileaccess" %>
<%@ page language="java" import="oracle.jbo.*, oracle.jbo.html.*" %>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%@ taglib uri="/WEB-INF/struts-html. tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean. tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic .tld" prefix="logic" %>
<%-- This JSP component build an edit form for a single record and
generates an update submit event.
It is called by the DataEdit tag --%>
<%
String dsName = "OnlineCustomerServicesMod ule.docums tr_VO_mstr ";
%>
<html:errors/>
<%-- Build a form with an editable field for each of the attributes of the row --%>
<html:form action='updteditatchdocs.d o' enctype='<%=request.getPar ameter("en cType")%>' method="POST">
<%--<jbo:ViewObject id='vo' name='<%=dsName%>'/> --%>
<table border="0">
<%-- <logic:iterate id="def" name="vo" property="attributeDefs" scope="page"> --%>
<jbo:AttributeIterate id="def" datasource="<%=dsName%>">
<tr>
<% if (!(def.getColumnName().equ als("COLVA LUE"))) {%>
<th align="right" title="<jbo:ShowHint hintname='TOOLTIP'></jbo:S howHint>">
<jbo:ShowHint hintname="LABEL"></jbo:Sho wHint>
<%-- <bean:write name="def" property="name" filter="true"/> --%>
</th> <% } %>
<td align="left" title="<jbo:ShowHint hintname='TOOLTIP'></jbo:S howHint>">
<%-- <html:text property="<%=((AttributeDe f)def).get Name()%>"/ > --%>
<% if (def.getColumnName().equal s("DOCUTYP E")) {%>
<jbo:InputSelect datasource="OnlineCustomer ServicesMo dule.docum str_VO_mst r" dataitem="Docutype" displaydatasource="OnlineC ustomerSer vicesModul e.attchfam s_VO_mstr" displaydataitem="Colvalue" displayvaluedataitem="Colk ey" shownone="1" ></jbo:InputSelect>
<% }
else if (def.getColumnName().equal s("DOCUFTY P")) { %>
<jbo:InputSelect datasource="OnlineCustomer ServicesMo dule.docum str_VO_mst r" dataitem="Docuftyp" displaydatasource="OnlineC ustomerSer vicesModul e.filetype fams_VO_ms tr" displaydataitem="Colvalue" displayvaluedataitem="Colk ey" shownone="1" ></jbo:InputSelect>
<% } else if (def.getColumnName().equal s("COLVALU E")) {%>
<% } else { %>
<jbo:FileUploadForm action="handleUpload.jsp">
Photo<INPUT TYPE="FILE" NAME="Photo"><br>
<INPUT TYPE="SUBMIT" TEXT="SUBMIT">
</jbo:FileUploadForm>
<jbo:InputRender datasource="<%=dsName%>" /><br>
<%
}
// Mark all the mandatory attributes with '*'
if (def.isMandatory())
{
%>*<%
} %>
</td>
</tr>
</jbo:AttributeIterate>
<%-- </logic:iterate> --%>
</table>
<html:hidden property="jboEvent" />
<html:hidden property="jboEventVo" />
<html:hidden property="jboRowKey" />
<html:hidden property="amId" />
<input type=hidden name="AlarmpanelId" value='<%=request.getParam eter("Alar mpanelId") %>'>
<input type=hidden name="Docurqst" value='<%=request.getParam eter("Alar mpanelId") %>'>
<html:submit>
<bean:message key="DataEdit.update"/>
</html:submit>
<html:reset>
<bean:message key="DataEdit.reset"/>
</html:reset>
<html:cancel>
<bean:message key="DataEdit.cancel"/>
</html:cancel>
</html:form>
========================== ========== ========== ========== ========
I have a jsp page that contains a form to edit and insert records, i want to have an upload utility in my form using jbo:FileUploadForm tag. How can i have a form within a form with a single submit button ..
I'll appreciate the help ..
Regards ..
PS: I'm not much aware of any of the Upload file tags in jdeveloper, including the one i'm using in my page, so i'd appreciate it if anyone could explain in detail or else give me a link that will have a similar example explained in details .. :D
==========================
jsp code
======
<%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/fileaccess.tld" prefix="fileaccess" %>
<%@ page language="java" import="oracle.jbo.*, oracle.jbo.html.*" %>
<%@ taglib uri="/webapp/DataTags.tld"
<%@ taglib uri="/WEB-INF/struts-html.
<%@ taglib uri="/WEB-INF/struts-bean.
<%@ taglib uri="/WEB-INF/struts-logic
<%-- This JSP component build an edit form for a single record and
generates an update submit event.
It is called by the DataEdit tag --%>
<%
String dsName = "OnlineCustomerServicesMod
%>
<html:errors/>
<%-- Build a form with an editable field for each of the attributes of the row --%>
<html:form action='updteditatchdocs.d
<%--<jbo:ViewObject id='vo' name='<%=dsName%>'/> --%>
<table border="0">
<%-- <logic:iterate id="def" name="vo" property="attributeDefs" scope="page"> --%>
<jbo:AttributeIterate id="def" datasource="<%=dsName%>">
<tr>
<% if (!(def.getColumnName().equ
<th align="right" title="<jbo:ShowHint hintname='TOOLTIP'></jbo:S
<jbo:ShowHint hintname="LABEL"></jbo:Sho
<%-- <bean:write name="def" property="name" filter="true"/> --%>
</th> <% } %>
<td align="left" title="<jbo:ShowHint hintname='TOOLTIP'></jbo:S
<%-- <html:text property="<%=((AttributeDe
<% if (def.getColumnName().equal
<jbo:InputSelect datasource="OnlineCustomer
<% }
else if (def.getColumnName().equal
<jbo:InputSelect datasource="OnlineCustomer
<% } else if (def.getColumnName().equal
<% } else { %>
<jbo:FileUploadForm action="handleUpload.jsp">
Photo<INPUT TYPE="FILE" NAME="Photo"><br>
<INPUT TYPE="SUBMIT" TEXT="SUBMIT">
</jbo:FileUploadForm>
<jbo:InputRender datasource="<%=dsName%>" /><br>
<%
}
// Mark all the mandatory attributes with '*'
if (def.isMandatory())
{
%>*<%
} %>
</td>
</tr>
</jbo:AttributeIterate>
<%-- </logic:iterate> --%>
</table>
<html:hidden property="jboEvent" />
<html:hidden property="jboEventVo" />
<html:hidden property="jboRowKey" />
<html:hidden property="amId" />
<input type=hidden name="AlarmpanelId" value='<%=request.getParam
<input type=hidden name="Docurqst" value='<%=request.getParam
<html:submit>
<bean:message key="DataEdit.update"/>
</html:submit>
<html:reset>
<bean:message key="DataEdit.reset"/>
</html:reset>
<html:cancel>
<bean:message key="DataEdit.cancel"/>
</html:cancel>
</html:form>
==========================
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.