[jboss-user] [Beginner's Corner] - Can I restart an APP using JMX console?

2009-09-02 Thread griffitm
Hi all, 

How can I restart an application in the JBoss container (a war file app) that 
is not responding without restarting the entire AS?  I think there must be a 
JMX bean to do this, but I cannot find it.

Any reply would be appreciated. 

Best Regards,
MG

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4253094#4253094

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4253094
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Beginner's Corner] - Re: Can I restart an APP using JMX console?

2009-09-02 Thread griffitm
Thanks! I actually found the answer in the wiki:

http://www.jboss.org/community/wiki/RedeployFromTheJMXConsole

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4253123#4253123

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4253123
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery Restrictions/SG problems with Integer Field

2007-11-15 Thread griffitm
Pete, 

Thanks for pointing this out (can't be my code, must be a bug in the compiler) 
;-) It makes sense the object was immutable. I was able to get it working. 
Thanks.

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4105096#4105096

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4105096
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery Restrictions/SG problems with Integer Field

2007-11-13 Thread griffitm
I don't understand this reply...
anonymous wrote : lujan99 -- ERROR: The list changes the number of items.!!!

Below is the entire callstack from the exception: 

Thanks to all, 

MG
07:57:17,885 ERROR [STDERR] Nov 13, 2007 7:57:17 AM 
com.sun.facelets.FaceletViewHandler handleRenderException
  | SEVERE: Error Rendering View[/SectionList.xhtml]
  | javax.el.ELException: /SectionList.xhtml: Error reading 'resultList' on 
type gov.hhs.fda.ocio.fdaaa.entity.SectionList_$
  | $_javassist_1
  | at 
com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:48)
  | at 
com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
  | at 
org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
  | at 
org.richfaces.renderkit.html.PanelRenderer.doEncodeBegin(PanelRenderer.java:168)
  | at 
org.richfaces.renderkit.html.PanelRenderer.doEncodeBegin(PanelRenderer.java:128)
  | at 
org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
  | at 
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
  | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
  | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
  | at 
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
  | at 
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
  | at 
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
  | at 
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
  | at 
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  | at 
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
  | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
  | at 
org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
  | at 
org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at 
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at 
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at 
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
  | at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
  | at 
org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  | at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  | at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  | at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
  | at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  | at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  | at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  | at 

[jboss-user] [JBoss Seam] - EntityQuery Restrictions/SG problems with Integer Field in q

2007-11-12 Thread griffitm
Hello All, 

I am having a problem with a component generated from SeamGen.  I have a query 
form that allows the user to search the resultList as such:
h:form id=sectionSearch styleClass=edit
  | 
  | rich:simpleTogglePanel label=Section search parameters 
switchType=ajax
  | 
  | s:decorate template=layout/display.xhtml
  | ui:define name=labelNumber/ui:define
  | h:inputText id=number 
value=#{sectionList.section.number}/
  | /s:decorate
  |   ...  
  | 

The SectionList Entity Query has a restriction as such:

  | private static final String[] RESTRICTIONS = {
  | lower(section.description) like 
concat('%',concat(lower(#{sectionList.section.description}),'%')),
  | lower(section.number) like 
concat('%',concat(lower(#{sectionList.section.number}),'%')),};
  | lower(section.subsection) like 
concat('%',concat(lower(#{sectionList.section.subsection}),'%')),};
  | 

The problem is that when I display the form the query field is bound to the 
current section, and which returns 0 for the section # -- and my query results 
only show sections where the section # has a Zero in it.  I tried to 
dynamically inspect the query value in the overridden getRestrictions method as 
such:

  | @Override
  | public ListString getRestrictions() {
  | ListString restrictions= Arrays.asList(RESTRICTIONS);
  | if(section.getNumber()  0){
  | restrictions.add(lower(section.number) like 
concat('%',concat(lower(#{+ section.getNumber() +}),'%')));
  | }
  | return restrictions;
  | }
But that throws an this exception:
  | javax.el.ELException: /SectionList.xhtml: Error reading 'resultList' on 
type gov.hhs.fda.ocio.fdaaa.entity.SectionList_
  | $_javassist_0
  | at 
com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:48)
  | at 
com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
  | at 
org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
  | at 
org.richfaces.renderkit.html.PanelRenderer.doEncodeBegin(PanelRenderer.java:168)
  | at 
org.richfaces.renderkit.html.PanelRenderer.doEncodeBegin(PanelRenderer.java:128)
  | at 
org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
  | at 
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
  | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
  | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
  | at 
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
  | at 
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
  | at 
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
  | at 
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
  | at 
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  | at 
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
  | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
  | at 
org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
  | at 
org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at 
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at 
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at 
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
  | at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
  | at 
org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at 

[jboss-user] [JBoss Seam] - ClassCast Exception when trying to get a Seam Managed Statef

2007-11-08 Thread griffitm
Hi All, 

I am getting this error when trying to get a seam managed component from a 
servlet.

java.lang.ClassCastException: org.javassist.tmp.java.lang.Object_$$_javassist_0
  | at 
action.gov.hhs.fda.ocio.fdaaa.servlet.ExcelExportServlet.service(ExcelExportServlet.java:42)
  | at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

The offending line in the servlet looks like this:
DeliverableSearchAction searchAction = (DeliverableSearchAction) 
Component.getInstance(deliverableSearch);

The component is defined as:
@Stateful
  | @Name(deliverableSearch)
  | @Scope(ScopeType.SESSION)
  | public class DeliverableSearchAction implements DeliverableSearch, 
Serializable { ...
  | 

I have the following mapping in my components.xml file:
web:context-filter url-pattern=/excel/

I have the following servlet mapping in my web.xml:

  |servlet
  |   servlet-nameExcel Export Servlet/servlet-name
  |   
servlet-classaction.gov.hhs.fda.ocio.fdaaa.servlet.ExcelExportServlet/servlet-class
  |/servlet
  |
  |servlet-mapping
  |   servlet-nameExcel Export Servlet/servlet-name
  |   url-pattern/excel/url-pattern
  |/servlet-mapping
  | 

Can anyone point out what I am doing wrong? I'd simply like to get a reference 
to the seam managed bean so I can get my data from it and export it in Excel 
format using POI.  

Any help would be much appreciated!

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4103123#4103123

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4103123
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: DataTable Sorting Example

2007-10-26 Thread griffitm
The root cause of the exception was null pointer in isNextExists(); The error 
seems to be related to getMaxResults() returning a null if no resultset has 
been defined.

Adding max-results=25 to the framework query fixed the error, but it seems like 
the error should be caught in getMaxResults and handled there.

The unfortunate thing is that this implementation suffers from the same problem 
that my original implementation does.  The list appears, you can click on next 
page to navigate to the next page, click on previous page to return to the 
first page and the pagination disappears. 

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4099321#4099321

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4099321
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery Restrictions

2007-10-26 Thread griffitm
It seems that if you specify a query declaratively using the framework entity 
query, you loose the ability to sort data in a data table, because the data is 
always returned in the same order by the query.  Can you pass the order by 
clause dynamically by declaring it as something that is a parameter to the 
query?

Thanks in advance,
MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4099338#4099338

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4099338
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Sorting Detail data in Master/Detail

2007-10-26 Thread griffitm
All, 

I have some seam generated pages show master/detail records.  If you've used 
seamgen generate-entities to create entities and pages then you know what I 
mean.  If I have a relationship between 2 tables (A) Status and (B) 
Deliverables -- I start from the status page viewing a list.  This list can be 
sorted by clicking on the table headers, which re-executes the SQL query 
passing the order by clause based on the table header.  

However, if I drill down into a single status and you see all the deliverables 
associated with the selected record, these records appear in a random order.

Is there an easy way to provide the related child data (Deliverables -- joined 
or sub-query) in a ordered fashion?  The data is loaded from the collection 
that is part of the master entity, not in a separate SQL query.

Any help would be appreciated

Best Regards, 
MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4099349#4099349

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4099349
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Sorting Detail data in Master/Detail

2007-10-26 Thread griffitm
Ok, I found that I can at least control the detail records by using the JPA 
annotation @OrderBy on the many to one relationship as such:


  | @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, 
mappedBy=section)
  | @OrderBy(dueDate)
  | public SetDeliverable getDeliverables(){
  |   return this.deliverables;
  | }
  | 

Does anyone have any idea how to sort the list dynamically from that point 
forward?

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4099381#4099381

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4099381
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: DataTable Sorting Example

2007-10-26 Thread griffitm
Update to my problem:  Adding action=pageControllerBean.action fixed the 
pagination problem.

This is strange, maybe a bug? The initial result set that I was trying to 
paginate was being managed by a stateful session bean that encapsulated an 
EntityQuery object.  I had some logging code in the search() method of my bean 
to display the query parameters, and everything looked as I suspected -- 
however I could not get my page to sort or paginate correctly until I added the 
attribute action to the link.  

So my source went from:
s:link view=/DeliverableSearch.xhtml 
  | rendered=#{deliverableSearch.previousExists} 
  |value=#{messages.left}#{messages.left} First Page
  |   id=firstPage
  |   f:param name=firstResult value=0/
  | /s:link
To:

  | s:link view=/DeliverableSearch.xhtml 
action=#{deliverableSearch.search}
  | rendered=#{deliverableSearch.previousExists} 
  |value=#{messages.left}#{messages.left} First Page
  |   id=firstPage
  |   f:param name=firstResult value=0/
  | /s:link

I added the same action attribute to the link that sorted the data as well.  
This fixed both the pagination and sorting issue.  The question is, why was the 
page not performing as expected before, when clearly I know the search method 
on the bean was being called because I could see the output in the log file...

Best Regards,


MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4099478#4099478

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4099478
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: DataTable Sorting Example

2007-10-25 Thread griffitm
Ok, I tried restructuring this as a framework query, and the query works, but 
the pagination throws an exception.

First the query as defined in components.xml:
   framework:entity-query name=deliverableSearchList
  |entity-manager=#{em}
  |ejbql=select d from Deliverable d
  |order=d.dueDate
  |framework:restrictions
  |valued.dueDate  #{search.fromDate}/value
  |valued.dueDate  #{search.toDate}/value
  |/framework:restrictions   
  |/framework:entity-query
  | 

And My XHTML:

  | !DOCTYPE composition PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
  |  
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  | 
  | ui:composition xmlns=http://www.w3.org/1999/xhtml;
  | xmlns:s=http://jboss.com/products/seam/taglib;
  | 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;
  | template=layout/template.xhtml
  |
  | ui:define name=body
  | 
  | h:messages globalOnly=true styleClass=message id=globalMessages/
  | 
  | h:form id=searchCriteria styleClass=edit
  | 
  | fieldset
  | rich:simpleTogglePanel label=Deliverable Date Search 
switchType=ajax
  | 
  | s:decorate template=layout/display.xhtml
  | ui:define name=labelFrom Due Date:/ui:define
  | rich:calendar id=fromDueDate popup=true 
enableManualInput=true
  |   value=#{search.fromDate} pattern=MM/dd/ 
  |   event=onclick 
reRender=completionDateDecoration bypassUpdates=true/
  | 
  | /s:decorate
  | 
  | s:decorate template=layout/display.xhtml
  | ui:define name=labelTo Due Date:/ui:define
  | rich:calendar id=toDueDate popup=true 
enableManualInput=true
  |   value=#{search.toDate} pattern=MM/dd/ 
  |   event=onclick 
reRender=completionDateDecoration bypassUpdates=true/
  | /s:decorate
  | 
  | /rich:simpleTogglePanel
  | 
  | div class=actionButtons
  | h:commandButton id=search value=Search 
action=/Search.xhtml/
  | /div
  |/fieldset
  | /h:form
  | 
  | 
  | rich:panel
  | f:facet name=headerDeliverable Search Results/f:facet
  | div class=results id=deliverableSearchList
  | 
  | h:outputText value=No deliverable exists 
  |rendered=#{empty deliverableSearchList.resultList}/
  |
  | rich:dataTable id=deliverableSearchList 
  | var=deliverable
  |   value=#{deliverableSearchList.resultList} 
  |rendered=#{not empty deliverableSearchList.resultList}
  | h:column
  | f:facet name=header
  | s:link styleClass=columnHeader
  |  value=Deliverable 
#{deliverableSearchList.order=='description asc' ? messages.down : ( 
deliverableSearchList.order=='description desc' ? messages.up : '' )}
  | f:param name=order 
value=#{deliverableSearchList.order=='description asc' ? 'description desc' : 
'description asc'}/
  | /s:link
  | /f:facet
  | #{deliverable.description}
  | /h:column
  | h:column
  | f:facet name=header
  | s:link styleClass=columnHeader
  |  value=Due Date 
#{deliverableSearchList.order=='dueDate asc' ? messages.down : ( 
deliverableSearchList.order=='dueDate desc' ? messages.up : '' )}
  | f:param name=order 
value=#{deliverableSearchList.order=='dueDate asc' ? 'dueDate desc' : 'dueDate 
asc'}/
  | /s:link
  | /f:facet
  | #{deliverable.dueDate}
  | /h:column
  | /rich:dataTable
  | 
  | /div
  | /rich:panel
  | 
  | div class=tableControl
  |   
  | s:link view=/Search.xhtml 
  | rendered=#{deliverableSearchList.previousExists} 
  |value=#{messages.left}#{messages.left} First Page
  |   id=firstPage
  |   f:param name=firstResult value=0/
  | /s:link
  | 
  | s:link view=/Search.xhtml 
  | rendered=#{deliverableSearchList.previousExists} 
  |value=#{messages.left} Previous Page
  |   id=previousPage
  | f:param name=firstResult 
  | value=#{deliverableSearchList.previousFirstResult}/
  | /s:link
  | 
  |  

[jboss-user] [JBoss Seam] - Re: EntityQuery Restrictions

2007-10-25 Thread griffitm
Overriding the getOrder method as below then disables the clickable sorting 
feature of the data tables:

  | h:column
  | f:facet name=header
  | s:link styleClass=columnHeader
  |  value=Description 
#{statusList.order=='description asc' ? messages.down : ( 
statusList.order=='description desc' ? messages.up : '' )}
  | f:param name=order 
value=#{statusList.order=='description asc' ? 'description desc' : 
'description asc'}/
  | /s:link
  | /f:facet
  | #{status.description}
  | /h:column
  | 
No longer seems to work, because I suspect the sort order is always returned by 
the Entity as what is returned by getOrder().  Is there any way for both to 
happily co-exist?

Do I need to override setOrder as well, and only return the hard coded value if 
null?

Thanks in advance for any help!
MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4099031#4099031

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4099031
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery Restrictions

2007-10-25 Thread griffitm
This seems to work:

  | @Override
  | public String getOrder(){
  | if(super.getOrder() == null){
  | return status.sortOrder;
  | }
  | return super.getOrder();
  | 
  | }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4099041#4099041

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4099041
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Need Hibernate Filter Example

2007-10-24 Thread griffitm
Hello All, 

I have a scenario where I want users to only be able to view/edit data that 
they have access to based on what group they happen to be in.  My thought was 
to use Hibernate Filter for this, and the reference guide gives a brief note on 
Hibernate filters in section 8.6. Using Hibernate filters -- but not a complete 
enough listing for someone who's never tried this implementation before. 

Can anyone point me to a more robust example of how to integrate this into Seam 
2.0?

Thanks in advance!
MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4098357#4098357

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4098357
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - EntityQuery Restrictions

2007-10-24 Thread griffitm
Hello All, 

I have some components generated by seamgen, specifically the EntityQuery Lists 
that relate to a list of entity objects.  The seam generated search form allows 
the restrictions to be passed to the query:

  | public class StatusList extends EntityQuery {
  | 
  | private static final String[] RESTRICTIONS = 
{lower(status.description) like concat('%', 
concat(lower(#{statusList.status.description}),'%')),};
  | ...
  | private Status status = new Status();
  | 
  | @Override
  | public String getEjbql() {
  | return select status from Status status order by 
status.sortOrder;
  | }
  | ...
The query works well if no parameters are passed to the restrictions, the list 
is returned in the correct order, however if I pass a parameter to the 
restrictions clause the predicates of where/order are mixed up and invalid SQL 
is executed, which of course produces an error.

What is the correct way to approach this?

Thanks in advance!
MG


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4098380#4098380

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4098380
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: DataTable Sorting Example

2007-10-24 Thread griffitm
Pete, 

Thanks for the reply.  I can have a stateful session bean that extends 
EntityQuery?  I guess I didn't think of that.  What I ended up doing was using 
EntityQuery to perform my query, and exposing the methods from EntityQuery that 
are used by the JSF pages for sort/filtering. It mostly works. The list 
appears, with the pagination, but when I go to the 2nd page then go back to the 
first page, the pagination links disappear.  The expression I'm using for 
rendered always returns false.  Its something like:
 
  | 
  | From the view...
  | s:link view=DeliverableSearch.xhtml 
rendered=#{deliverableSearch.previousExists} .../
  | 
  | From the Stateful session bean... 
  | DeliverableSearch.java
  | ...
  | public boolean getPreviousExists(){
  |return enitiyQuery.isPreviousExists(); // internal instance var for query
  | }

Maybe isPreviousExists doesn't do what I think it does.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4098527#4098527

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4098527
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery Restrictions

2007-10-24 Thread griffitm
Doh! Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4098528#4098528

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4098528
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: DataTable Sorting Example

2007-10-24 Thread griffitm
Pete, 

I thought of doing this as a declared query, in components.xml -- but the 
search is a on a date range of a field on the entity bean.  All of the examples 
I've seen use the instance of the entity to back the search form, and to submit 
the form values for the query -- Unless you use a session bean.  Is there a way 
I can declare the query in my components.xml file like:


  | select d from Deliverable d where d.dueDate  :parm1 and d.dueDate  :parm2
  | 

Then bind the parameters from a search form?

Thanks in advance, 

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4098547#4098547

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4098547
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Form Element ID changed

2007-10-19 Thread griffitm
Thanks for the reply. I was able to use the prototype form.getInputs('text') to 
get an array of my form elements and replace the values that way. However, this 
doesn't work like I expected.  Even though the HTML form contains the correct 
values, the bean that the search is bound to has the old values.  I'm not sure 
if I can get around that, or if Ajax would be a better way to approach this 
after all.

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4097051#4097051

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4097051
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Form Element ID changed

2007-10-19 Thread griffitm
Hello All, 

Using Seam 2.0.0CR1, I have a form where I want to change the value of a 
rich:calendar/ element based on the selection of a DDLB.  It seems overkill 
to use Ajax, and to make a round trip to the server in order to change the 
value of an HTML input -- so I wrote  a simple JS function to change the value:

First the JSF Source:
  | rich:simpleTogglePanel label=Deliverable Date Search 
switchType=ajax
  | s:decorate template=layout/display.xhtml
  | ui:define name=labelSelect Period:/ui:define
  | h:selectOneMenu id=period 
onchange=setPeriod(this.value);
  | f:selectItem itemLabel=Next 30 Days itemValue=30/
  | f:selectItem itemLabel=Next 60 Days itemValue=60/
  | f:selectItem itemLabel=Next 90 Days itemValue=90/
  | f:selectItem itemLabel=Next 120 Days 
itemValue=120/
  | f:selectItem itemLabel=Next 365 Days 
itemValue=365/
  | /h:selectOneMenu
  | /s:decorate
  | s:decorate template=layout/display.xhtml
  | ui:define name=labelFrom Due Date:/ui:define
  | rich:calendar id=fromDueDate popup=true 
enableManualInput=true
  |   value=#{deliverableSearch.fromDate} 
pattern=MM/dd/ 
  |   event=onclick 
reRender=completionDateDecoration bypassUpdates=true/
  | 
  | /s:decorate
  | s:decorate template=layout/display.xhtml
  | ui:define name=labelTo Due Date:/ui:define
  | rich:calendar id=toDueDate popup=true 
enableManualInput=true
  |   value=#{deliverableSearch.toDate} 
pattern=MM/dd/ 
  |   event=onclick 
reRender=completionDateDecoration bypassUpdates=true/
  | /s:decorate
  | /rich:simpleTogglePanel
  | 

The JS Source:

  |   script type=text/javascript
  | //![CDATA[
  | function setPeriod(days){
  | var today= new Date();
  | var newDate= new Date(today.getTime() + 
days*24*60*60*1000);
  | var form= document.forms[0];
  | form.fromDueDate.value= today;
  | form.toDueDate.value= newDate;
  | form.submit();
  | return;
  | }
  | // ]]
  |   /script 

The problem is that the JS code errors because the id's of the HTML form 
elements are mangled by RichFaces.  How can I get the ID's of the elements as 
they appear in the cooked page in order to make this JS function work?

Thanks in advance, 
MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4097022#4097022

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4097022
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: PropertyNotFoundException, something I am overlooking...

2007-10-18 Thread griffitm
Arg! Now I am getting a LazyInitializationException:
  | 09:34:39,137 ERROR [LazyInitializationException] could not initialize proxy 
- no Session
  | org.hibernate.LazyInitializationException: could not initialize proxy - no 
Session when I execute my query:
deliverables = em.createQuery(select d from Deliverable d).getResultList();
How can I force all of the associations to be retrieved as well?  Why is this 
automatically done with EntityHome objects and not other queries?

Thanks in advance!
MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4096593#4096593

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4096593
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - DataTable Sorting Example

2007-10-18 Thread griffitm
Hello All, 

I have a seam-gen app that gives me a pretty good head start for the simple 
crud operations needed to maintain a database. I like the pagination of data 
that is baked in to the JSF pages as the data sources for the components are 
backed by the EntityQuery objects.  However, I have a few instances where I 
need to build a custom query or do some Ajax look ahead type of querying, and 
I'd like my datatables in those lists to look and feel like the datatables that 
are bound to the EntityQuerys.  The nice thing about the EntityQuery is that 
you get the pagination and ability to resort the data simply.  Can I use this 
in my Stateful session bean instead of using EntityManager.createQuery()? 

Does anyone know of an example where the data for the JSF page is coming from a 
session bean page controller and has the ability to sort/paginate data easily?

Thanks in advance!

Cheers!
mg

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4096713#4096713

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4096713
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen EntityList, how to disable auto search

2007-10-17 Thread griffitm
I too have a related need. I want to be able to provide a date range search on 
an Entity that has a due date field.  It sounds like this can't be done with 
EntityQuery?  I have to write a session bean and handle it that way?

Any advice?

Best Regards,
MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4096228#4096228

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4096228
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - PropertyNotFoundException, something I am overlooking...

2007-10-17 Thread griffitm
Hello All, 

I am trying to implement a search function, and I have been using the seam 
booking demo as a reference. I am not sure how my code is materially different 
from the example, but I am getting this error:
javax.el.PropertyNotFoundException: /DeliverableSearch.xhtml @21,113 
value=#{deliverableSearch.searchString}: 
  | Property 'searchString' not found on type 
org.javassist.tmp.java.lang.Object_$$_javassist_5 I cannot get past this and I 
know its something simple...  
I have a form:
   h:form id=searchCriteria styleClass=edit
  | fieldset
  | rich:simpleTogglePanel label=Deliverable Date Search 
switchType=ajax
  | s:decorate template=layout/display.xhtml
  | ui:define name=labelFrom Due Date:/ui:define
  | h:inputText id=searchString 
value=#{deliverableSearch.searchString}/
  | /s:decorate
  | /rich:simpleTogglePanel
  | 
  | div class=actionButtons
  | h:commandButton id=search value=Search 
action=#{deliverableSearch.search}/
  | /div
  |/fieldset
  | /h:form

And my session bean:
  | @Stateful
  | @Name(deliverableSearch)
  | @Scope(SESSION)
  | public class DeliverableSearchAction implements DeliverableSearch, 
Serializable {
  | 
  | @Logger
  | Log log;
  | 
  | @In
  | private String searchString;
  | 
  | @PersistenceContext
  | EntityManager em;
  | 
  | @DataModel
  | private ListDeliverable deliverables;
  | 
  | public void search() {
  | 
  | log.info(Deliverable search from:  + searchString );
  |  deliverables = em.createQuery(select d from Deliverables 
d).getResultList();
  | }
  | 
  | @End
  | public void reset() { }
  | 
  | @Destroy
  | @Remove
  | public void destroy() { }
  | 
  | public String getSearchString() {
  | return searchString;
  | }
  | 
  | public void setSearchString(String searchString) {
  | this.searchString = searchString;
  | }
  | 

I must be missing something somewhere, but this looks exactly like the examples 
to me.  

Oh, I realize the search isn't actually being performed here, I am just unsure 
why I am getting the EL error!

Any help would be appreciated!

Cheers!

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4096312#4096312

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4096312
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: PropertyNotFoundException, something I am overlooking...

2007-10-17 Thread griffitm
Doh!  That was it. Thanks for the shove. More proof that EJB3, although much 
better than previous versions is not idiot (me) proof.

Cheers!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4096338#4096338

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4096338
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Conditional Cross Field Validation on Entity Bean

2007-10-16 Thread griffitm
Maybe this is more of an EJB3 question, but is it possible to have a 
conditional cross field validation using annotation on my entity bean? I have 2 
fields on an entity I want to do something like:
if field1= 'Other' then require field2

Can this be done with annotations?

Thanks in advance, 

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4095820#4095820

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4095820
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2007-10-15 Thread griffitm
Trying to drop in the Audit function, here's what I did:


  | Added the lib to my classpath
  | Changed my entity to inherit from AuditHome instead of Entity Home
  | Added @Auditable annotation to the field I want to track
  | 
  | When I deploy the application and try to access the class that is marked 
auditable (Status.java) I get the following error:
  | [SeamPhaseListener] uncaught exception
  |   | org.jboss.seam.RequiredException: In attribute requires non-null value: 
statusHome.auditHomeEntityManager
  | What am I missing?
  | 
  | Any help would be appreciated! 
  | MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4095413#4095413

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4095413
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2007-10-15 Thread griffitm
Ok, it helps if you bind the auditHomeEntityManager, I did that and got past 
the initial error. Now when I try to edit the entity that is marked @Auditable 
I get this error on update:
17:53:35,633 FATAL [application] java.lang.IllegalArgumentException: Unknown 
entity: uk.co.splendid.audit.AuditLog
  | javax.faces.el.EvaluationException: java.lang.IllegalArgumentException: 
Unknown entity: uk.co.splendid.audit.AuditLog
  | at 
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:9
  | 1)

The 2 required tables have not been created in my table space, is that the 
reason for the error?

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4095430#4095430

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4095430
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2007-10-15 Thread griffitm
I created the required tables and still get the same error, has anyone been 
able to successfully get this example to work in an application?

Any help would be much appreciated.

Cheers!
MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4095434#4095434

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4095434
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Create New Entity - Page Round Trip Update autoincrem

2007-10-09 Thread griffitm
These are seamgen generated variable and class names, based on the tables that 
are backed by the EJB3 entity beans.  If the names of the variables are wrong, 
its because they were generated incorrectly.  I don't think that is the case.  
Can someone point me to a request/response cycle for SEAM?  The seam reference 
guide states:
anonymous wrote : You can define actions and parameters for
  | a page with the view id /calc/calculator.jsp in a resource named 
calc/calculator.page.xml. The root
  | element in this case is the  element, and the view id is implied:

Is there some sort of impedance between what the convention is and what seamgen 
generates?

Thanks in advance.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4093004#4093004

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4093004
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Create New Entity - Page Round Trip Update autoincrem

2007-10-09 Thread griffitm
In the struts world, I've dealt with this by getting the ID after update and 
explicitly updating my model with the id after the DB update. This is usually 
done in the struts action class.

Is there a similar metaphor for doing this in seam? Do I need to have a 
stateless session bean that updates something? I am not quite sure how this 
would map back to my model or page parameter.  I can't believe this is a 
difficult problem, only one where I do not know where the answer lives.

Anyone have the same problem and overcome it? Any help would be much 
appreciated! 

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4093100#4093100

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4093100
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Create New Entity - Page Round Trip Update autoincrem

2007-10-09 Thread griffitm
Since I seem to be having this conversation with myself, I thought I'd post the 
solution so I would know what I did wrong.  When I used seamgen to generate the 
entities seam generate-entities It did not properly add the @GeneratedValue 
annotation to the entity class for the autoincrement field in the table. I'm 
not sure if this is a hibernate defect, seamgen defect or user error --but it 
sure was looking for a needle in a haystack. 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4093184#4093184

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4093184
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Create New Entity - Page Round Trip Update autoincrement

2007-10-08 Thread griffitm
Hello all, 

I am new to seam  JSF in general, I have searched the forum for this problem 
and could not find anything related.  I am using an application that was 
generated by seamgen. 

I have an entity, called status.  If I create a new status, the proper table is 
updated, but upon the round trip from the server, the page does not contain the 
autoincremented ID from the status table.  Subsequently, when I try to add 
related information or update it without going back to the list to select it, I 
get an error, because the ID = 0, which of course is incorrect. 

I'm sure there must be a common way to handle this type of situation. 

I have the status id mapped as follows in my xhtml fragment:

  | s:decorate id=idDecoration template=layout/edit.xhtml
  | ui:define name=labelid/ui:define
  | h:inputText id=id
  |required=true
  |disabled=#{statusHome.managed}
  |   value=#{statusHome.instance.id}
  | a:support event=onblur reRender=idDecoration 
bypassUpdates=true/
  | /h:inputText
  | /s:decorate
  | 

Can anyone give me a push in the right direction?  Ideally, I want the id field 
to appear as a hidden field so the user does not see it.

I am using seam 2.0.0CR1. 

Thanks in advance, 

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4092675#4092675

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092675
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Create New Entity - Page Round Trip Update autoincrem

2007-10-08 Thread griffitm
Oops, I meant to submit this for Seam forum.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4092676#4092676

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092676
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Create New Entity - Page Round Trip Update autoincrement

2007-10-08 Thread griffitm
Re: Create New Entity - Page Round Trip  Update autoincrement

Hello all, 

I am new to seam  JSF in general, I have searched the forum for this problem 
and could not find anything related.  I am using an application that was 
generated by seamgen. 

I have an entity, called status.  If I create a new status, the proper table is 
updated, but upon the round trip from the server, the page does not contain the 
autoincremented ID from the status table.  Subsequently, when I try to add 
related information or update it without going back to the list to select it, I 
get an error, because the ID = 0, which of course is incorrect. 

I'm sure there must be a common way to handle this type of situation. 

I have the status id mapped as follows in my xhtml fragment:

  | s:decorate id=idDecoration template=layout/edit.xhtml
  | ui:define name=labelid/ui:define
  | h:inputText id=id
  |required=true
  |disabled=#{statusHome.managed}
  |   value=#{statusHome.instance.id}
  | a:support event=onblur reRender=idDecoration 
bypassUpdates=true/
  | /h:inputText
  | /s:decorate
  | 

Can anyone give me a push in the right direction?  Ideally, I want the id field 
to appear as a hidden field so the user does not see it.

I am using seam 2.0.0CR1. 

Thanks in advance, 

MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4092679#4092679

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092679
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Create New Entity - Page Round Trip Update autoincrem

2007-10-08 Thread griffitm
It seems as if persisting the entity is not tied to the correct instance?

My page navigation all look as follows:


  |param name=statusFrom/
  |param name=statusId value=#{statusHome.statusId}/
  | 

The value that is tied to the HTML for, (therefor the value that I would 
believe to be forwarded as a parameter after the persist method is:


  | h:inputText id=id
  |required=true
  |disabled=#{statusHome.managed}
  |   value=#{statusHome.instance.id}
  | a:support event=onblur reRender=idDecoration 
bypassUpdates=true/
  | /h:inputText

Am I on the wrong track here?  

Thanks in advance for any suggestions!
MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4092796#4092796

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092796
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Simple selectOneMenu Example/seamgen

2007-10-04 Thread griffitm
Upgrading to 2.0.0.CR1 fixed the problem. Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4091715#4091715

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4091715
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Simple selectOneMenu Example/seamgen

2007-10-03 Thread griffitm
Pete, 

Thanks for the reply. I am using 2.0.0.BETA1 w/JBoss 4.2.1.GA. I'll download 
the latest. I assume I can just overwrite my project/lib directory with the 
libs in the latest distro.  Do I need to do anything else (other than a clean 
build?)

Cheers!
MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4091286#4091286

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4091286
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Simple selectOneMenu Example/seamgen

2007-10-03 Thread griffitm
Pete, 

Thanks for the reply. Something really strange is going on.  The best way to 
describe what is happening is I have several of these drop down lists, one for 
status, one for priority, etc. I can go in and make an unrelated change to the 
xhtml fragment, compile and deploy it and the error below fires on one of the 
list boxes.  I go back to the xhtml, re-edit the selectOneMenu with the exact 
same information, deploy it and the problem moves to the next list box. Its 
like I have the wrong version of a serialized object or something.  I 
stop/start JBoss, but the problem remains.

Any ideas?

Cheers!
MG

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4091267#4091267

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4091267
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Simple selectOneMenu Example/seamgen

2007-10-02 Thread griffitm
Damian, 

Thanks for the reply. I thought I was on the right track from looking at this 
related link: http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamEntityConverter

Here is my deliverableHome class:

  | package gov.hhs.fda.ocio.fdaaa.entity;
  | 
  | import org.jboss.seam.annotations.In;
  | import org.jboss.seam.annotations.Name;
  | import org.jboss.seam.framework.EntityHome;
  | 
  | @Name(deliverableHome)
  | public class DeliverableHome extends EntityHomeDeliverable {
  | 
  | @In(create = true)
  | StatusHome statusHome;
  | 
  | public void setDeliverableId(Integer id) {
  | setId(id);
  | }
  | 
  | public Integer getDeliverableId() {
  | return (Integer) getId();
  | }
  | 
  | @Override
  | protected Deliverable createInstance() {
  | Deliverable deliverable = new Deliverable();
  | return deliverable;
  | }
  | 
  | public void wire() {
  | Status status = statusHome.getDefinedInstance();
  | if (status != null) {
  | getInstance().setStatus(status);
  | }
  | }
  | 
  | public boolean isWired() {
  | if (getInstance().getType() == null)
  | return false;
  | if (getInstance().getStatus() == null)
  | return false;
  | if (getInstance().getConsequence() == null)
  | return false;
  | return true;
  | }
  | 
  | public Deliverable getDefinedInstance() {
  | return isIdDefined() ? getInstance() : null;
  | }
  | 
  | }
  | 

As for the right package, I believe so. It was all generated by seamgen. Does 
the entity-query need to specify the entire package? I tend to think this is a 
problem with mapping to the deliverableHome.status property.  I have 2 records 
in the status table which looks like this:

  | ID   Description
  | 1 In-Progress
  | 2 On-Hold
  | 

I set the status_id to 2, and when I bring up the record to edit it, the status 
selected in the select box is 1, In-Progress.  In the struts world, this would 
tell me that the HTML fragment generated doesn't match the struts bean mapped 
to the action.

Any thoughts?

Thanks in advance!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4090650#4090650

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4090650
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Simple selectOneMenu Example/seamgen

2007-10-02 Thread griffitm
Ok, I got the problem sorted. 

The problem was that I had the convertEntity tag before selectOneMenu. The 
solution was to move it AFTER the selectOneMenu, thusly:

  |  s:decorate id=statusDecoration template=layout/edit.xhtml
  | ui:define name=labelstatus/ui:define
  |h:selectOneMenu id=status 
value=#{deliverableHome.instance.status}
  |s:selectItems value=#{allStatus.resultList} 
  |   var=status noSelectionLabel=Select...
  |   label=#{status.description}/
  |s:convertEntity /
  |/h:selectOneMenu
  | /s:decorate
  | 

I spent the better part of a day trying to figure this out. The solution is not 
immediately obvious, and the error message was completely unhelpful to try and 
diagnose the problem. 

IMHO, this type of example should be part of the seam 101 examples. In every 
web app there is always a controlled vocabulary list where the user needs to 
pick a value from a list. 

Thanks for reading and replying to my post.  I hope this reply helps someone in 
the future.

Cheers!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4090667#4090667

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4090667
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Simple selectOneMenu Example/seamgen

2007-10-01 Thread griffitm
Hi All, 

I am coming from a struts back ground, and I am lost for where to start trying 
to debug this problem.  I have an Object (Delivery) with an association from a 
pick list (Status)

I created a seam-gen project and played around with it, but I don't want to 
have to navigate to a different web page just to pick the status for my 
delivery. I want to provide a DDLB on the delivery edit page, and allow the 
user to select from a list that is in the status DB.  Seems simple enough, in 
Struts I'd simply put this list into a context and reference it. What I did in 
Seam may not be right.

In the components.xml file, I defined a framework query like this:

  framework:entity-query name=allStatus
  | entity-manager=#{em}
  | ejbql=select s from Status s
  | order=s.description/ 

Then I reference it in my xhtml file as follows:
s:decorate id=statusDecoration template=layout/edit.xhtml
  | ui:define name=labelstatus/ui:define
  |h:selectOneMenu id=status 
value=#{deliverableHome.instance.status}
  |s:convertEntity /
  |s:selectItems value=#{allStatus.resultList} 
  | var=deliverableHome.instance.status
  |   label=#{status.description}/
  |/h:selectOneMenu
  | /s:decorate

The list of status codes show up in a drop down list, but when I try to save 
the record, I get an HBM mapping error:

java.lang.IllegalArgumentException: Unknown entity: 
gov.hhs.fda.ocio.fdaaa.entity.Status_$$_javassist_39
  | at 
org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:185)
  | at 
org.jboss.seam.persistence.EntityManagerProxy.find(EntityManagerProxy.java:85)
  | at 
org.jboss.seam.framework.EntityIdentifier.find(EntityIdentifier.java:26)
  | at 
org.jboss.seam.ui.converter.EntityConverterStore.get(EntityConverterStore.java:43)
  | at 
org.jboss.seam.ui.converter.EntityConverter.getAsObject(EntityConverter.java:81)
  | at 
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:152)
  | at 
com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectOneValue(MenuRenderer.java:197)
  | at 
com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:359)
  | at javax.faces.component.UIInput.getConvertedValue(UIInput.java:934)
  | at javax.faces.component.UIInput.validate(UIInput.java:860)
  | at javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
  | at javax.faces.component.UIInput.processValidators(UIInput.java:666)
  | at 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
  | at 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
  | at 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
  | at javax.faces.component.UIForm.processValidators(UIForm.java:229)
  | at 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
  | at 
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
  | at 
org.ajax4jsf.framework.ajax.AjaxViewRoot.access$201(AjaxViewRoot.java:53)
  | at 
org.ajax4jsf.framework.ajax.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:315)
  | at 
org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:53)
  | at 
org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:191)
  | at 
org.ajax4jsf.framework.ajax.AjaxViewRoot.processValidators(AjaxViewRoot.java:329)
  | at 
com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
  | at 
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  | at 
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
  | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
  | at 
org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at 
org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
  | at 
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | at 
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
  |