Win a copy of Head First Android this week in the Android forum!

tej ku

Greenhorn
+ Follow
since Mar 13, 2010
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by tej ku

I guess we can make multiple column unique by two ways "composite-id" and "unique-key".......What is the difference between using "composite-id" and "unique-key" constraint?
Can you give me a example of how hibernate mappling file should look like.........
I want to make combination of two Foreign keys in table3 unique.
Hi I have scenario where

operation 1: 2 user read data from table1 and table2

table3 is a link table for table1 and table2 which has foreign keys of table1 and table2.

operation2: the first user has inserted a new record in table3
operation3: later the second user is also inserting a new record in table3 which is not aware already a record is inserted

I am using hibernate mapping but we are not using hibernate version check ....................

How to prevent multiple record in table3?

in mapping files or for every insertion I have to check already a record in table3?

How should be the mappings file declared?

I just changed the names of mapping ..........
<hibernate-mapping>
<class name=" " table="table3_LINK">
<meta attribute="extends" inherit="false">BaseModel</meta>
<meta attribute="class-code" inherit="false">private static final long serialVersionUID = 1L;</meta>
<id name="id" type="java.lang.Long">
<column name="table3_ID" precision="15" scale="0" />
<generator class="identity"></generator>
</id>
<many-to-one name="Employer" class=".model.businessobject.table1" fetch="select">
<column name="FK_table1_ID" precision="15" scale="0" not-null="true" />
</many-to-one>
<many-to-one name="rc" class=".model.businessobject.table2" fetch="select">
<column name="FK_table2_ID" precision="15" scale="0" not-null="true" />
</many-to-one>
<property name="intPartyInd" type=".model.hibernateext.TrimmedString">
<column name="column3_table3" length="1" not-null="true" />
</property>
<property name="mailto1Ind" type=".model.hibernateext.TrimmedString">
<column name="Column4_table4" length="1" not-null="true">
</column>
</property>









style="width:150px;" attribute is the solution. It is working now...........
11 years ago
JSF
please check the attachment........I want to control the width of the <h:selectOneMenu to make it uniform.
11 years ago
JSF
How to make size of dropdownlist uniform while data is coming from database
PLEASE CHECK the ATTACHMENT to see how it appears on screen. Any help will be appreciated


11 years ago
JSF
Hi
Can you please help me out what could be the error? any suggestions will be appreciated.............


Application Error
The RC Express application or the network may be experiencing technical difficulties.
Click here to re-enter the RC Express application.
Or: Contact Tech Support for assistance.


Please reference the following message when reporting this error:
java.lang.StringIndexOutOfBoundsException


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

Exception Stack Trace:
java.lang.String:1088 substringgov.state.oh.us.odjfs.rcx.model.dao.hibernate.CopytoDaoHibernateImpl:144 getCopyToSummarygov.state.oh.us.odjfs.rcx.service.impl.CopyToServiceImpl:29 getCopyToSummarysun.reflect.GeneratedMethodAccessor1659:-1 invokesun.reflect.DelegatingMethodAccessorImpl:43 invokejava.lang.reflect.Method:618 invokeorg.springframework.aop.support.AopUtils:307 invokeJoinpointUsingReflectionorg.springframework.aop.framework.ReflectiveMethodInvocation:182 invokeJoinpointorg.springframework.aop.framework.ReflectiveMethodInvocation:149 proceedorg.springframework.transaction.interceptor.TransactionInterceptor$1:128 doInTransactionorg.springframework.transaction.jta.WebSphereUowTransactionManager$UOWActionAdapter:306 runcom.ibm.ws.uow.UOWManagerImpl:1149 runUnderCurrentUOWcom.ibm.ws.uow.UOWManagerImpl:513 runUnderUOWorg.springframework.transaction.jta.WebSphereUowTransactionManager:252 executeorg.springframework.transaction.interceptor.TransactionInterceptor:123 invokeorg.springframework.aop.framework.ReflectiveMethodInvocation:171 proceedorg.springframework.aop.interceptor.ExposeInvocationInterceptor:89 invokeorg.springframework.aop.framework.ReflectiveMethodInvocation:171 proceedorg.springframework.aop.framework.JdkDynamicAopProxy:204 invoke$Proxy117:-1 getCopyToSummarysun.reflect.GeneratedMethodAccessor1659:-1 invokesun.reflect.DelegatingMethodAccessorImpl:43 invokejava.lang.reflect.Method:618 invokeorg.springframework.aop.support.AopUtils:307 invokeJoinpointUsingReflectionorg.springframework.aop.framework.ReflectiveMethodInvocation:182 invokeJoinpointorg.springframework.aop.framework.ReflectiveMethodInvocation:149 proceedorg.springframework.transaction.interceptor.TransactionInterceptor$1:128 doInTransactionorg.springframework.transaction.jta.WebSphereUowTransactionManager$UOWActionAdapter:306 runcom.ibm.ws.uow.UOWManagerImpl:1149 runUnderCurrentUOWcom.ibm.ws.uow.UOWManagerImpl:513 runUnderUOWorg.springframework.transaction.jta.WebSphereUowTransactionManager:252 executeorg.springframework.transaction.interceptor.TransactionInterceptor:123 invokeorg.springframework.aop.framework.ReflectiveMethodInvocation:171 proceedorg.springframework.aop.framework.JdkDynamicAopProxy:204 invoke$Proxy118:-1 getCopyToSummarysun.reflect.GeneratedMethodAccessor1659:-1 invokesun.reflect.DelegatingMethodAccessorImpl:43 invokejava.lang.reflect.Method:618 invokeorg.springframework.aop.support.AopUtils:307 invokeJoinpointUsingReflectionorg.springframework.aop.framework.ReflectiveMethodInvocation:182 invokeJoinpointorg.springframework.aop.framework.ReflectiveMethodInvocation:149 proceedorg.springframework.transaction.interceptor.TransactionInterceptor$1:128 doInTransactionorg.springframework.transaction.jta.WebSphereUowTransactionManager$UOWActionAdapter:306 runcom.ibm.ws.uow.UOWManagerImpl:1149 runUnderCurrentUOWcom.ibm.ws.uow.UOWManagerImpl:513 runUnderUOWorg.springframework.transaction.jta.WebSphereUowTransactionManager:252 executeorg.springframework.transaction.interceptor.TransactionInterceptor:123 invokeorg.springframework.aop.framework.ReflectiveMethodInvocation:171 proceedorg.springframework.aop.interceptor.ExposeInvocationInterceptor:89 invokeorg.springframework.aop.framework.ReflectiveMethodInvocation:171 proceedorg.springframework.aop.framework.JdkDynamicAopProxy:204 invoke$Proxy118:-1 getCopyToSummarygov.state.oh.us.odjfs.rcx.action.CopytoSummaryAction:86 queryRecordsgov.state.oh.us.odjfs.rcx.action.AbstractPaginationAction:153 findgov.state.oh.us.odjfs.rcx.action.CopytoSummaryAction:77 findsun.reflect.GeneratedMethodAccessor1841:-1 invokesun.reflect.DelegatingMethodAccessorImpl:43 invokejava.lang.reflect.Method:618 invokeorg.jboss.seam.util.Reflections:22 invokeorg.jboss.seam.intercept.RootInvocationContext:31 proceedorg.jboss.seam.intercept.SeamInvocationContext:56 proceedorg.jboss.seam.transaction.RollbackInterceptor:28 aroundInvokeorg.jboss.seam.intercept.SeamInvocationContext:68 proceedorg.jboss.seam.core.BijectionInterceptor:77 aroundInvokeorg.jboss.seam.intercept.SeamInvocationContext:68 proceedorg.jboss.seam.core.ConversationInterceptor:56 aroundInvokeorg.jboss.seam.intercept.SeamInvocationContext:68 proceedorg.jboss.seam.core.MethodContextInterceptor:44 aroundInvokeorg.jboss.seam.intercept.SeamInvocationContext:68 proceedorg.jboss.seam.intercept.RootInterceptor:107 invokeorg.jboss.seam.intercept.JavaBeanInterceptor:185 interceptInvocationorg.jboss.seam.intercept.JavaBeanInterceptor:103 invokegov.state.oh.us.odjfs.rcx.action.CopytoSummaryAction_$$_javassist_28:-1 findsun.reflect.NativeMethodAccessorImpl:-2 invoke0sun.reflect.NativeMethodAccessorImpl:79 invokesun.reflect.DelegatingMethodAccessorImpl:43 invokejava.lang.reflect.Method:618 invokeorg.jboss.seam.util.Reflections:22 invokeorg.jboss.seam.util.Reflections:144 invokeAndWraporg.jboss.seam.Component:2211 callComponentMethodorg.jboss.seam.Component:2043 getInstanceFromFactoryorg.jboss.seam.Component:1978 getInstanceorg.jboss.seam.Component:1950 getInstanceorg.jboss.seam.Component:1944 getInstanceorg.jboss.seam.Namespace:55 getComponentInstanceorg.jboss.seam.Namespace:50 getComponentInstanceorg.jboss.seam.el.SeamELResolver:166 resolveBaseorg.jboss.seam.el.SeamELResolver:53 getValuejavax.el.CompositeELResolver:175 getValuecom.sun.faces.el.FacesCompositeELResolver:72 getValueorg.jboss.el.parser.AstIdentifier:44 getValueorg.jboss.el.ValueExpressionImpl:186 getValuecom.sun.facelets.el.TagValueExpression:71 getValuejavax.faces.component.UIOutput:184 getValuecom.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer:201 getValuecom.sun.faces.renderkit.html_basic.HtmlBasicRenderer:284 getCurrentValuecom.sun.faces.renderkit.html_basic.HtmlBasicRenderer:154 encodeEndjavax.faces.component.UIComponentBase:861 encodeEndorg.ajax4jsf.renderkit.RendererBase:281 renderChildorg.ajax4jsf.renderkit.RendererBase:258 renderChildrenorg.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer:78 encodeChildrenjavax.faces.component.UIComponentBase:837 encodeChildrenjavax.faces.component.UIComponent:930 encodeAlljavax.faces.render.Renderer:148 encodeChildrenjavax.faces.component.UIComponentBase:837 encodeChildrenjavax.faces.component.UIComponent:930 encodeAlljavax.faces.component.UIComponent:933 encodeAllcom.sun.facelets.FaceletViewHandler:592 renderVieworg.ajax4jsf.application.ViewHandlerWrapper:100 renderVieworg.ajax4jsf.application.AjaxViewHandler:176 renderViewcom.sun.faces.lifecycle.RenderResponsePhase:110 executecom.sun.faces.lifecycle.Phase:100 doPhasecom.sun.faces.lifecycle.LifecycleImpl:139 renderjavax.faces.webapp.FacesServlet:266 servicecom.ibm.ws.webcontainer.servlet.ServletWrapper:1146 servicecom.ibm.ws.webcontainer.servlet.ServletWrapper:1087 servicecom.ibm.ws.webcontainer.filter.WebAppFilterChain:145 doFiltergov.state.oh.us.odjfs.rcx.filter.RequestFilter:123 doFiltercom.ibm.ws.webcontainer.filter.FilterInstanceWrapper:190 doFiltercom.ibm.ws.webcontainer.filter.WebAppFilterChain:130 doFilterorg.jboss.seam.web.ExceptionFilter:64 doFiltercom.ibm.ws.webcontainer.filter.FilterInstanceWrapper:190 doFiltercom.ibm.ws.webcontainer.filter.WebAppFilterChain:130 doFilterorg.jboss.seam.servlet.SeamFilter$FilterChainImpl:83 doFilterorg.jboss.seam.web.IdentityFilter:40 doFilterorg.jboss.seam.servlet.SeamFilter$FilterChainImpl:69 doFilterorg.jboss.seam.web.MultipartFilter:90 doFilterorg.jboss.seam.servlet.SeamFilter$FilterChainImpl:69 doFilterorg.jboss.seam.web.RedirectFilter:45 doFilterorg.jboss.seam.servlet.SeamFilter$FilterChainImpl:69 doFilterorg.jboss.seam.web.ExceptionFilter:64 doFilterorg.jboss.seam.servlet.SeamFilter$FilterChainImpl:69 doFilterorg.ajax4jsf.webapp.BaseFilter:510 doFilterorg.jboss.seam.web.Ajax4jsfFilter:56 doFilterorg.jboss.seam.servlet.SeamFilter$FilterChainImpl:69 doFilterorg.jboss.seam.web.LoggingFilter:58 doFilterorg.jboss.seam.servlet.SeamFilter$FilterChainImpl:69 doFilterorg.jboss.seam.servlet.SeamFilter:158 doFiltercom.ibm.ws.webcontainer.filter.FilterInstanceWrapper:190 doFiltercom.ibm.ws.webcontainer.filter.WebAppFilterChain:130 doFilterorg.ajax4jsf.webapp.BaseXMLFilter:178 doXmlFilterorg.ajax4jsf.webapp.BaseFilter:290 handleRequestorg.ajax4jsf.webapp.BaseFilter:368 processUploadsAndHandleRequestorg.ajax4jsf.webapp.BaseFilter:495 doFiltercom.ibm.ws.webcontainer.filter.FilterInstanceWrapper:190 doFiltercom.ibm.ws.webcontainer.filter.WebAppFilterChain:130 doFiltercom.ibm.ws.webcontainer.filter.WebAppFilterChain:87 _doFiltercom.ibm.ws.webcontainer.filter.WebAppFilterManager:837 doFiltercom.ibm.ws.webcontainer.filter.WebAppFilterManager:680 doFiltercom.ibm.ws.webcontainer.servlet.ServletWrapper:588 handleRequestcom.ibm.ws.wswebcontainer.servlet.ServletWrapper:481 handleRequestcom.ibm.ws.webcontainer.servlet.CacheServletWrapper:90 handleRequestcom.ibm.ws.webcontainer.WebContainer:748 handleRequestcom.ibm.ws.wswebcontainer.WebContainer:1466 handleRequestcom.ibm.ws.webcontainer.channel.WCChannelLink:122 readycom.ibm.ws.http.channel.inbound.impl.HttpInboundLink:458 handleDiscriminationcom.ibm.ws.http.channel.inbound.impl.HttpInboundLink:387 handleNewInformationcom.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback:102 completecom.ibm.ws.tcp.channel.impl.AioReadCompletionListener:165 futureCompletedcom.ibm.io.async.AbstractAsyncFuture:217 invokeCallbackcom.ibm.io.async.AsyncChannelFuture:161 fireCompletionActionscom.ibm.io.async.AsyncFuture:136 completedcom.ibm.io.async.ResultHandler:196 completecom.ibm.io.async.ResultHandler:751 runEventProcessingLoopcom.ibm.io.async.ResultHandler$2:881 runcom.ibm.ws.util.ThreadPool$Worker:1497 run
11 years ago
I just found it is working fine in FIREFOX not in internet explorer..........
11 years ago
JSF
Hi,
I am trying to use a radio button for ascending and descending a list of items but the list is sorted if we click two times radio button
(1 click descending radio button and second click ascending radio button now descended item list are displayed.)

<tr>
<td colspan="3">
<h:panelGrid columns="6" cellpadding="0" cellspacing="0">
<h:outputLabel escape="false" styleClass="label" value="Sort By: " for="sortBy" />
<h:selectOneMenu id="sortBy" value="#{decFilter.sortBy}">
<f:selectItems value="#{decInProgressAction.orderByList}" />
<a:support event="onchange" action="#{decInProgressAction.doFiltering}"
reRender="mainForm" ignoreDupResponses="true" eventsQueue="default" />
</h:selectOneMenu>
<h:selectOneRadio value="#{decFilter.ascDesc}">
<f:selectItems value="#{decInProgressAction.orderByAscDescList}" />
<a:support event="onchange" action="#{decInProgressAction.doFiltering}"
reRender="mainForm" ignoreDupResponses="true" eventsQueue="default" />
</h:selectOneRadio>
</h:panelGrid>
</td>
</tr>
11 years ago
JSF
Hi
I guess this is the method you are talking about but I need to compare first few charaters of string2 with string1.
contentEquals

public boolean contentEquals(CharSequence cs)
Hi
I have
string1 = "caselevelno"
string2 = "caselevelnoversion1"

string2 has more charaters than string1

How to compare and verify that string2 starts with string1 value.?
Regards,
Ravi.
11 years ago
Hi
I have
string1 = "caselevelno"
string2 = "caselevelnoversion1"

string2 has more charaters than string1

How to compare and verify that string2 starts with string1 value.?
Regards,
Ravi.