Attribute EditHide in jsp
Hello
I dont know how to to this :(
I have two attributes to one DB table column in VO in EditForm i am showing one like combobox with some values when the form are in insert mode, second need to be hidden , now i need to make that in edit mode this combo box attribue is hiden but the second who is just a view attribute stays , i know about custom properties EditReadOnly, EditHide .... but how i can set these properties in .jsp page ? Maybe are some priviews ?
Thanks
ID!
ADF Business Components 11.1.1.61.92
Jdeveloper Version 11.1.1.6.0
if ( jboEvent.equalsIgnoreCase("create")){
((AttributeDefImpl)viewobject.lookupAttributeDef("AttributeName")).setProperty("EditHide","Y" );
}
Similar Messages
-
Attribute admision in JSP custom tag
Hello,
I have a custom JSP tag that needs to admit this syntax:
<mytags:sometag
name="<%=getName()%>"
editable="<%=isEditable%>"
<%=grouping%>>
<%=value%>
</mytags:sometag>But compiler refuses the way I try to inject grouping attribute, which is a String like grouping="false":
String grouping = "grouping=\"false\"";Could somebody tell me what I have to do to solve this problem?
How I have to declare this tag in the .tld file?
thanks!Yeah, just call the JSPWriter's print method instead of using the StringBuffer, or write your own subclass of StringBuffer (or StringBuilder if Java 5+) which will do this for you automatically when the size is at a certain point, and clear it out)
-
ER: organize imports in an "import" attribute of a JSP page directive
Hi,
it would be useful to see packages/classes hierarchy when changing the "import" attribute of <%@ page %> directive. It might be as well to have all possibilities of imports processing as in .java classes (autoadding, remove unused import, etc.)
Thanks in advance.Hello Scott,
First, you have to define this page directive in your static page or JSP
page :
<%@ page contentType="text/html; charset=UTF8" %>
Check your your weblogic.properties file for the following settings:
weblogic.httpd.inputCharset specifies encoding used when changing into the
internal code of Java from the parameter of the browser's request. If you
use Shift_JIS in HTML or JSP, please set
weblogic.httpd.inputCharset./*=Shift_JIS.
weblogic.codeset specifies encoding used when jDriver stores data in an
Oracle database and it changes into the character code of a database from
the internal code of Java. If you use ja16sjis in Oracle database, please
set the same encoding as NLS_LANG to weblogic.codeset.
Hope this helps
Ludovic.
Developer Relations Engineer
BEA Support
"Scott Mark" <[email protected]> a écrit dans le message news:
3cd67e5d$[email protected]..
> Did you ever get around this? Is there an issue with UTF-8 encoding?
>
> We are going to have to deliver a site in Japanese soon, and are
researching how well WLS handles double-byte chars...
-
Using Javascript attributes in a JSP-Tag
Hi!
I want to submit a Javascript attribute to an embedded jsp Tag:
<script language="JavaScript">
function test()
var jscriptvar= document.myform.myselection.selectedIndex;
result = <%= jspobj.doit(jscriptvar) %>;
</script>
The exception is : Undefined variable: jscriptvar
Is that possible?
It works, if the doit-method doesn't have a parameter.
I hope, someone can help me.
Thanks
TorstenJavaScript is executed on the client-side by the browser. The JSP code is executed on the server-side by the server and has no knowledge of JavaScript variables. You can not mix them in this manner.
-
Manipulating attribute bindings in JSP
Hi
Can anyone tell me how to convert attribute bindings to numbers so I can do maths on them eg binding.value1 * binding.value2 - I get the following error if I try
Attempt to coerce a value of type "oracle.jbo.uicli.binding.JUCtrlAttrsBinding" to type "java.lang.Long" (null)
Thanksif ( jboEvent.equalsIgnoreCase("create")){
((AttributeDefImpl)viewobject.lookupAttributeDef("AttributeName")).setProperty("EditHide","Y" );
} -
Accessing session attribute in output jsp page
Hi i am not getting any output in jsp page...
i am getting just heading
i think some problem with Session attribute..
if so how to access session been in jsp page
my code is here
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Tauvex Search Output</title>
</head>
<body>
Tauvex Search Output
<table>
<c:forEach items="${myDataList}" var="myData">
<tr>
<td>${myData.Fitsfilename}</td>
<td>${myData.RA_START}</td>
<td>${myData.RA_END}</td>
<td>${myData.DEC_START}</td>
<td>${myData.DEC_END}</td>
<td>${myData.telescope}</td>
<td>${myData.STARTOBS}</td>
<td>${myData.ENDOBS}</td>
<td>${myData.FILTER}</td>
</tr>
</c:forEach>
</table>
<%--
This example uses JSTL, uncomment the taglib directive above.
To test, display the page like this: index.jsp?sayHello=true&name=Murphy
--%>
<%--
<c:if test="${param.sayHello}">
<!-- Let's welcome the user ${param.name} -->
Hello ${param.name}!
</c:if>
--%>
</body>
</html>
plz reply soon
thanks a lotthis is what i set in servlet
request.setAttribute("myDataList", myDataList);
request.getRequestDispatcher("someJspFile.jsp").forward(request, response);
how can i access that session attribute in jsp -
ADFBC attribute error and JSP bindings
In the following code based on that in Oracle ADFToystore example the ${curBinding.name}
expression seems to be returning the name of the binding itself and not the name of the
DataControl attribute on which a JboAttrValException is thrown.
<c:forEach var="curBinding" items="${bindings.ctrlBindingList}">
<% JUControlBinding cb =
(JUControlBinding)pageContext.getAttribute("curBinding");
if (cb instanceof JUCtrlValueBinding &&
!(cb instanceof JUCtrlRangeBinding) &&
!(cb instanceof JUCtrlHierNodeBinding)) { %>
<c:set var="name" value="${curBinding.name}"/>
<html:errors property='<%= ((String)pageContext.getAttribute("name")) %>'/>
<% } %>
</c:forEach>
If my UIModel has a binding name which differs from the attribute name I do no see an error
thrown as JboAttrValException.
e.g.
<DCControl
id="Sfn"
SubType="DCTextField"
IterBinding="PayeeDataInstIterator"
ApplyValidation="false"
isDynamic="false" >
<AttrNames>
<Item Value="PayeeSfn" />
</AttrNames>
</DCControl>
curBinding.name debugs as 'Sfn'
exception thrown against 'PayeeSfn'
I can see the attribute exceptions in the JSP page if I change the code as follows;
<c:forEach var="curBinding" items="${bindings.ctrlBindingList}">
<% JUControlBinding cb =
(JUControlBinding)pageContext.getAttribute("curBinding");
if (cb instanceof JUCtrlValueBinding &&
!(cb instanceof JUCtrlRangeBinding) &&
!(cb instanceof JUCtrlHierNodeBinding)) { %>
<c:forEach var="curBindingAttrName" items="${curBinding.attributeNames}">
<html:errors property='<%= ((String)pageContext.getAttribute("curBindingAttrName")) %>'/>
</c:forEach>
<% } %>
</c:forEach>
Is this correct/safe, Is there something back when the Jbo Attribute level errors are added
as struts actionErrors that should be done ?
Anyone have any ideas on the best solution to this problem ?An example of the useBean that does not work would be nice. Of a first guess is that your class does not appear to be in a package. As of java 1.4.2, you can not import (and therefore use) classes from the default package into a class that has a package. And your server's JSP class is in a package, therefore, it can not access your bean that is in the default package.
Put your bean in a package and try again:
//Your UserData1.java first line of code:
package my.jsp.beans;Compile, and make sure the .class file goes to:
[Application Context]/WEB-INF/class/my/jsp/beans/UserData1.class
Then your useBean will look like:
<jsp:useBean id="userData" class="my.jsp.beans.UserData1" scope="page"/> -
Define a request attribute for a JSP Page
Where do I need to define the request parameters
that will be read by my JSP Page?
If I have a JSP:
<% String userName = request.getParameter("name") %>Where shud the attribute name be defined so that its value is read
by the JSP Page?
Does it need to be defined in the tag lib as an attribute?Where do I need to define the request parameters
that will be read by my JSP Page?It can be a HTML form field in another JSP from which the request comes to this JSP. Alternatively, it can be a parameter passed through the URL like
http://myhost/myapp/myjsp.jsp?name=Richard -
Assining a bean attribute to a jsp variable
I am writing a struts application and am using
<bean:write name="configattribute" property="name"/>
to print out info on my jsp page.
I was wondering if I could assign that value to a local jsp variable so I can check its value and change the colour of the text accordingly.
e.g.
String name = <bean:write name="configattribute" property="name"/>;
if name.equals("Ben"){
out.print(<font color=\"red\">;
else{
out.print(<font color=\"blue\">;
}You should still be able to use the code I listed...the logic:iterate tag creates the bean "configname" in the page scope. So you should be able to do something like this:
<logic:iterate id="configname" name="confignames">
<tr>
<td>
<% ConfigName configname = (ConfigName)pageContext.getAttribute( "configname" );
String color = "blue";
if( "julius".equalsIgnoreCase( configName.getOwner( ) ) )
color = "red";
} %>
<span style="color: <%= color %>"><bean:write name="configname" property="owner"/></span>
</td>
<td>
<bean:write name="configname" property="name"/>
</td>
</tr>
</logic:iterate>Does that sound right?
- Jesse -
Accessing bean attributes in a JSP
Hi,
I am sending a bean from a Servlet to a JSP as follows:
request.setAttribute("newclientTEST", ro_client);
this.getServletContext().getRequestDispatcher("/jsp/private/research/UserAdded.jsp").forward(request,
response);I can then access the bean in UserAdded.jsp page as follows:
<jsp:getProperty name="newclientTEST" property="username" />This works fine and returns the username from the bean but I am a little confused why this is working. From what i have read about JSPs so far in order to access properties of a bean in a JSP we first of all have to make a reference to the bean as follows:
<jsp:useBean id="newclientTEST" scope="request" class="ie.scourced.beans.PrivateClientBean" />Why does it work for me when I don't refer to the bean using useBean??
Thankshow?.... mmmm ... did ... (head scratch) ...I miss that.
Thanks a million for spotting that, I really did appreciate that.
jp. -
Using Bean Attributes in a JSP for a h:commandLink
Hi,
I am very new to JSF so apologies if the answer is obvious.
I currently have a ArrayList of products obtained from a database.
Using...
<h:dataTable value="#{ProductBean.productList}" var="product">
<h:column>
<f:facet name="header" >
<h:outputText value="Title"/>
</f:facet>
<h:outputText value="#{product.title}"/>
<f:facet name="header" >
<h:outputText value="Picture"/>
</f:facet>
<h:outputText value="#{product.picture_url}"/>
</h:column>
</h:dataTable>The contents of the ArrayList are printed out fine.
I am now looking to iterate over the items to output a link
so far I have... but it doesn't seem to work
<c:forEach items="${ProductBean.productList}">
<h:form>
<h:commandLink action=images/"#{productList.picture_url}" title="#{productList.title}"><h:graphicImage url="thumbs/#{productList.picture_url}" width="100" height="75" alt="" /></h:commandLink>
</h:form>
</div>
</c:forEach>I think the problem lies with appending the "images/" before the url
Ideally I would like it to replicate the actual HTML view which is
<a href="images/london_flight.jpg" title="London in Flight"><img src="images/london_flight.jpg" width="100" height="75" alt="" /></a>If anyone could shed any light it would be much appreciated.
Thanks in advanceThanks that was helpful so I have modified my code to...
<c:forEach items="${ProductBean.productList}" var="product">
<div class="thumbnail">
<h:form>
<h:commandLink action="images/#{product.picture_url}" title="#{product.title}"><h:graphicImage url="thumbs/#{product.picture_url}" width="100" height="75" alt="" /></h:commandLink>
</h:form>
</div>
</c:forEach>But I seem to be getting a jsp error...
javax.el.ELException: Not a Valid Method Expression: images/#{product.picture_url}
How can I append "images/" to the action without it falling over.
Thanks -
Class as an attribute name in JSP tag file
I just ran into an issue where I was writing a custom tag to generate a specific set of HTML elements, and wanted to be able to use CSS the same way I had before refactoring it into a tag. So, I included 'class' as an attribute in the custom tag file and deployed.
On Glassfish v3, this generated a bunch of JasperExceptions in the Javac compilation, complaining about <identifier> expected and reaching the end of file while parsing. I tracked it down, of course, to the use of 'class' as an attribute name, which was reduced to a servlet class defining:
public String getClass() {
return this.class;
public void setClass(String class) {
this.class = class;
}I'm curious -- which part of the process messed up here? Is "class" a valid identifier under the Java EE spec, and the translation should have used something like setClass_(String class_)? Or is it invalid, and Netbeans didn't know to mark it as an error before it tried to deploy? (And, of course, that I missed that in the spec, making it my fault.) I couldn't find anything specifically saying that reserved words couldn't be used as JSTL identifiers, so my gut is that the parser messed up. Also, I found a bug report about it for an alternate web container, but no mention of it in the bug trackers for Glassfish, Tomcat or Jasper.
Where's the blame?stdunbar wrote:
I think that Netbeans messed up. getClass() is, of course, defined on Object and class is a Java keyword.What's to stop the compiler from recognizing that "class" would be a problem and mapping it to an alternate name behind the scenes?
This is the only documentation I turned up. Maybe this says it's invalid:
Java EE SpecThe unique name of the attribute being declared. A translation error results if more than one attribute directive appears in the same translation unit with the same name.A translation error results if the value of a name attribute of an attribute directive is equal to the value of the dynamic-attributes attribute of a tag directive or the value of a name-given attribute of a variable directive. -
Session (attribute) lost between JSPs
Hi All
I've seen many post about losing the session but all of them (the ones I've seen) are different.
Anyway, I have 3 jsp's, the first only submits a form like
<FORM METHOD=POST ACTION="SaveName.jsp">
What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20>
<P><INPUT TYPE=SUBMIT>
</FORM>The second one stores the username in the session like
<%
String name = request.getParameter( "username" );
session.setAttribute( "theName", name );
%>
<HTML>
<BODY>
Your name is <%= session.getAttribute( "theName" ) %><br/>
<A HREF="NextPage.jsp">Continue</A>
....So far everything works fine!
Then, when I click on continue the third jsp is reached:
<HTML>
<BODY>
Hello, <%= session.getAttribute( "theName" ) %>
</BODY>
</HTML>This is only basics, but the last jsp shows 'null' instead of the name.
I'm runnint tomcat6 behind apache. The only thing added to the apache configuration was
ProxyPass /tomcat/ ajp://localhost:8010/Maybe I need to do more configuration ? Any suggestions ?
Thnx
LuCaHi,
This should never really happen when you bring up a Web Server or to what so called a loadbalancer in place as ultimately the container which creates the session Object.
I strongly feel that the Webserver(Apache,Sun App Server or IIS) is not passing on the jessionid cookie value which is actually responsible for this action when we are not using url writing for maintaining. .
How do test that ??
try the below code snippet and the rest all is understood on what values you get.
<%
//Get the values of respective Properties
boolean sessionIdFromCookie = request.isRequestedSessionIdFromCookie();
boolean sessionIdFromUrl = request.isRequestedSessionIdFromURL();
%>
From Cookie : <%=sessionIdFromCookie%>
From URL : <%=sessionIdFromUrl%>Well to sort out problems as these you got to enable passing of jsessionid cookie to the Application Context via Webserver which might call for additional set of configurations from webserver end and AJP part.
Just as an example let us consider in the case employing IBM http server
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.base.doc/info/aes/ae/xjta_ihs_int.htmlor a neutral way to fix this issue is to adopt usage of a technique called URLREWRITING.
How do you do that ??
A quick google search provided me the below results
http://publib.boulder.ibm.com/infocenter/wchelp/v5r6/index.jsp?topic=/com.ibm.commerce.admin.doc/tasks/tseurlrewrite.htm
http://www.adventnet.com/products/qengine/help/load_testing/loadscript_creation/recording_bc/url_rewriting.html
http://java.boot.by/wcd-guide/ch04s04.htmlHope this might help :)
REGARDS,
RaHuL -
Customize label names for an attribute in Queryform.jsp
Hi,
This is the code for Data Query Component. I want to customize the label for a column name. For eg: I have a device table and I am doing search on device name.The name for device name is DevName in the view object,so in the query form it is displayed as DevName. But I want to display the label as "Device Name". I tried changing the control hint but it did not work. Could you please tell me how can I acheive this?
Thank Youhi all,
I got the answer from dev guide, seems should use:
<blobservice:gettablename varname="uTabname"/>
<blobservice:getidcolumn varname="idColumn"/>
<blobservice:geturlcolumn varname="uColumn"/>
and render:satelliteblob
some complicated then I expected.
Best regards -
JSP 1.2: jsp expression in attribute value doesn't parse.
Hi, I'm trying to use a jsp:expression in an html attribute value in JSP 1.2 but jasper doesn't seem to be able to parse it correctly. I'm using the XML syntax in my jsp, the relevant snippets are as follows:
<jsp:scriptlet>
String versionedPath = "/mysite/2.1/images";
</jsp:scriptlet>
<img src="%= versionedPath %/foo.jpg" />
The JSP documentation claims that this will work but I'm beginning to think this syntax won't work when using JSP's XML syntax. I already know that the following won't work:
<img src="<jsp:expression> versionedPath </jsp:expression>/foo.jpg" />
as it did in JSP 1.1 because it's not well-formed xml.
Is it even possible to use jsp expressions in attribute values when using JSP 1.2's XML syntax? If so, please enlighten me, and if not, well, that seems pretty broken to me.
TIA...
--Stuartyou should use this:
<img src=<%= versionedPath %>/foo.jpg >
Maybe you are looking for
-
How can I get my i4 ihotspot to work. I can't even find it again
Hey guys, I'm running the current O/S version however I don't have the ihotspot? I had it at some point in it, but it's not there anymore. I've tried the network rest and nothing to avail. Can you guys help? Alo since I've upgraded to the current O/S
-
How to install creative suite 6 design & web premium disk
I would like know how to install the Adobe Creative Suite 6 Design & Web Premium Software Disk onto my Macintosh computer. Thank you.
-
Anyone give me concept oriented document(except oracle docs) to study ASM.
-
Getting PLS-00507 during generation of the API
Hello, I have to build up an application on a objectrelational Structure, which was designed in Oracle Designer6 (6.0.3.9.0) and runs on Oracle8i EE (8.1.5) for WinNT. During generating the Table API from Design Editor I`ve got on all nested tables a
-
Why is 3rd party content going away?
why is it that 3rd party content is going away on june 18th?