This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Kim Ming Yap

Ranch Hand
+ Follow
since Dec 17, 2008
Kim likes ...
Android C++ Java
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 Kim Ming Yap


In short, i try to install a new Sun Web Proxy 4.0.13 but having odd problem (i have administrative rights)

Here it goes.

a. CMD type : java -version shows 1.4.2_XX

b. Double click the proxy 4.0.13 setup.exe icon - nothing happen.

c. CMD type : setup --javahome c:\jdk1.6_XX - nothing happen

Here's even more odd.

a. Login to server2 and map conection to server1

b. Double click the proxy 4.0.13 setup.exe on server1 (while on server2) - setup.exe runs. This proves the proxy setup.exe on server1 is good.

c. Make a copy of proxy 4.0.13 on server2

d. Login to server1 and map connection to server2

e. Double click the proxy 4.0.13 setup.exe on server2 (while on server1) - setup.exe runs. This is just to prove my ID has admin rights.

Both servers are on the same domain and i'm using same ID to access both servers

Again, no logs on the windows events (security, application, system)

This is becoming mind a boggling mystery.

Any idea what's going on?

Thanks.
6 years ago
In short here's the scenario and main problem.
a. Proxy admin server start - no problem
b. Create a new manage server (no proxying - just testing it) using different port. It just won't start. No logs produced either.

Here's the server.xml for the new manage server.

<?xml version="1.0" encoding="UTF-8"?>

<!--
Copyright (c) 2003 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
-->

<!DOCTYPE SERVER PUBLIC "-//Sun Microsystems Inc.//DTD Sun Java System Web Proxy Server 4.0//EN" "file:///E:/Sun/ProxyServer40/bin/proxy/dtds/sun-web-proxy-server_4_0.dtd">;

<SERVER>
<PROPERTY name="accesslog" value="E:/Sun/ProxyServer40/proxy-server3/logs/access"/>

<LS id="ls1" port="8083" servername="cbaob-b3-csddb1.adp1.cibc.pte"/>

<MIME id="mime1" file="mime.types"/>

<ACLFILE id="acl1" file="E:/Sun/ProxyServer40/httpacl/generated.proxy-server3.acl"/>

<USERDB id="default"/>

<FILECACHE enabled="true" maxage="30" mediumfilesizelimit="537600" mediumfilespace="10485760" smallfilesizelimit="2048" smallfilespace="1048576" transmitfile="false" maxfiles="1024" hashinitsize="0"/>

<CACHE enabled="true" cachecapacity="2000" cachedir="E:/Sun/ProxyServer40/proxy-server3/cache">
<PARTITION partitionname="part1" partitiondir="E:/Sun/ProxyServer40/proxy-server3/cache" maxsize="100" minspace="5" enabled="true"/>
<GC enabled="true" gchimargin="80" gclomargin="70" gcleavefsfull="60" gcextramargin="30"/>
</CACHE>

<LOG file="E:/Sun/ProxyServer40/proxy-server3/logs/errors" loglevel="finest"/>
</SERVER>

Nothing seems to be wrong with this. The XML format follows the specified DTD.
Would appreciate any help.
Thanks.
6 years ago
Here it is.

@Entity(name = "Department")
@Table(name = "department")
public class Department {

@Id
@Column(name = "department_id")
private int id;

@Column(name = "department_name")
private String name;

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

@Override
public String toString() {
return "department [id=" + id + ", name=" + name + "]";
}

}
It's a one-to-one unidirectional - not bidirectional.
I'm just curious why won't it work?
The annotated form did work as shown below. It ran successfully.

User.java

@Entity(name = "User")
@Table(name = "user")
public class User {

@EmbeddedId
private SocialInsurance sin;

@NotFound(action = NotFoundAction.IGNORE)
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "department_id")
private Department department;
I'm having issue doing a one-to-one mapping association where i get the 'broken column mapping for' error.

Exception in thread "main" org.hibernate.MappingException: broken column mapping for: department.id of: org.tutorial.hibernate.xml.dto.UserXML

Would appreciate any help.
Thanks.

Here are my code:

a. Class UserXML

public class UserXML {

private SocialInsuranceXML sin;
private Date dateJoined;
private String remarks;
private AddressXML homeAddress;
private AddressXML mailingAddress;
private Collection<AddressXML> addressHistory = new ArrayList<AddressXML>();
private DepartmentXML department;

public SocialInsuranceXML getSin() {
return sin;
}

public void setSin(SocialInsuranceXML sin) {
this.sin = sin;
}

public Date getDateJoined() {
return dateJoined;
}

public void setDateJoined(Date dateJoined) {
this.dateJoined = dateJoined;
}

public String getRemarks() {
return remarks;
}

public void setRemarks(String remarks) {
this.remarks = remarks;
}

public AddressXML getHomeAddress() {
return homeAddress;
}

public void setHomeAddress(AddressXML homeAddress) {
this.homeAddress = homeAddress;
}

public AddressXML getMailingAddress() {
return mailingAddress;
}

public void setMailingAddress(AddressXML mailingAddress) {
this.mailingAddress = mailingAddress;
}

public Collection<AddressXML> getAddressHistory() {
return addressHistory;
}

public void setAddressHistory(Collection<AddressXML> addressHistory) {
this.addressHistory = addressHistory;
}

public DepartmentXML getDepartment() {
return department;
}

public void setDepartment(DepartmentXML department) {
this.department = department;
}

@Override
public String toString() {
return "UserXML [sin=" + sin + ", dateJoined=" + dateJoined + ", remarks=" + remarks + ", homeAddress=" + homeAddress
+ ", mailingAddress=" + mailingAddress + ", addressHistory=" + addressHistory + ", department=" + department + "]";
}

}

b. Class DepartmentXML

public class DepartmentXML {

private int id;
private String name;

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

@Override
public String toString() {
return "department [id=" + id + ", name=" + name + "]";
}

}

c. userxml.hbm.xml

<hibernate-mapping package="org.tutorial.hibernate.xml.dto">
<class name="UserXML" table="user_xml">
<composite-id name="sin" class="org.tutorial.hibernate.xml.dto.SocialInsuranceXML">
<key-property name="id" column="sin_id" />
<key-property name="name" column="user_name" />
</composite-id>
<property name="dateJoined" column="date_joined" type="date" />
<property name="remarks" column="remarks" type="text" />
<component name="homeAddress">
<property name="street" column="home_street_name" />
<property name="city" column="home_city_name" />
<property name="state" column="home_state_name" />
<property name="zipCode" column="home_zipcode_name" />
</component>
<component name="mailingAddress">
<property name="street" column="mailing_street_name" />
<property name="city" column="mailing_city_name" />
<property name="state" column="mailing_state_name" />
<property name="zipCode" column="mailing_zipcode_name" />
</component>
<idbag name="addressHistory" table="address_history_xml">
<collection-id type="long" column="address_id">
<generator class="hilo" />
</collection-id>
<key>
<column name="sin_id" />
<column name="user_name" />
</key>
<composite-element class="org.tutorial.hibernate.xml.dto.AddressXML">
<property name="street" column="street_name" />
<property name="city" column="city_name" />
<property name="state" column="state_name" />
<property name="zipCode" column="zipcode_name" />
</composite-element>
</idbag>
<one-to-one name="department" class="org.tutorial.hibernate.xml.dto.DepartmentXML" />
</class>
</hibernate-mapping>

d. departmentxml.hbm.xml

<hibernate-mapping package="org.tutorial.hibernate.xml.dto">
<class name="DepartmentXML" table="department_xml">
<id name="id" column="department_id" />
<property name="name" column="department_name" />
</class>
</hibernate-mapping>
In summary:

a. spring.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://www.springframework.org/schema/beans";
xmlns:context="http://www.springframework.org/schema/context";
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">;
<context:annotation-config />
<context:component-scan base-package="org.tutorial.spring" />
</beans>

b. SpringJdbcDemo.java

package org.tutorial.spring;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.tutorial.spring.dao.SpringJdbcDao;
import org.tutorial.spring.model.Circle;

public class SpringJdbcDemo {

public static void main(String[] args) {
AbstractApplicationContext ctx = new ClassPathXmlApplicationContext("spring.xml");
SpringJdbcDao dao = ctx.getBean("springJdbcDao", SpringJdbcDao.class);
ctx.close();
Circle circle = dao.getCircle(1);
System.out.println(circle);
}

}

Notice that the ctx.close() is before the dao.getCircle();

c. SpringJdbcDao.java

package org.tutorial.spring.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.stereotype.Component;
import org.tutorial.spring.model.Circle;

@Component
public class SpringJdbcDao {

public Circle getCircle(int circleId) {

Connection conn = null;
Circle circle = null;
String derbyDriver = "org.apache.derby.jdbc.ClientDriver";

try {
Class.forName(derbyDriver).newInstance();
conn = DriverManager.getConnection("jdbc:derby://localhost:1527/db");
PreparedStatement ps = conn.prepareStatement("select * from circle");
ResultSet rs = ps.executeQuery();

if (rs.next()) {
circle = new Circle(circleId, rs.getString("name"));
}

rs.close();
ps.close();
} catch (Exception e) {
throw new RuntimeException(e.toString());
} finally {
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}

return circle;
}

}

The output:

Feb 24, 2013 9:40:55 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@45e7c8de: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,springJdbcDao,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
Circle [id=1, name=First Circle

The dao still works after the ctx.close() method.
Any help is appreciated.
7 years ago
So the BeanPostProcessor and InitializingBean is pretty much the same except that the former can be done for a large group of beans instead of per bean.
Also i noticed that BeanPostProcessor is done before the initializingBean if both of this exists.
But in theory they are the same.
am i right?
7 years ago
I'm newbie to Spring and i'm trying to understand the BeanPostProcessor - postProcessBeforeInitialization and postProcessAfterInitialization.

In short:

1) spring.xml

2) TrianglePostProcessor.java

3) DisplayBeanNamePostProcessor.java

4) DrawingApp.java

Now when i run the DrawingApp, i got the following messages:


In postProcessBeforeInitialization bean = org.tutorial.spring.Point#5f0101fb
In postProcessAfterInitialization bean = org.tutorial.spring.Point#5f0101fb
setPointA
In postProcessBeforeInitialization bean = triangle1
In postProcessAfterInitialization bean = triangle1

The `postProcessBeforeInitialization` as its word says should be before initialization but as you can see from the log, the setPointA is executed first and then the `postProcessBeforeInitialization` ..

Did I miss something?
7 years ago
The proxypass statements, if you read carefully:

ProxyPass /cgi-qa-axis-rt/ ajp://localhost:8988/cgi-qa-axis-rt/

it is mapping /cgi-qa-axis-rt/ to localhost:8988/cgi-qa-axis-rt/ using ajp protocol. So it is not using HTTP in this statements. This statement is in apache web server httpd.conf.

However the tomcat server.xml for cgi-qa-axis-rt context in localhost is defined with HTTP connector for port 8988. The AJP connector has been commented out.

It still works. That's what puzzles me.
8 years ago
There's something i dont quite understand as shown below:

a. Apache web server httpd.conf

ProxyPass /cgi-qa-axis-rt/ ajp://localhost:8988/cgi-qa-axis-rt/
ProxyPassReverse /cgi-qa-axis-rt/ ajp://localhost:8988/cgi-qa-axis-rt/

b. On the cgi-qa-axis-rt context, the server.xml is as follows:

<!-- -->
<Connector executor="tomcatThreadPool"
port="8988" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->

<!-- Define an AJP 1.3 Connector on port 8009 -->
<!--Connector port="8888" protocol="AJP/1.3" redirectPort="8443" connectionTimeout="3000000" keepAliveTimeout="3000000" /-->


Question:
Apache web server will transfer the request to cgi-qa-axis-rt using ajp protocol. In cgi-qa-axis-rt server.xml, this ajp connector port is commented out. In cgi-qa-axis-rt server.xml, port 8988 is using HTTP protocol.
Why does it work?
Apache managed to transfer request to cgi-qa-axis-rt.
Strange
8 years ago
First let me apologize for posting it here (after i have posted in stackoverflow and not getting much response).

This is really strange or maybe i just don't understand JSF.

To make the whole story short, supposedly i have the following:

a. File masterLayout.xhtml - main template
b. File myPractice.xhtml - compositions which uses file masterLayout.xhtml templating

------------------------------------------------------------------------------------------------------------------------------------------------

masterLayout.xhtml page will go to myPractice.xhtml (using ajax). The myPractice.xhtml rendered correctly - displaying all components from the template and from its own page. But when i click the 'view page source code', i only see the source code of masterLayout.xhtml.

Here's the source code:

IMPORTANT NOTE: masterLayout.xhtml HAS A RICHFACES COMMANDBUTTON (a4j:commandButton) WHICH RENDER THE PANEL ID "myPractice" FOUND IN myPractice.xhtml. This commandButton render the page through ajax means. It also means ajax is called from masterLayout page to render the panel id on another page myPractice page. Not sure if this is the cause of the issue

------------------------------------------------------------------------------------------------------------------------------------------------

masterLayout.xhtml (template)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;

<html xmlns="http://www.w3.org/1999/xhtml";
xmlns:h="http://java.sun.com/jsf/html";
xmlns:f="http://java.sun.com/jsf/core";
xmlns:ui="http://java.sun.com/jsf/facelets";
xmlns:rich="http://richfaces.org/rich";
xmlns:a4j="http://richfaces.org/a4j">;

<h:head>
<title>MView Analytics Reporting</title>
<h:outputStylesheet library="css" name="styles.css" />
<h:outputScript library="javascript" name="realTimeClock.js"/>
</h:head>

<h:body onload="updateClock(); setInterval('updateClock()', 1000 );">

<h:form>
<a4j:poll id="poll" interval="5000" enabled="true" actionListener="#{marketSumm.marketSummAction}" render="marketSummary"/>
</h:form>

<h:form>

<rich:panel>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width:8%;"> </td>
<td style="width:84%;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr style="height:66px">
<td style="width:90px"><img src="resources/images/lg_cgi_header.gif" height="50px"/></td>
<td style="width:24%; padding-top:18px; font-size:20px;">Advisor Portal</td>
<td style="width:66%">
<table width="100%" align="right" border="0" cellpadding="0" cellspacing="0" >
<tr><td colspan="5" style="height:35px; font-size:15px; text-align:right;">Welcome: <b>Jack Black</b></td></tr>
<tr>
<td width="60%"> </td>
<td width="15%" align="right"><h:commandLink style="color:black;" value="My Profile"/></td>
<td width="15%" align="center"><h:commandLink style="color:black;" value="Add New Client"/></td>
<td width="5%" align="center"><h:commandLink style="color:black;" value="Help"/></td>
<td width="5%" align="right"><h:commandButton style="color:black;" value="Logout"/></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td style="width:8%;"> </td>
</tr>

<tr style="background-color:gray; height:30px;">
<td style="width:8%;"> </td>
<td>
<h:panelGrid style="width:100%; background-color:gray;" cellpadding="0" cellspacing="0">
<f:facet name="header">
<h:panelGrid style="width:100%;"
cellpadding="0" cellspacing="0" columns="7"
columnClasses="practiceTabColumn,
planningTabColumn,
tradingTabColumn,
reportsTabColumn,
searchColumn,
clientTabColumn,
goBox">
<a4j:commandButton styleClass="#{control.myPracticeStyle}" value="MY PRACTICE" action="myPractice" actionListener="#{control.myPracticeAction}" render="myPractice"/>
<a4j:commandButton styleClass="#{control.planningStyle}" value="PLANNING" action="planning" actionListener="#{control.planningAction}" render="planning"/>
<a4j:commandButton styleClass="#{control.tradingStyle}" value="TRADING" action="trading" actionListener="#{control.tradingAction}" render="trading"/>
<a4j:commandButton styleClass="#{control.reportsStyle}" value="REPORTS" action="reports" actionListener="#{control.reportsAction}" render="reports"/>
<h:inputText style="width:52%" value="Search" size="22"/>
<h:selectOneMenu>
<f:selectItem itemValue="1" itemLabel="Client"/>
<f:selectItem itemValue="2" itemLabel="James Bunday"/>
<f:selectItem itemValue="3" itemLabel="Andy R. Murray"/>
<f:selectItem itemValue="4" itemLabel="John Bastilano"/>
<f:selectItem itemValue="5" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="6" itemLabel="Tony Clement"/>
<f:selectItem itemValue="7" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="8" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="9" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="10" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="11" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="12" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="13" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="14" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="15" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="16" itemLabel="Emma W. Sterling Morrison"/>
<f:selectItem itemValue="17" itemLabel="Client"/>
<f:selectItem itemValue="18" itemLabel="James Bunday"/>
<f:selectItem itemValue="19" itemLabel="Andy R. Murray"/>
<f:selectItem itemValue="20" itemLabel="John Bastilano"/>
<f:selectItem itemValue="21" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="22" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="23" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="24" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="25" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="2" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="27" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="28" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="29" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="30" itemLabel="Emma W. Sterling"/>
<f:selectItem itemValue="31" itemLabel="Emma W. Sterling"/>
</h:selectOneMenu>
<h:commandButton style="color:black;" value="GO"/>
</h:panelGrid>
</f:facet>
</h:panelGrid>
</td>
<td style="width:8%;"> </td>
</tr>
<tr style="height:780px;">
<td style="width:8%;"> </td>
<td style="width:8%;">
<br/>
<ui:insert name="content">
</ui:insert>
</td>
<td style="width:8%;"> </td>
</tr>
</table>

</rich:panel>

</h:form>

</h:body>


You can see the ui:insert here.


------------------------------------------------------------------------------------------------------------------------------------------------

myPractice.xhtml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
<html xmlns="http://www.w3.org/1999/xhtml";
xmlns:ui="http://java.sun.com/jsf/facelets";
xmlns:f="http://java.sun.com/jsf/core";
xmlns:h="http://java.sun.com/jsf/html";
xmlns:rich="http://richfaces.org/rich";
xmlns:a4j="http://richfaces.org/a4j">;
<ui:composition template="/templates/masterLayout.xhtml">

<ui:define name="content">

<rich:panel id="myPractice" style="height:764px; border:0px; padding:0px;">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width:100%;">
<h:panelGrid style="width:100%;" cellpadding="0" cellspacing="0">
<f:facet name="header">
<h:panelGrid style="width:100%;" cellpadding="0" cellspacing="0" columns="5"
columnClasses="overviewTabColumn,
aumTabColumn,
feesTabColumn,
cashFlowTabColumn,
emptyTabColumn">
<a4j:commandButton styleClass="#{control.overviewStyle}" value="OVERVIEW" action="overview" actionListener="#{control.overviewAction}" render="overview"/>
<a4j:commandButton styleClass="#{control.aumStyle}" value="AUM" action="aum" actionListener="#{control.aumAction}" render="aum"/>
<a4j:commandButton styleClass="#{control.feesStyle}" value="FEES" action="fees" actionListener="#{control.feesAction}" render="fees"/>
<a4j:commandButton styleClass="#{control.cashFlowStyle}" value="CASH FLOW" action="cashFlow" actionListener="#{control.cashFlowAction}" render="cashFlow"/>
<h:outputText value="" style="width:100%;"/>
</h:panelGrid>
</f:facet>
</h:panelGrid>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td>
<ui:insert name="subContent">
</ui:insert>
</td>
</tr>
</table>

</rich:panel>

</ui:define>

</ui:composition>

</html>


This whole define supposed to go into masterLayout.xhtml ui:insert section.

------------------------------------------------------------------------------------------------------------------------------------------------

Actual 'View Page source' from FireFox or IE when myPractice.xhtml is rendered and displayed.


</td>
<td style="width:8%;"> </td>
</tr>
<tr style="height:780px;">
<td style="width:8%;"> </td>

<td style="width:8%;">
<br />
</td>
<td style="width:8%;"> </td>
</tr>
</table></div></div><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-8616720734293216541:-1864513498741194775" autocomplete="off" />

If you look at this 'View Page source code' carefully comparing to masterLayout.xhtml, starting from height:780px, you will notice that the section ui:insert name="content" .. is empty.

9 years ago
JSF
Sorry for posting here but the original thread was posted in Jboss but since i didn't get any response, i thought of posting it here.

The original URL post in jboss is:
http://community.jboss.org/thread/167539?tstart=0

Since doc files are not allowed to be attached here, please refer to the jboss link to look at the screenshot found on 2 attached files there.

Here's the original post:

I'm having a problem where tabpanel is not rendering properly in a template. In short, the steps are explained in sequences.

===================================================================

Clause A) Main template

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;


<html xmlns="http://www.w3.org/1999/xhtml";

xmlns:h="http://java.sun.com/jsf/html";

xmlns:ui="http://java.sun.com/jsf/facelets";

xmlns:rich="http://richfaces.org/rich">;


<h:head>

<title>MView Analytics Reporting</title>

<h:outputStylesheet library="css" name="styles.css" />

<h:outputScript library="javascript" name="realTimeClock.js"/>

</h:head>

<h:body onload="updateClock(); setInterval('updateClock()', 1000 )">

<div id="sidebarLeft">

<ui:insert name="sidebarLeft">

<ui:include src="/sections/sideBarLeft.xhtml"/>

</ui:insert>

</div>

<div id="contents">

<!--
<ui:insert name="contents"/>
-->
<h:form id="frmSecurityHoldings">

<rich:tabPanel id="tabs" switchType="client">

<rich:tab id="listTab1" label="List">abc

</rich:tab>

</rich:tabPanel>

</h:form>

</div>

<ui:debug/>

</h:body>


</html>



===================================================================



Clause B) sideBarLeft.xhtml page.



In /sections/sideBarLeft.xhtml .. portion of the code is as follows:

:

<rich:panelMenuGroup label="Enquiry Management">
<rich:panelMenuItem label="Profile"/>
<rich:panelMenuItem label="Security Holdings" action="/sections/securityHoldings.xhtml"/>
<rich:panelMenuItem label="Client Transactions"/>
<rich:panelMenuItem label="Rate of Return"/>

:

When i click the "Security Holdings", it will bring me to securityHoldings.xhtml page.


===================================================================


Clause C) securityHoldings.xhtml page.

<ui:composition xmlns="http://www.w3.org/1999/xhtml";
xmlns:ui="http://java.sun.com/jsf/facelets";
xmlns:rich="http://richfaces.org/rich";
xmlns:h="http://java.sun.com/jsf/html";
template="/templates/masterLayout.xhtml">

<ui:define name="contents">
<h:form>
<rich:panel>testing</rich:panel>
<rich:tabPanel>
<rich:tab header="first" id="first">first</rich:tab>
</rich:tabPanel>
</h:form>
</ui:define>

</ui:composition>


===================================================================



Clause D)


a) If i were to use the forms as in clause A) (bolded), the results is shown in attachment result1.doc

b) If i were to comment the forms as in clause A) and uncomment the <ui:insert name="contents"/>, the results is shown in attachment result2.doc. This is really strange where the panel get rendered correctly while the tabPanel otherwise. Possible bug in richfaces4.0?

Summary:
I couldn't figure out why using the latter would cause the tabpanel not rendering properly.
9 years ago
JSF
I'm newbie to JSF and i'm confused over few things.

1. Does JSF needs forms in order to navigate to the next page?
2. Is moving from one page to the next page constitute a requests? (assuming no business logic is involved at all)?

Please advice.
Thanks.
9 years ago
JSF
I'm running a Tomcat service and kept on getting outofmemoryerror.

I have tried increasing the heap size using 2 different methods and both failed:

1) "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Xmx1024m;-Xms128m"
2) "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMx 1024m --JvmMs 128m"

Still getting the same outofmemoryerror.

This is on a server and we have sufficient memory.
Please advice.



9 years ago
Thanks for your reply. I think A will return either "yes" or "no". I don't see any difference between A and B since both are statements returning strings.