Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!

Ilayaraja Raju

Greenhorn
+ Follow
since May 11, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ilayaraja Raju

Thanks Guys..

I managed to make it work by adding the el-api-2.2.jar and el-impl-2.2.jar libraries in the PRE_CLASSPATH in the weblogic startup script (startWebLogic.cmd in my case).

set PRE_CLASSPATH=C:\Ilaya\testapplication\Spring3\ExtJars\el-api-2.2.jar;C:\Ilaya\testapplication\Spring3\ExtJars\el-impl-2.2.jar; %PRE_CLASSPATH%;

Thanks & Regards,
Ilaya
+65 90843640
9 years ago
JSF
Hi Gurus,

When I use the parameter passing method in the view, I am getting el parser error.

I use the below jars for el
el-api-2.2.jar
el-impl-2.2.jar.

I placed in the WEB-INF/lib folder. I had issues. So I placed them in a folder and set the class path in the server (weblogic server) startup. But still I encounter the el parse error.


The description_search.xhtml:

<h:commandLink id="reclassifyLink" value="Reclassify" action="#{descriptionSearch.reclassify(document)}" >

The error is the below:

java.lang.NoSuchMethodError: javax/el/ELResolver.invoke(Ljavax/el/ELContext;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;
at com.sun.el.parser.AstValue.invoke(AstValue.java:228)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:102)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:84)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
at javax.faces.component.UICommand.broadcast(UICommand.java:311)
at javax.faces.component.UIData.broadcast(UIData.java:911)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1255)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:334)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
java.lang.NoSuchMethodError: javax/el/ELResolver.invoke(Ljavax/el/ELContext;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;
at com.sun.el.parser.AstValue.invoke(AstValue.java:228)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:102)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:84)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
at javax.faces.component.UICommand.broadcast(UICommand.java:311)
at javax.faces.component.UIData.broadcast(UIData.java:911)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1255)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:334)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

Can you please help.
9 years ago
JSF
Hi Tim,

Thanks for your reply.

So you mean redirection to the error page is not possible in JSF?

So I ll try to redirect in the controller (back bean) to the error page instead of creating a new exception and expect the we container to redirect to the error page.

I mean I will change the controller code as:


In the controller: (OLD)
inside the back bean method:--
throw new DCException();

In the controller: (NEW)
inside the back bean method:--
catch (Exception e){
redirect "dc_error_page";
}

Once again thanks for your reply.



Regards,
Ilaya
+65 90843640
9 years ago
JSF
Dear Gurus,

I am trying to forward the request to the common error page (dc_error_page.xhtml) when I encounter an exception in the application.

The below is the change:

web.xml:

<error-page>
<exception-type>com.dsta.gebiz.datacleanser.util.DCException</exception-type>
<location>/faces/scripts/dc_error_page.xhtml</location>
</error-page>

In the controller:
inside the back bean method:--
throw new DCException();

DCException.java:

public class DCException extends FacesException{

public DCException()
{
}

public String getMessage()
{
return "DC Exception occured - Message";
}

public String toString(){
return "DC Exception occured";
}

}

But when I encounter an exception in the application, the request goes to DCException but it is not getting redirected to the error page.
Instead I am getting the below Error and goes to the 505 error:
SEVERE: DC Exception occured
javax.faces.el.EvaluationException: DC Exception occured
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:98)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
at javax.faces.component.UICommand.broadcast(UICommand.java:311)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1255)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:334)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

Any pointers on this is greatly appreciated.

Many Thanks.
Ilaya
9 years ago
JSF

Abhishek Ralhan wrote:Hi,

You can use a hidden field like:
<input type="hidden" id="test" value="#{backBean.value}"> in your page.
And in your javascript you can getElementId("test") and read its value.

Note: I don't remember the "input type hidden" for jsf , hence i used the jsp component "input"



Thanks Abhishek.

Actually I tried this option. The problem associated here is the id of the element is dynamically generated by jsf. so i cannot get the value of the element.

Is there anyway to fetch the backbean value from the javascript ( as we do in the jsp).

Regards,
Ilaya
9 years ago
JSF

bajrang asthana wrote:I just want to make sure have you defined getHiddenCode() method in your descriptionSearch backing bean.



Hi Bajrang,

Thanks for your comment. I have getHiddenCode() method in the controller (DescriptionSearch.java).

My problem is I donno how to get the value of descriptionSearch.hiddenCode in the javascript in the xhtml page.

Thanks & Regards,
Ilaya
9 years ago
JSF
Hi Gurus,

Can anyone tell me how to get the managed bean property value inside the javascript method

something like

function showMainCat(){
var hidCode = "#{descriptionSearch.hiddenCode}";
}

I cannot get the hiddenCode property of descriptionSearch managed bean in this.

Can anyone help me to let me know how to get this value inside javascript method

Thanks.
Regards,
Ilaya
9 years ago
JSF
Hi,

Thanks Guys.

I am able to set the width and align left using columnClasses attributes and css as

columnClasses="order-table-docno-column,order-table-column,order-table-desc-column,order-table-desc-column,order-table-column,order-table-column,order-table-column">

Thanks a lot.

Regards,
Ilaya

Ilayaraja Raju wrote:

Sridhar Santhanakrishnan wrote:Try this


Or you can use the columnClasses attribute of the dataTable and set the css classes.



Hi Sridhar,

I tried adding <f:attribute>, but not helpful. doesnt work.

I want to align only particular column. In that case, can I go for columnClasses attribute in the <h:dataTable>?

Thanks.
Ilaya

9 years ago
JSF

Sridhar Santhanakrishnan wrote:Try this


Or you can use the columnClasses attribute of the dataTable and set the css classes.



Hi Sridhar,

I tried adding <f:attribute>, but not helpful. doesnt work.

I want to align only particular column. In that case, can I go for columnClasses attribute in the <h:dataTable>?

Thanks.
Ilaya
9 years ago
JSF
Hi I have a small issue:

I have the below code to render a html table with the column header (Document Code) and the column values using h:outputText .

<h:dataTable value="#{docCodeSearch.results}" var="c" styleClass="order-table" headerClass="order-table-header" rowClasses="order-table-odd-row,order-table-even-row">
<h:column>
<f:facet name="header">
Document Code
</f:facet>
<h:outputText value="#{c.docCode}"/>
</h:column>
</h:dataTable>.

How can i make the column values (<h:outputText> values) to be left aligned or right aligned?
Neither <h:outputText> nor <h:column> does not accept align property.

Can you please help..
9 years ago
JSF