Re: css files cached

2005-09-29 Thread ir. ing. Jan Dockx
Thx for the info, I appreciate the effort!

(I am a Mac man myself BTW, and for personal use I apply Safari and Firefox). But that is irrelevant. This is a web app we are developing, and our _users_ can use any browser, and I cannot direct them to jump through such hoops. Furthermore, the behavior is cross-browser (hey! it's compatible! ;-) ).

Either Tomcat or the IIS is doing this, and that's where the problem needs to be solved. Since I never noticed this with Apache httpd, I presume it's IIS (but never having noticed it isn't exactly scientific proof …).


On 30 Sep 2005, at 1:26, Heinz Drews wrote:

Jan,

which browser do you use?
I guess IE.  It has an "automatic" option for the handling of HTTP
requests which means that  IE decides when it is convenient to ask for
a file.  This produces very erratic behavior.
I can't persuade my IE the show the english menus but it should be
Extras->Internet Options->General->Temporary Files->Options???. 
Anyhow, there the rightmost button.
Pops up the dialog to change the caching behavior.

I don't agree. That eats bandwidth.

I absolutely agree, the concept to deliver style information together
with each content is not the best idea.

Regards,
Heinz


Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85 
B-2660 Hoboken 
Tel: +32 3 448.33.38 
Fax: +32 3 448.32.66 

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/


Re: Autoscroll

2005-09-29 Thread Paul Klaer
The "window.scrollTo" function is available if you click on an object that  
is enabled for the scrolling option.
The main problem is that the js script is not forceen to handle html pages  
which use div tags.
I have the same problem and I am working on a solution, but right now I  
didn't had enough time to provide a valuable solution.


Fact is, that the window object doesn't access to the divs. And so, the  
window.scrollTo is always set to the x and y values -> 0.


So, if you want to use this function you have to foresee not to use  
overflow in your div tags...



On Thu, 29 Sep 2005 23:54:02 +0200, Julián García  
<[EMAIL PROTECTED]> wrote:



Sorry for the late reply, I was out of town.
Yes, my rendered HTML is full of div's. And yes, I have specified the  
parameter in my web.xml


The only scroll js code I can see is:

function getScrolling() {
var x = 0; var y = 0;
if (document.body && document.body.scrollLeft &&  
!isNaN(document.body.scrollLeft)) {

x = document.body.scrollLeft;
} else if (window.pageXOffset && !isNaN(window.pageXOffset)) {
x = window.pageXOffset;
}
if (document.body && document.body.scrollTop &&  
!isNaN(document.body.scrollTop)) {

y = document.body.scrollTop;
} else if (window.pageYOffset && !isNaN(window.pageYOffset)) {
y = window.pageYOffset;
}
return x + "," + y;


}

A commandLink looks like onclick="clear_content_3A_5Fid53();document.forms['content:_id53'].elements['autoScroll'].value=getScrolling();document.forms['content:_id53'].elements['content:_id53:_link_hidden_'].value='content:_id53:linkActualizar';document.forms['content:_id53'].elements['llave'].value='3';if(document.forms['content:_id53'].onsubmit){document.forms['content:_id53'].onsubmit();}document.forms['content:_id53'].submit();return  
false;" id="content:_id53:linkActualizar">

Its weird that I cannot see any reference to window.scrollTo in my  
rendered HTML code


Thanks for any help.

Paul Klaer wrote:


Did you specified "AUTO_SCROLL" in web.xml?

How is your HTML page looking like? Are you using divs or something  
else?


If you look in your HTML page, what values are set for the added   
javascript "window.scrollTo()"?



On Fri, 23 Sep 2005 22:38:22 +0200, Julián García   
<[EMAIL PROTECTED]> wrote:



The auto-scroll parameter is not working for me after reloading a page
when an actionListener executesare there any specific requirements
in order to make it work?

Thanks.

Julian.










Re: Tree2 and #{node.identifier}

2005-09-29 Thread Andreas Lund
Thanks a lot Sean! I must have had the wrong idea about what the 
identifier is in the first place. Now it makes a whole lot of more sense.


Thanks,

Andreas

Sean Schofield wrote:


Did you set the node identifier?  Its not populated by default.  So
when you are creating your hierarchy of tree node data you need to set
it to something meaningful.

sean

On 9/29/05, Andreas Lund <[EMAIL PROTECTED]> wrote:
 



Hi,



I am trying to get the hang of the tree2 component by means of modifying and
fiddling with the MyFaces examples.



Basically, I want to be able to click on a document node (I am using the
TreeBacker class as my backing bean class) and display some information
about the selected node. Everything seems to work just fine as long as I am
not trying to display the selected node's identifier. When I do that, no
data seems to be passed in the request.



Here is what I take to be the relevant piece of code:







   

   

   

   

   

   

   

   

   

   

   









When the user clicks the description text of a document node, the text gets
bold, just as in the MyFaces set of tree2 examples. The
retrieveParameterValue is executed (please, see below for the source of the
backing bean) and the value of the request parameter ("nodeInfo") is passed
on to the value of the outputText statement in the jsp.



public class NodeHandler

{

   private String value;



   public NodeHandler()

   {



   }



   public String getValue()

   {

   return value;

   }



   public void setValue(String value)

   {

   this.value = value;

   }



   public void retrieveParameterValue()

   {

   value =
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("nodeInfo").toString();

   }



}





Everything works as I expect it to (admittedly, I may expect the wrong
thing) as long as I am not trying to pass the node.identifier value:







As far as I can tell, the "nodeInfo" request parameter is part of the http
request but without a value.



If I use:

,

 or





It seems to work just fine (in the sense that I get the data I am asking
for).



Any hints or suggestions are greatly appreciated.



Regards,

Andreas Lund




   






Re: Tree2 and #{node.identifier}

2005-09-29 Thread Sean Schofield
Did you set the node identifier?  Its not populated by default.  So
when you are creating your hierarchy of tree node data you need to set
it to something meaningful.

sean

On 9/29/05, Andreas Lund <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi,
>
>
>
> I am trying to get the hang of the tree2 component by means of modifying and
> fiddling with the MyFaces examples.
>
>
>
> Basically, I want to be able to click on a document node (I am using the
> TreeBacker class as my backing bean class) and display some information
> about the selected node. Everything seems to work just fine as long as I am
> not trying to display the selected node's identifier. When I do that, no
> data seems to be passed in the request.
>
>
>
> Here is what I take to be the relevant piece of code:
>
>
>
> 
>
>
>
> 
>
> 
>
>  action="#{selectedNode.retrieveParameterValue}"
> styleClass="#{t.nodeSelected ? 'documentSelected':'document'}"
> actionListener="#{t.setNodeSelected}">
>
>  border="0"/>
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
>
>
> 
>
>
>
> When the user clicks the description text of a document node, the text gets
> bold, just as in the MyFaces set of tree2 examples. The
> retrieveParameterValue is executed (please, see below for the source of the
> backing bean) and the value of the request parameter ("nodeInfo") is passed
> on to the value of the outputText statement in the jsp.
>
>
>
> public class NodeHandler
>
> {
>
> private String value;
>
>
>
> public NodeHandler()
>
> {
>
>
>
> }
>
>
>
> public String getValue()
>
> {
>
> return value;
>
> }
>
>
>
> public void setValue(String value)
>
> {
>
> this.value = value;
>
> }
>
>
>
> public void retrieveParameterValue()
>
> {
>
> value =
> FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("nodeInfo").toString();
>
> }
>
>
>
> }
>
>
>
>
>
> Everything works as I expect it to (admittedly, I may expect the wrong
> thing) as long as I am not trying to pass the node.identifier value:
>
>
>
> 
>
>
>
> As far as I can tell, the "nodeInfo" request parameter is part of the http
> request but without a value.
>
>
>
> If I use:
>
> ,
>
>  or
>
> 
>
>
>
> It seems to work just fine (in the sense that I get the data I am asking
> for).
>
>
>
> Any hints or suggestions are greatly appreciated.
>
>
>
> Regards,
>
> Andreas Lund
>
>
>
>


Tree2 and #{node.identifier}

2005-09-29 Thread Andreas Lund








Hi,

 

I am trying to get the hang of the tree2 component by
means of modifying and fiddling with the MyFaces examples.

 

Basically, I want to be able to click on a document
node (I am using the TreeBacker class as my backing bean class) and display
some information about the selected node. Everything seems to work just fine as
long as I am not trying to display the selected node’s identifier. When I
do that, no data seems to be passed in the request.

 

Here is what I take to be the relevant piece of code:

 



 

   


   


   


   


   


   


   


    

   


    

    



 



 

When the user clicks the description text of a
document node, the text gets bold, just as in the MyFaces set of tree2 examples.
The retrieveParameterValue is executed (please, see below for the source of the
backing bean) and the value of the request parameter (“nodeInfo”) is
passed on to the value of the outputText statement in the jsp.

 

public class NodeHandler

{

    private String value;

 

    public NodeHandler()

    {

 

    }

 

    public String getValue()

    {

    return
value;

    }

 

    public void setValue(String value)

    {

    this.value
= value;

    }

    

    public void
retrieveParameterValue()

    {

    value =
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("nodeInfo").toString();

    }

    

}

 

 

Everything works as I expect it to (admittedly, I may
expect the wrong thing) as long as I am not trying to pass the node.identifier
value:

 



 

As far as I can tell, the “nodeInfo”
request parameter is part of the http request but without a value.

 

If I use:

,

 or



 

It seems to work just fine (in the sense that I get the
data I am asking for).

 

Any hints or suggestions are greatly appreciated.

 

Regards,

Andreas Lund

 

 








Re: NotSerializableException

2005-09-29 Thread Saul Qunming Yuan



Never mind, I didn't go through the followup emails 
when sending my email out.
 
 

  - Original Message - 
  From: 
  Saul Qunming 
  Yuan 
  To: MyFaces Discussion 
  Sent: Thursday, September 29, 2005 8:07 
  PM
  Subject: Re: 
  NotSerializableException
  
  This may not be related, but are you using client 
  to save the state as the following:
   
    
      
  javax.faces.STATE_SAVING_METHOD    
  client  
  
   
  I had to use to use "client" and then ran 
  into a few NotSerializableExceptions in my app, I then had to make my Backing 
  beans and it's member classes all serializable. So, try either changing 
  "client" to "server" for the above setting, or make all you Backing beans and 
  it's member classes serializable.
   
   
  Saul
   
   
   
  
- Original Message - 
From: 
Navid Vahdat 

To: MyFaces Discussion 
Sent: Thursday, September 29, 2005 2:20 
PM
Subject: Re: 
NotSerializableException
Just bringing this subject up once more. Somebody able to say 
something about it?Navid Vahdat wrote: 
Hi 
  Luca,the relevant JSP code is     
              
              
          *:    
              
              
              
              
              
              
              
              
              
              
              
          
              
              
               
              
              
                  
              
              
              
          
              
              
              
          
              
              
              
              
              
              
              
              
              
              
              
                  
              
              
  please find the whole JSP attached.editListBean 
  is a session scope bean that holds a dataobject -- a detail of a 
  master/detail relationship. This data object has a type, which can be the 
  below metamodel.ListType it has a name, a description and a couple of 
  other fields. The type is set in the selectDataType Dialog, which is 
  opened with the small looking glass to the right of the output 
  text.Thanks!NavidLuca Conte wrote: 
  Can U post the jsp code?
Navid Vahdat ha scritto:

  
Can somebody give me a hand on this? The Exception seems to be
connected to using a h:inputhidden with a custom converter. When the
value is null, everithing is fine. When the value is set to an object
(in this case metamodel.ListType), rendering the page is fine, but
triggering a UICommand that is not immediate causes the Exception.

I'm stuck. Is this a known bug?

Navid

Navid Vahdat wrote:


  Guys, I get this not serializable exception. The exception is
correct, because metamodel.ListType, a value in a hidden field with a
working converter, definitely is not serializable. Why is myFaces
(ver. 1.1.0) trying to serialize it?

Thanks,
Navid

28.09.2005 10:26:51 org.apache.myfaces.util.StateUtils encode64
SCHWERWIEGEND: Cannot encode Object with Base64
_java.io.NotSerializableException_: metamodel.ListType
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1054_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at java.util.ArrayList.writeObject(_ArrayList.java:529_)
at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

at java.lang.reflect.Method.invoke(_Method.java:324_)
at
java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)

at
java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)

at
java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)

at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1052_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at java.util.ArrayList.writeObject(_ArrayList.java:529_)
at sun.reflect.GeneratedMethodAccessor294.invoke(Un

Re: NotSerializableException

2005-09-29 Thread Saul Qunming Yuan



This may not be related, but are you using client 
to save the state as the following:
 
      
javax.faces.STATE_SAVING_METHOD    
client  

 
I had to use to use "client" and then ran into 
a few NotSerializableExceptions in my app, I then had to make my Backing beans 
and it's member classes all serializable. So, try either changing "client" 
to "server" for the above setting, or make all you Backing beans and it's member 
classes serializable.
 
 
Saul
 
 
 

  - Original Message - 
  From: 
  Navid Vahdat 
  To: MyFaces Discussion 
  Sent: Thursday, September 29, 2005 2:20 
  PM
  Subject: Re: 
  NotSerializableException
  Just bringing this subject up once more. Somebody able to say 
  something about it?Navid Vahdat wrote: 
  Hi 
Luca,the relevant JSP code is     
            
            
        *:    
                
            
                    
                
            
                
            
                
                
    
                
                
             
                
                
                
                
            
                
                
        
                
                
            
                
            
                
            
                
            
                    
            
            
    please find the whole JSP 
attached.editListBean is a session scope bean that holds a 
dataobject -- a detail of a master/detail relationship. This data object has 
a type, which can be the below metamodel.ListType it has a name, a 
description and a couple of other fields. The type is set in the 
selectDataType Dialog, which is opened with the small looking glass to the 
right of the output text.Thanks!NavidLuca Conte 
wrote: 
Can U post the jsp code?
Navid Vahdat ha scritto:

  
  Can somebody give me a hand on this? The Exception seems to be
connected to using a h:inputhidden with a custom converter. When the
value is null, everithing is fine. When the value is set to an object
(in this case metamodel.ListType), rendering the page is fine, but
triggering a UICommand that is not immediate causes the Exception.

I'm stuck. Is this a known bug?

Navid

Navid Vahdat wrote:


Guys, I get this not serializable exception. The exception is
correct, because metamodel.ListType, a value in a hidden field with a
working converter, definitely is not serializable. Why is myFaces
(ver. 1.1.0) trying to serialize it?

Thanks,
Navid

28.09.2005 10:26:51 org.apache.myfaces.util.StateUtils encode64
SCHWERWIEGEND: Cannot encode Object with Base64
_java.io.NotSerializableException_: metamodel.ListType
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1054_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at java.util.ArrayList.writeObject(_ArrayList.java:529_)
at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

at java.lang.reflect.Method.invoke(_Method.java:324_)
at
java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)

at
java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)

at
java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)

at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1052_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at java.util.ArrayList.writeObject(_ArrayList.java:529_)
at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

at java.lang.reflect.Method.invoke(_Method.java:324_)
at
java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)

at
java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)

at
java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)

at
java.io.ObjectOutputStream.

Re: Problem with MyEclipse 4.0/MyFaces 1.1.0/jscookmenu

2005-09-29 Thread Kevin
Thanks Simon.

Actually, I found my problem.

The JSF refresh problem was a problem with state.
I needed to add javax.faces.STATE_SAVING_METHOD to my deployment descriptor.

In the deployment descriptor (web.xml), add this section.

 
 javax.faces.STATE_SAVING_METHOD
 client
 

Now when I save my JSP changes, I see the change right away after a
browser refresh.
Very basic, but very easy to overlook.

Phew! Now I can REALLY get some work done now.


Cheers,

Kevin


On 9/29/05, Simon Kitching <[EMAIL PROTECTED]> wrote:
> Simon Kitching wrote:
> > Kevin wrote:
> >>
> >> I replaced the MyFaces support that shipped with MyEclipse 4.0 with
> >> MyFace 1.1.0.
> >> It seems to work...more or less.
> >>
> >> Here is a problem that I noticed.
> >>
> >> I am trying to use jscookmenu which is part of Tomahawk.
> >> My menu looks a little something like this:
> >>
> >>
> >> 
> >>
> >>  >> action="#{navBacking.home}" />
> >>
> >> Loading this up the first time, it works great (if you do everything
> >> right of course).
> >>
> >> However, when I make changes and save (which recompiles the JSP), I do
> >> not see the changes. This is true even if I do a reload in the Tomcat
> >> Web Application Manager.
> >> Strangely though, if I remove the menu completely from the JSP, save
> >> the JSP and reload it in the browser, then add it in again with the
> >> changes, save, etc. I can then see the changes.
> >> Example change = changing theme="ThemeOffice" to theme="ThemeMiniBlack"
> >> I think I know why I am not seeing these changes.
> >> If you do a View Source on a rendered JSP with a jscookmenu, you will
> >> see something like this in the HTML header.
> >>
> >>
> >>  >> src="/yourappname/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/JSCookMenu.js"
> >>
> >> type="text/javascript">
> >>  >> src="/yourappname/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/MyFacesHack.js"
> >>
> >> type="text/javascript">
> >>  >> src="/yourappname/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/ThemeMiniBlack/theme.js"
> >>
> >> type="text/javascript">
> >>  >> href="/hcrs/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/ThemeMiniBlack/theme.css"
> >>
> >> I believe that this "feature" is related ot the Apache MyFaces'
> >> Extensions Filter:
> >> http://myfaces.apache.org/tomahawk/extensionsFilter.html
> >>
> >> So, I think it is caching the CSS and JavaScript files in memory and
> >> not freeing them up when I recompile my JSP.
> >>
> >> Does anyone have any experience with this problem or has anyone tried
> >> out the jscookmenu under MyFaces 1.1.0 to confirm my suspicions?
> >
> >
> > In the URL
> >   /yourappname/.../11266487/JSCookMenu.js
> > the numeric part is indeed a "cache key".
>
> [nb: many lines removed from above thread]
>
> Actually, on re-reading your email, while I think my previous comments
> are correct I don't think they apply to your situation. You're not
> having problems with changing theme files and getting the cached
> version: you're having problems changing the theme specified in the jsf
> tag and not seeing updated HTML.
>
> Do you have something like this at the top of your JSP pages?
> 
> 
> 
>
> This is standard HTML stuff, not really anything related to JSF/JSP. If
> you don't have this then a browser or web-proxy can cache the HTML pages.
>
> Regards,
>
> Simon
>


Re: css files cached

2005-09-29 Thread Heinz Drews
Jan,

which browser do you use?
I guess IE.  It has an "automatic" option for the handling of HTTP
requests which means that  IE decides when it is convenient to ask for
a file.  This produces very erratic behavior.
I can't persuade my IE the show the english menus but it should be
Extras->Internet Options->General->Temporary Files->Options???. 
Anyhow, there the rightmost button.
Pops up the dialog to change the caching behavior.

> I don't agree. That eats bandwidth.

I absolutely agree, the concept to deliver style information together
with each content is not the best idea.

Regards,
Heinz


Re: jboss - thanks to all

2005-09-29 Thread Werner Punz
Something must have gotten wrong...
I installed jboss on a second machine and dumped a jsf project onto it
and it seems to work...



Re: css files cached

2005-09-29 Thread ir. ing. Jan Dockx
I don't agree. That eats bandwidth.

I just want the browser to get a new version now and again. Checking last modified date is ok, but a time-t0-live of, let's say, 1 hour, would be ok.

We are (have to be) behind an IIS in this case. Could anybody say for sure that it is IIS that is doing the caching? I have strong suspicions in that direction.

On 29 Sep 2005, at 23:55, Nebojsa Vasiljevic wrote:

Even beter is to include css in each JSP.
 
- Original Message -
From: Matt Blum 
To: MyFaces Discussion 
Sent: Thursday, September 29, 2005 11:38 PM
Subject: Re: css files cached

The way I've gotten around this problem before is by making the CSS files JSPs, just for the caching instructions.  All you need to do is put a content-type header set to "text/css" and a caching instruction, change the extension to ".jsp" (and therefore all references to it as well), and leave the rest of it alone.

-Matt

On 9/29/05, ir. ing. Jan Dockx <[EMAIL PROTECTED]> wrote: Probably not JSF related, but anyway:
My css files, served from the web app, seem to be cached indefinitely
somewhere. These are regular css files, so no place for JSP tags here.
Any idea how I can tell whatever cache in between to check the server 
for a new version now and again? I'm seeing the issue both on Win/IE
and Mac/Safari. The css that is being used is at least a week old
(maybe months), until I manually open the css URL and do a hard
refresh. My users won't be doing this … 


Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/ 

Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85 
B-2660 Hoboken 
Tel: +32 3 448.33.38 
Fax: +32 3 448.32.66 

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/


CSSClass implementation in panelTabbedPane?

2005-09-29 Thread Oliver Gottwald

hi,

How is CSSClass implemented for the panelTabbedPane below?  An example of 
proper implementation would be great!




oliver




Re: Hibernate and Datascroller

2005-09-29 Thread Werner Punz
Ryan Wynn wrote:
> 
> Actually, what I was saying was that applying session.lock in the
> actionListener for my Datascroller fixed my Lazy exception.  That is to
> say it worked without the underlying data changing.  I wonder what would
> happen if between requests the data had changed.  Is hibernate
> consulting the underlying data or any cache to compare with my object?
>  If so what if it finds a difference?
> 
> 
Well what happened to me once was that I locked the object changed it
saved it and hibernate simply refused the safe and went on without throwing
an exception ;-)

But that is not the case of locking changed data, what probably would happen
is that it either would overwrite the data with the latest state
of the db, or would throw an exception.

Anyway hibernate is a total beast in this area unfortunately



Re: Restricting the user from using the back-button

2005-09-29 Thread Craig McClanahan
On 9/28/05, Simon Kitching <[EMAIL PROTECTED]> wrote:
The traditional mechanism for preventing people from using the backbutton is to have a hidden field in every page with a counter value, andhave a corresonding counter value in the user's session. The counter is
incremented each time a page is served. If a request comes in and thevalues don't match then the user must have used the back button, so theyare redirected to a page telling them not to do that. I'm not aware of
any JSF tag that implements this but I wouldn't be surprised to find oneexists.
Look no further :-).  Shale's token component  can be
embedded inside your form to catch resubmits.  Instead of
redirecting you, though, it triggers a validation error that will cause
the current page to be redisplayed.

Craig



Re: date conversion headache (HELP! URGENT!)

2005-09-29 Thread Volker Weber
Hi,

the javadoc says:
public java.util.TimeZone getTimeZone()

Return the TimeZone used to interpret a time value. If not
explicitly set, the default time zone of GMT returned.

so we can't change this.

but i think (now) the patch we applied last week was the wrong solution.

Instead of changing getAsString() to use getTimeZone() for setting the
timeZone to the DateFormat, getAsObject() shouldn't do this.

Of cause getAsString() and getAsObject() must use the same TimeZone,
which was not the case last week.

The following is taken and light modified from date.jsp in simple example:


  




The time differs in  and  cause of
the GMT default in the converter. And around midnight also the date may
differ.

I'm shure this is not the expected behavior. But i'm not shure if this
is not a problem in the h:outputText, shoudn't there also used the
converter to convert the java.util.Date to string?


But to be in sync with output generated by jsp the converter shoudn't
use getTimeZone() but _timeZone.


We should undo the patch from last week and change getAsObject()
accordingly.





ir. ing. Jan Dockx wrote:
> I believe the default is the cause of all problems. I think the default
> needs to be the systems time zone. But not sure yet.
> 
> 
> On 29 Sep 2005, at 22:54, Mike Kienenberger wrote:
> 
> This sounded vaguely familiar. I think it's been fixed.
> 
> http://issues.apache.org/jira/browse/MYFACES-506?page=all
> DateTimeConverter.getTimeZone should return the default time of the
> GMT zone by default
> 
> 
-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.


Re: css files cached

2005-09-29 Thread Nebojsa Vasiljevic



Even beter is to include css in each JSP. 

 
- Original Message - 

  From: 
  Matt Blum 

  To: MyFaces Discussion 
  Sent: Thursday, September 29, 2005 11:38 
  PM
  Subject: Re: css files cached
  The way I've gotten around this problem before is by making the 
  CSS files JSPs, just for the caching instructions.  All you need to do is 
  put a content-type header set to "text/css" and a caching instruction, change 
  the extension to ".jsp" (and therefore all references to it as well), and 
  leave the rest of it alone.-Matt
  On 9/29/05, ir. ing. 
  Jan Dockx <[EMAIL PROTECTED]> 
  wrote:
  Probably 
not JSF related, but anyway:My css files, served from the web 
app, seem to be cached indefinitelysomewhere. These are regular css 
files, so no place for JSP tags here.Any idea how I can tell whatever 
cache in between to check the server for a new version now and again? 
I'm seeing the issue both on Win/IEand Mac/Safari. The css that is being 
used is at least a week old(maybe months), until I manually open the css 
URL and do a hardrefresh. My users won't be doing this … Met 
vriendelijke groeten,Jan DockxPeopleWare NV - Head 
OfficeCdt.Weynsstraat 85B-2660 HobokenTel: +32 3 
448.33.38Fax: +32 3 448.32.66PeopleWare NV - Branch Office 
GeelKleinhoefstraat 5B-2440 GeelTel: +32 14 57.00.90Fax: +32 
14 58.13.25http://www.peopleware.be/http://www.mobileware.be/ 
  


Re: Autoscroll

2005-09-29 Thread Julián García

Sorry for the late reply, I was out of town.
Yes, my rendered HTML is full of div's. And yes, I have specified the 
parameter in my web.xml


The only scroll js code I can see is:

function getScrolling() {
   var x = 0; var y = 0;
   if (document.body && document.body.scrollLeft && 
!isNaN(document.body.scrollLeft)) {
   x = document.body.scrollLeft;
   } else if (window.pageXOffset && !isNaN(window.pageXOffset)) {
   x = window.pageXOffset;
   }
   if (document.body && document.body.scrollTop && 
!isNaN(document.body.scrollTop)) {
   y = document.body.scrollTop;
   } else if (window.pageYOffset && !isNaN(window.pageYOffset)) {
   y = window.pageYOffset;
   }
   return x + "," + y;


}

A commandLink looks like 



Its weird that I cannot see any reference to window.scrollTo in my 
rendered HTML code


Thanks for any help.

Paul Klaer wrote:


Did you specified "AUTO_SCROLL" in web.xml?

How is your HTML page looking like? Are you using divs or something else?

If you look in your HTML page, what values are set for the added  
javascript "window.scrollTo()"?



On Fri, 23 Sep 2005 22:38:22 +0200, Julián García  
<[EMAIL PROTECTED]> wrote:



The auto-scroll parameter is not working for me after reloading a page
when an actionListener executesare there any specific requirements
in order to make it work?

Thanks.

Julian.







Re: Problem with MyEclipse 4.0/MyFaces 1.1.0/jscookmenu

2005-09-29 Thread Simon Kitching

Simon Kitching wrote:

Kevin wrote:


I replaced the MyFaces support that shipped with MyEclipse 4.0 with
MyFace 1.1.0.
It seems to work...more or less.

Here is a problem that I noticed.

I am trying to use jscookmenu which is part of Tomahawk.
My menu looks a little something like this:




action="#{navBacking.home}" />


Loading this up the first time, it works great (if you do everything
right of course).

However, when I make changes and save (which recompiles the JSP), I do
not see the changes. This is true even if I do a reload in the Tomcat
Web Application Manager.
Strangely though, if I remove the menu completely from the JSP, save
the JSP and reload it in the browser, then add it in again with the
changes, save, etc. I can then see the changes.
Example change = changing theme="ThemeOffice" to theme="ThemeMiniBlack"
I think I know why I am not seeing these changes.
If you do a View Source on a rendered JSP with a jscookmenu, you will
see something like this in the HTML header.


src="/yourappname/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/JSCookMenu.js" 

type="text/javascript">
src="/yourappname/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/MyFacesHack.js" 

type="text/javascript">
src="/yourappname/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/ThemeMiniBlack/theme.js" 

type="text/javascript">
href="/hcrs/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/ThemeMiniBlack/theme.css" 


I believe that this "feature" is related ot the Apache MyFaces'
Extensions Filter:
http://myfaces.apache.org/tomahawk/extensionsFilter.html

So, I think it is caching the CSS and JavaScript files in memory and
not freeing them up when I recompile my JSP.

Does anyone have any experience with this problem or has anyone tried
out the jscookmenu under MyFaces 1.1.0 to confirm my suspicions?



In the URL
  /yourappname/.../11266487/JSCookMenu.js
the numeric part is indeed a "cache key".


[nb: many lines removed from above thread]

Actually, on re-reading your email, while I think my previous comments 
are correct I don't think they apply to your situation. You're not 
having problems with changing theme files and getting the cached 
version: you're having problems changing the theme specified in the jsf 
tag and not seeing updated HTML.


Do you have something like this at the top of your JSP pages?

   
   

This is standard HTML stuff, not really anything related to JSF/JSP. If 
you don't have this then a browser or web-proxy can cache the HTML pages.


Regards,

Simon


Re: css files cached

2005-09-29 Thread ir. ing. Jan Dockx
Yep, done that in the ol' JSP days too. ;-)

But that is terribly tedious, of course.

Sounds like an opportunity for a filter …

On 29 Sep 2005, at 23:38, Matt Blum wrote:

The way I've gotten around this problem before is by making the CSS files JSPs, just for the caching instructions.  All you need to do is put a content-type header set to "text/css" and a caching instruction, change the extension to ".jsp" (and therefore all references to it as well), and leave the rest of it alone.

-Matt

On 9/29/05, ir. ing. Jan Dockx <[EMAIL PROTECTED]> wrote:
My css files, served from the web app, seem to be cached indefinitely
somewhere. These are regular css files, so no place for JSP tags here.
Any idea how I can tell whatever cache in between to check the server 
for a new version now and again? I'm seeing the issue both on Win/IE
and Mac/Safari. The css that is being used is at least a week old
(maybe months), until I manually open the css URL and do a hard
refresh. My users won't be doing this … 


Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/ 

Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85 
B-2660 Hoboken 
Tel: +32 3 448.33.38 
Fax: +32 3 448.32.66 

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/


Re: css files cached

2005-09-29 Thread Matt Blum
The way I've gotten around this problem before is by making the CSS
files JSPs, just for the caching instructions.  All you need to do
is put a content-type header set to "text/css" and a caching
instruction, change the extension to ".jsp" (and therefore all
references to it as well), and leave the rest of it alone.

-MattOn 9/29/05, ir. ing. Jan Dockx <[EMAIL PROTECTED]> wrote:
Probably not JSF related, but anyway:My css files, served from the web app, seem to be cached indefinitelysomewhere. These are regular css files, so no place for JSP tags here.Any idea how I can tell whatever cache in between to check the server
for a new version now and again? I'm seeing the issue both on Win/IEand Mac/Safari. The css that is being used is at least a week old(maybe months), until I manually open the css URL and do a hardrefresh. My users won't be doing this …
Met vriendelijke groeten,Jan DockxPeopleWare NV - Head OfficeCdt.Weynsstraat 85B-2660 HobokenTel: +32 3 448.33.38Fax: +32 3 448.32.66PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5B-2440 GeelTel: +32 14 57.00.90Fax: +32 14 58.13.25http://www.peopleware.be/http://www.mobileware.be/



Re: Problem with MyEclipse 4.0/MyFaces 1.1.0/jscookmenu

2005-09-29 Thread Simon Kitching

Kevin wrote:

Hi,

I posted this to the MyEclipse forum, but I was directed here sine the
problem is more likely due to MyFaces caching.
Any info would be much appreciated!

***
I am working with the following:

Eclipse 3.1 Build I20050627-1435 (freshly installed=yes)
MyEclipse 4.0 Build id: 20050829-4.0.0-GA
Tomcat 5.5.9, Sun JVM 1.5.0_05-b05
OS: Windows 2000 SP4
RAM: 1 GB
- Are any other external plugins installed?
de.jayefem.log4e_free_1.0.4
- How many plugins in the /plugins directory are like org.eclipse.pde.*
4
- Are there any exceptions in the Eclipse log file?
(/.metadata/.log)
No.
***

I replaced the MyFaces support that shipped with MyEclipse 4.0 with
MyFace 1.1.0.
It seems to work...more or less.

Here is a problem that I noticed.
This may not be the fault of Eclipse/MyEclipse, but a problem with the
way MyFaces works?

Example:

I am trying to use jscookmenu which is part of Tomahawk.
My menu looks a little something like this:







   
   











Loading this up the first time, it works great (if you do everything
right of course).

However, when I make changes and save (which recompiles the JSP), I do
not see the changes. This is true even if I do a reload in the Tomcat
Web Application Manager.
Strangely though, if I remove the menu completely from the JSP, save
the JSP and reload it in the browser, then add it in again with the
changes, save, etc. I can then see the changes.
Example change = changing theme="ThemeOffice" to theme="ThemeMiniBlack"
I think I know why I am not seeing these changes.
If you do a View Source on a rendered JSP with a jscookmenu, you will
see something like this in the HTML header.








These values are not changing when I make a change in my JSP. To see
my change, I have to totally remove the component as described above.
I believe that this "feature" is related ot the Apache MyFaces'
Extensions Filter:
http://myfaces.apache.org/tomahawk/extensionsFilter.html

So, I think it is caching the CSS and JavaScript files in memory and
not freeing them up when I recompile my JSP.

Does anyone have any experience with this problem or has anyone tried
out the jscookmenu under MyFaces 1.1.0 to confirm my suspicions?


In the URL
  /yourappname/.../11266487/JSCookMenu.js
the numeric part is indeed a "cache key".

Class org.apache.myfaces.component.html.util.ExtensionsFilter just 
delegates to the AddResource class in the same package, which contains 
this code to generate that number in the URL when *creating the URL to 
send to the browser*:

 private static long getCacheKey(){
   // A 100 sec. delay between 2 deployement should be enough
   // and helps reduce the URL length.
   return getLastModified() / 10;
 }

And it has this code in the serveResource method, which runs when the 
user's browser actually fetches the page:

  // Set browser cache to a week.
  // There is no risk, as the cache key is part of the URL.
  Calendar expires = Calendar.getInstance();
  expires.add(Calendar.DAY_OF_YEAR, 7);
  response.setDateHeader("Expires", expires.getTimeInMillis());

As I understand the code, once an html file referencing the menu 
resources is served to the user the referenced files are downloaded and 
they are cached for a week. However next time that browser loads a 
(generated) html page, the page will have different URLs embedded in the 
page if the menu resources have changed (the cacheKey will be different) 
so the browser will fetch the updated version. However the cacheKey 
field is only accurate to the nearest 100 seconds, so multiple changes 
within 100 seconds may result in the same cacheKey.


Perhaps it would make sense to have an init param for the 
ExtensionsFilter which sets the divisor used in the getCacheKey method? 
It could still default to 10, but for development people could set 
it to 1 to prevent caching. Of course in the open source tradition, if 
you need this feature then you should probably write the patch to 
implement this rather than waiting for someone else to do so...


Alternatively, maybe the *last* 6 digits of lastModified should be used 
rather than the first 6 digits? This keeps the full time resolution 
while keeping the URL short. There's a small danger of key "collision" 
here though.



Regards,

Simon


css files cached

2005-09-29 Thread ir. ing. Jan Dockx
Probably not JSF related, but anyway:


My css files, served from the web app, seem to be cached indefinitely somewhere. These are regular css files, so no place for JSP tags here. Any idea how I can tell whatever cache in between to check the server for a new version now and again? I'm seeing the issue both on Win/IE and Mac/Safari. The css that is being used is at least a week old (maybe months), until I manually open the css URL and do a hard refresh. My users won't be doing this …


Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85 
B-2660 Hoboken 
Tel: +32 3 448.33.38 
Fax: +32 3 448.32.66 

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/

RE: how to set id in dataTable.

2005-09-29 Thread Dave
If it uses column header name, user will not know which row. For outputLabel, id is still needed. The id should not be a constant string, otherwise, all rows will have the same id.  If JSF allow id to be bound to a variable in backing bean data model, everything will be solved.
I do not know why ID must be a literal string."CONNER, BRENDAN (SBCSI)" <[EMAIL PROTECTED]> wrote:


I believe that, if you use , it will use the name given in the column header (for dataTables) or the associated outputLabel (in other cases).
 
I put in a request to expand  to optionally take the component's identifying name from the component's title attribute.  I was going to try to do this patch myself, but then I got bogged down in getting a clean compile from the code I got from Subversion, so I haven't made much progress in that regard.
 
- Brendan


-Original Message-From: Dave [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 12:36 AMTo: users@myfaces.apache.orgSubject: how to set id in dataTable.
In the dataTable, I like to set id for inputText so that the JSF validator can give user a nice message when it is required but empty.  The id can not bind to an EL, but in dataTable all values should come from data model to be meaningful. Current message like:
 
   _id39: value required.
 
The id is generated by JSF. From the Id ,users does not know which field is required.
 
Thanks for ideas.
 
Dave
 
 


Yahoo! for GoodClick here to donate to the Hurricane Katrina relief effort. 
		Yahoo! for Good 
Click here to donate to the Hurricane Katrina relief effort. 


Re: date conversion headache (HELP! URGENT!)

2005-09-29 Thread ir. ing. Jan Dockx
I believe the default is the cause of all problems. I think the default needs to be the systems time zone. But not sure yet.


On 29 Sep 2005, at 22:54, Mike Kienenberger wrote:

This sounded vaguely familiar.  I think it's been fixed.

http://issues.apache.org/jira/browse/MYFACES-506?page=all
DateTimeConverter.getTimeZone should return the default time of the
GMT zone by default


On 9/29/05, ir. ing. Jan Dockx <[EMAIL PROTECTED]> wrote:
Indeed. Did that of course (10 hours ago). And the code of
DateTimeConverter looks perfectly ok. It doesn't do anything, really,
just delegating to java.text.DateFormat!

If there is a time zone, it is set on the DateFormat, if not, it is
left alone.

.

wait a sec

public TimeZone getTimeZone()
{
return _timeZone != null ? _timeZone : TIMEZONE_DEFAULT;
}

getTimeZone() nevers return null! And the TIMEZONE_DEFAULT is GMT.


And only people on the east side of Greenwich will see this problem! So
that's why there is almost no discussion of this issue! You are all in
the UK, Ireland or the US!


TT


Ok. This can't be right, is it? This just confirms, to a degree, my
previous reasoning. Still not sure that it covers everyting, though.
The questions remain:

* The time zone stuff is surprising at least. The default should be
that in all instances a raw Date is interpreted the same, not as GMT in
one case, and as GMT+2 in another. This can't be in the spec's like
this, can it?
* If it is in the spec's: I am missing something. It can be necessary
to repeat the time zone in all tags! Is there a general setting in
faces-config.xml or web.xml or something I don't know about?
* The inconsistency between parsing and rendering must be a bug, no?


What does the spec say about this? Shouldn't we just delete this
DEFAULT TIMEZONE stuff? And what about the inconsistency.



On 29 Sep 2005, at 22:29, Mike Kienenberger wrote:

When all else fails, step through the source and see what's going on :)

On 9/29/05, ir. ing. Jan Dockx <[EMAIL PROTECTED]> wrote:
Right, will try that.

But hey, list, I need some more feedback here :-]. This is killing me.
This cannot be right. I must be doing something wrong.

Ok, here is my reasoning. Please tell me if you agree:


I have a java.util.Date (hence forward called Date). Date doesn't know
didley about time zones. This date is just 1 september 2005, sec (so
00:00h).

Now I suppose (please comment !) that JSF convertDateTime is "time
zone" aware. It finds out somehow that this computer is running in
Belgium, and that we are (daylight savings time) actually on GMT+2.
Given no more directions, it seems to want to render the Date in GMT
as
default. So, it says "hey, it's 31 august, 22:00h", presuming that the
Date it got to render is actually in the time zone of the machine.

When I change the code, and add 
timeZone="GMT+2" ... />, the converter reasons "I get a Date from time
zone GMT+2, and this guy wants me to render it in time zone GMT+2",
and
does ok.

Ok, that's all speculation, because I really don't know.

Now the serious issue is that if this is used in an input text. The
rendering is the same in outputText and inputText. But if a user
enters
"1/9/2005", this actually translates into a Date in the DB that is
1/9/2005, 00:00h, without the time zone setting, and with the time
zone
setting. (to DB using Hibernate 'date', meaning time part is always
oo:00h). Tt.

The net effect is that users enter data ok. Stuff is saved. If later
they edit other fields of the record, the "day early" value is shown
in
the date inputText. User is not looking there, and is unaware of the
"feature". The user is focussing on other fields (he only wants to
correct the last name). He does so, and hits submit. NOW THE DAY EARLY
VALUE IS BEING WRITTEN TO THE DB!!! And if this is repeated, each time
the date is counting down.



Ok. This must be a bug, no?
* The time zone stuff is surprising at least. The default should be
that in all instances a raw Date is interpreted the same, not as GMT
in
one case, and as GMT+2 in another. This can't be in the spec's like
this, can it?
* If it is in the spec's: I am missing something. It can be necessary
to repeat the time zone in all tags! Is there a general setting in
faces-config.xml or web.xml or something I don't know about?
* The inconsistency between parsing and rendering must be a bug, no?


But on the other hand, this is so blatant, and there is nothing on
this
in this mailing list I can remember or find, and I couldn't find
anything relevant in the JIRA, so it must be me being very tired
(deployment stress :-$).


I'm getting totally twisted and paranoid. Please set me straight.


On 29 Sep 2005, at 19:11, Matt Blum wrote:

Try changing the convertDateTime tag thusly:



-Matt

On 9/29/05, Jan Dockx <[EMAIL PROTECTED]> wrote:
Submitting data works ok: if I enter 1/9/2005 in the entry field,
the
DB ends up with 1/9/2005, 0:00h. So the MyFaces DateTimeConverter
converts ok. So far so good. Da

Re: date conversion headache (HELP! URGENT!)

2005-09-29 Thread Mike Kienenberger
This sounded vaguely familiar.  I think it's been fixed.

http://issues.apache.org/jira/browse/MYFACES-506?page=all
DateTimeConverter.getTimeZone should return the default time of the
GMT zone by default


On 9/29/05, ir. ing. Jan Dockx <[EMAIL PROTECTED]> wrote:
> Indeed. Did that of course (10 hours ago). And the code of
> DateTimeConverter looks perfectly ok. It doesn't do anything, really,
> just delegating to java.text.DateFormat!
>
> If there is a time zone, it is set on the DateFormat, if not, it is
> left alone.
>
> .
>
> wait a sec
>
>  public TimeZone getTimeZone()
>  {
>  return _timeZone != null ? _timeZone : TIMEZONE_DEFAULT;
>  }
>
> getTimeZone() nevers return null! And the TIMEZONE_DEFAULT is GMT.
>
>
> And only people on the east side of Greenwich will see this problem! So
> that's why there is almost no discussion of this issue! You are all in
> the UK, Ireland or the US!
>
>
> TT
>
>
> Ok. This can't be right, is it? This just confirms, to a degree, my
> previous reasoning. Still not sure that it covers everyting, though.
> The questions remain:
>
> * The time zone stuff is surprising at least. The default should be
> that in all instances a raw Date is interpreted the same, not as GMT in
> one case, and as GMT+2 in another. This can't be in the spec's like
> this, can it?
> * If it is in the spec's: I am missing something. It can be necessary
> to repeat the time zone in all tags! Is there a general setting in
> faces-config.xml or web.xml or something I don't know about?
> * The inconsistency between parsing and rendering must be a bug, no?
>
>
> What does the spec say about this? Shouldn't we just delete this
> DEFAULT TIMEZONE stuff? And what about the inconsistency.
>
>
>
> On 29 Sep 2005, at 22:29, Mike Kienenberger wrote:
>
> > When all else fails, step through the source and see what's going on :)
> >
> > On 9/29/05, ir. ing. Jan Dockx <[EMAIL PROTECTED]> wrote:
> >> Right, will try that.
> >>
> >> But hey, list, I need some more feedback here :-]. This is killing me.
> >> This cannot be right. I must be doing something wrong.
> >>
> >> Ok, here is my reasoning. Please tell me if you agree:
> >>
> >>
> >> I have a java.util.Date (hence forward called Date). Date doesn't know
> >> didley about time zones. This date is just 1 september 2005, sec (so
> >> 00:00h).
> >>
> >> Now I suppose (please comment !) that JSF convertDateTime is "time
> >> zone" aware. It finds out somehow that this computer is running in
> >> Belgium, and that we are (daylight savings time) actually on GMT+2.
> >> Given no more directions, it seems to want to render the Date in GMT
> >> as
> >> default. So, it says "hey, it's 31 august, 22:00h", presuming that the
> >> Date it got to render is actually in the time zone of the machine.
> >>
> >> When I change the code, and add  >> timeZone="GMT+2" ... />, the converter reasons "I get a Date from time
> >> zone GMT+2, and this guy wants me to render it in time zone GMT+2",
> >> and
> >> does ok.
> >>
> >> Ok, that's all speculation, because I really don't know.
> >>
> >> Now the serious issue is that if this is used in an input text. The
> >> rendering is the same in outputText and inputText. But if a user
> >> enters
> >> "1/9/2005", this actually translates into a Date in the DB that is
> >> 1/9/2005, 00:00h, without the time zone setting, and with the time
> >> zone
> >> setting. (to DB using Hibernate 'date', meaning time part is always
> >> oo:00h). Tt.
> >>
> >> The net effect is that users enter data ok. Stuff is saved. If later
> >> they edit other fields of the record, the "day early" value is shown
> >> in
> >> the date inputText. User is not looking there, and is unaware of the
> >> "feature". The user is focussing on other fields (he only wants to
> >> correct the last name). He does so, and hits submit. NOW THE DAY EARLY
> >> VALUE IS BEING WRITTEN TO THE DB!!! And if this is repeated, each time
> >> the date is counting down.
> >>
> >>
> >>
> >> Ok. This must be a bug, no?
> >> * The time zone stuff is surprising at least. The default should be
> >> that in all instances a raw Date is interpreted the same, not as GMT
> >> in
> >> one case, and as GMT+2 in another. This can't be in the spec's like
> >> this, can it?
> >> * If it is in the spec's: I am missing something. It can be necessary
> >> to repeat the time zone in all tags! Is there a general setting in
> >> faces-config.xml or web.xml or something I don't know about?
> >> * The inconsistency between parsing and rendering must be a bug, no?
> >>
> >>
> >> But on the other hand, this is so blatant, and there is nothing on
> >> this
> >> in this mailing list I can remember or find, and I couldn't find
> >> anything relevant in the JIRA, so it must be me being very tired
> >> (deployment stress :-$).
> >>
> >>
> >> I'm getting totally twisted and paranoid. Please set me straight.
> >>
> >>
> >> On 29 Sep 2005, at 19:11, Matt Blum wrote:
> >

Re: date conversion headache (HELP! URGENT!)

2005-09-29 Thread ir. ing. Jan Dockx
Indeed. Did that of course (10 hours ago). And the code of DateTimeConverter looks perfectly ok. It doesn't do anything, really, just delegating to java.text.DateFormat!

If there is a time zone, it is set on the DateFormat, if not, it is left alone.

.

wait a sec

public TimeZone getTimeZone()
{
return _timeZone != null ? _timeZone : TIMEZONE_DEFAULT;
}

getTimeZone() nevers return null! And the TIMEZONE_DEFAULT is GMT.


And only people on the east side of Greenwich will see this problem! So that's why there is almost no discussion of this issue! You are all in the UK, Ireland or the US!


TT


Ok. This can't be right, is it? This just confirms, to a degree, my previous reasoning. Still not sure that it covers everyting, though. The questions remain:

* The time zone stuff is surprising at least. The default should be that in all instances a raw Date is interpreted the same, not as GMT in one case, and as GMT+2 in another. This can't be in the spec's like this, can it?
* If it is in the spec's: I am missing something. It can be necessary to repeat the time zone in all tags! Is there a general setting in faces-config.xml or web.xml or something I don't know about?
* The inconsistency between parsing and rendering must be a bug, no?


What does the spec say about this? Shouldn't we just delete this DEFAULT TIMEZONE stuff? And what about the inconsistency.



On 29 Sep 2005, at 22:29, Mike Kienenberger wrote:

When all else fails, step through the source and see what's going on :)

On 9/29/05, ir. ing. Jan Dockx <[EMAIL PROTECTED]> wrote:
Right, will try that.

But hey, list, I need some more feedback here :-]. This is killing me.
This cannot be right. I must be doing something wrong.

Ok, here is my reasoning. Please tell me if you agree:


I have a java.util.Date (hence forward called Date). Date doesn't know
didley about time zones. This date is just 1 september 2005, sec (so
00:00h).

Now I suppose (please comment !) that JSF convertDateTime is "time
zone" aware. It finds out somehow that this computer is running in
Belgium, and that we are (daylight savings time) actually on GMT+2.
Given no more directions, it seems to want to render the Date in GMT as
default. So, it says "hey, it's 31 august, 22:00h", presuming that the
Date it got to render is actually in the time zone of the machine.

When I change the code, and add 
timeZone="GMT+2" ... />, the converter reasons "I get a Date from time
zone GMT+2, and this guy wants me to render it in time zone GMT+2", and
does ok.

Ok, that's all speculation, because I really don't know.

Now the serious issue is that if this is used in an input text. The
rendering is the same in outputText and inputText. But if a user enters
"1/9/2005", this actually translates into a Date in the DB that is
1/9/2005, 00:00h, without the time zone setting, and with the time zone
setting. (to DB using Hibernate 'date', meaning time part is always
oo:00h). Tt.

The net effect is that users enter data ok. Stuff is saved. If later
they edit other fields of the record, the "day early" value is shown in
the date inputText. User is not looking there, and is unaware of the
"feature". The user is focussing on other fields (he only wants to
correct the last name). He does so, and hits submit. NOW THE DAY EARLY
VALUE IS BEING WRITTEN TO THE DB!!! And if this is repeated, each time
the date is counting down.



Ok. This must be a bug, no?
* The time zone stuff is surprising at least. The default should be
that in all instances a raw Date is interpreted the same, not as GMT in
one case, and as GMT+2 in another. This can't be in the spec's like
this, can it?
* If it is in the spec's: I am missing something. It can be necessary
to repeat the time zone in all tags! Is there a general setting in
faces-config.xml or web.xml or something I don't know about?
* The inconsistency between parsing and rendering must be a bug, no?


But on the other hand, this is so blatant, and there is nothing on this
in this mailing list I can remember or find, and I couldn't find
anything relevant in the JIRA, so it must be me being very tired
(deployment stress :-$).


I'm getting totally twisted and paranoid. Please set me straight.


On 29 Sep 2005, at 19:11, Matt Blum wrote:

Try changing the convertDateTime tag thusly:



-Matt

On 9/29/05, Jan Dockx <[EMAIL PROTECTED]> wrote:
Submitting data works ok: if I enter 1/9/2005 in the entry field, the
DB ends up with 1/9/2005, 0:00h. So the MyFaces DateTimeConverter
converts ok. So far so good. Data that comes from the DB creates a
java.util.Date that is 1/9/2005, 0:00h. Ok. When I show it with JSP
EL, I see 1/9/2005. Ok. When I show that Date with JSF however, it
shows 31/8/2005 23:00h! When I add timeZone="GMT+2", it renders
1/9/2005. We are in Belgium, daylight saving time is active, and we
are in GMT+1.

At least, this is inconsistent behavior. And frankly, looking at the
code of DateTimeConverter, I don't get it.



On Thursda

Re: Hibernate and Datascroller

2005-09-29 Thread Ryan Wynn

Actually, what I was saying was that applying session.lock
in the actionListener for my Datascroller fixed my Lazy exception.  That
is to say it worked without the underlying data changing.  I wonder
what would happen if between requests the data had changed.  Is hibernate
consulting the underlying data or any cache to compare with my object?
 If so what if it finds a difference?







Werner Punz <[EMAIL PROTECTED]>

Sent by: news <[EMAIL PROTECTED]>
09/29/2005 01:57 PM



Please respond to
"MyFaces Discussion"





To
users@myfaces.apache.org


cc



Subject
Re: Hibernate and Datascroller








Ryan Wynn wrote:
> 
> The problem was the old/new session as Rich described.  Instead
of
> rerunning the query I just reattached the objects to the new session
> with session.lock.
> 
> I opted for this because the table data comes from 1 of 2 queries
> depending on user interaction within the page.  Instead of trying
to
> figure out what the user did to generate the table I just reattached
the
> objects.  
> 
> Is the reattach with hibernate session.lock(obj, LockMode.NONE)
> expensive?  What does it do?
> 
It does what it is said to do, it locks the object to the session,
but the thing is, that this only works with lock if the object has not
been altered
also it seems to fail with lazy at least in your case ;-)...

I am not even sure if you can alter the object afterwards and save it,
I remember vaguely
that you cannot.

Usually if you do not have any lazy loading problems on your hand
you can directly save the  object to the session.

I have to admit, I have to reread the chapter again, because the mechanisms
of attaching
reattaching etc... are not too well described there, and even after several
projects I still am not fully sure how they differ.

All I can say is if you need straight write access from an object outside
of your session
use save update saveOrUpdate or persist and things should work out as expected.

This is definitely one of the biggest issue areas in my opinin, where the
Hibernate
documentation needs more substance and also where the api has to be simplified.
The whole lock only if unmodified, and then even it fails if you write
etc...
stuff is outright confusing.






Re: How to Pass a Value from to JavaScript?

2005-09-29 Thread Sean Schofield
If you're going to use document.getElementById then you probably want
to take a look at forceId.

sean

On 9/29/05, Matt Blum <[EMAIL PROTECTED]> wrote:
> I suggest avoiding using the form objects entirely, and simply using
> document.getElementById([id]) to obtain references to the text fields.
>
>  -Matt
>
>
> On 9/29/05, Caroline Jen <[EMAIL PROTECTED]> wrote:
> > I have to use JSF to pop up a window from the parent
> > window.  In the popup window, I have to pass the value
> > that is entered in a  back to a text
> > field in the parent window.
> >
> > In order to make sure that I know the way to
> > communicate between the parent window and the popup
> > window, I have tried coding it in HTML.  And I have
> > done it successfully.
> >
> > Then, I try to convert the HTML code to JSF.  I have
> > searched the internet and I have tried different
> > specifications myself.  I am stuck.  This is the line
> > that I have been struggling with:
> >
> > [CODE]
> >
> window.opener.document.forms[0].form["dataManagement:textField"].value
> > =
> > document.forms[0].form["externalFile:inputField"].value;
> > [/CODE]
> >
> > If textField is in HTML parent window  > name=textField  /> and the inputField is in HTML
> > popup window , the
> > JavaScript can recognize (No problem! the datum is
> > passed.):
> >
> > [CODE]
> > window.opener.document.forms[0].textField.value =
> > document.forms[0].inputField.value;
> > [/CODE]
> >
> > Now, the dataManagement is the "id" attribute in my
> > JSF parent  tag.  The externalFile is the "id"
> > attribute in my JSF popup  tag.
> >
> > The textField is in the JSF parent window as both the
> > "id" attribute and a "property" name (i.e.
> > value="#{dataManagementBean.textField }" )in the
> >  tag.
> >
> > The inputField is in the JSF popup window as both the
> > "id" attribute and a "property" name (i.e.
> > value="#{accessExternalFileBean.inputField }" ) in the
> >  tag.
> >
> > No matter how I experiment with different
> > specifications, I cannot get the textField and
> > inputField in the JavaScript.  I got that "it is null
> > or not an object" JavaScript error.  Please advise if
> > you have done it successfully.
> >
> >
> >
> >
> >
> > __
> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > http://mail.yahoo.com
> >
>
>


Re: date conversion headache (HELP! URGENT!)

2005-09-29 Thread ir. ing. Jan Dockx
Right, will try that.

But hey, list, I need some more feedback here :-]. This is killing me. This cannot be right. I must be doing something wrong.

Ok, here is my reasoning. Please tell me if you agree:


I have a java.util.Date (hence forward called Date). Date doesn't know didley about time zones. This date is just 1 september 2005, sec (so 00:00h).

Now I suppose (please comment !) that JSF convertDateTime is "time zone" aware. It finds out somehow that this computer is running in Belgium, and that we are (daylight savings time) actually on GMT+2. Given no more directions, it seems to want to render the Date in GMT as default. So, it says "hey, it's 31 august, 22:00h", presuming that the Date it got to render is actually in the time zone of the machine.

When I change the code, and add , the converter reasons "I get a Date from time zone GMT+2, and this guy wants me to render it in time zone GMT+2", and does ok.

Ok, that's all speculation, because I really don't know.

Now the serious issue is that if this is used in an input text. The rendering is the same in outputText and inputText. But if a user enters "1/9/2005", this actually translates into a Date in the DB that is 1/9/2005, 00:00h, without the time zone setting, and with the time zone setting. (to DB using Hibernate 'date', meaning time part is always oo:00h). Tt.

The net effect is that users enter data ok. Stuff is saved. If later they edit other fields of the record, the "day early" value is shown in the date inputText. User is not looking there, and is unaware of the "feature". The user is focussing on other fields (he only wants to correct the last name). He does so, and hits submit. NOW THE DAY EARLY VALUE IS BEING WRITTEN TO THE DB!!! And if this is repeated, each time the date is counting down.



Ok. This must be a bug, no?
* The time zone stuff is surprising at least. The default should be that in all instances a raw Date is interpreted the same, not as GMT in one case, and as GMT+2 in another. This can't be in the spec's like this, can it?
* If it is in the spec's: I am missing something. It can be necessary to repeat the time zone in all tags! Is there a general setting in faces-config.xml or web.xml or something I don't know about?
* The inconsistency between parsing and rendering must be a bug, no?


But on the other hand, this is so blatant, and there is nothing on this in this mailing list I can remember or find, and I couldn't find anything relevant in the JIRA, so it must be me being very tired (deployment stress :-$).


I'm getting totally twisted and paranoid. Please set me straight.


On 29 Sep 2005, at 19:11, Matt Blum wrote:

Try changing the convertDateTime tag thusly:



-Matt

On 9/29/05, Jan Dockx <[EMAIL PROTECTED]> wrote:
Submitting data works ok: if I enter 1/9/2005 in the entry field, the DB ends up with 1/9/2005, 0:00h. So the MyFaces DateTimeConverter converts ok. So far so good. Data that comes from the DB creates a java.util.Date that is 1/9/2005, 0:00h. Ok. When I show it with JSP EL, I see 1/9/2005. Ok. When I show that Date with JSF however, it shows 31/8/2005 23:00h! When I add timeZone="GMT+2", it renders 1/9/2005. We are in Belgium, daylight saving time is active, and we are in GMT+1.

At least, this is inconsistent behavior. And frankly, looking at the code of DateTimeConverter, I don't get it.



On Thursday, September 29, 2005, at 05:28PM, Jan Dockx < [EMAIL PROTECTED]> wrote:

>I'm getting tired.
>
>We have this jsf code:
>
>1: 
>2: ${enrollmentH.instance.startDate}
>
> value="#{enrollmentH.instance.startDate}"
> required="true"
> size="10"
> maxlength="10"
> displayValueOnly="#{not enrollmentH.showFields}"
> displayValueOnlyStyleClass="#{enrollmentH.viewMode}">
>  
>
>
>(ok, it's hacked)
>
>the enrollmentH.instance.startDate is a java.util.Date, 1 september 2005.
>
>What is shown is 
>
>31-aug-2005
>2: 2005-09-01
>31/08/2005?
>
>in other words:
>
>h:outputText rendes 31 august
>JSP el renders 1 september
>h:inputText renders 31 august
> 
>JSF is one day off!!!
>
>It's probably our fault. We are using a custom build of the main trunk, 2005-09-28, 11:00am CET.
>What are we missing
>
>

Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85 
B-2660 Hoboken 
Tel: +32 3 448.33.38 
Fax: +32 3 448.32.66 

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/


Re: NotSerializableException

2005-09-29 Thread Navid Vahdat




That seems to work. Thanks a lot, Mike!!!

Another question just to make my understanding of things consistent:
How come the data isn't lost, when the session is serialized but this
field is transient? Isn't keeping the state the whole purpose of the
StateManager serializing the bean? Would it make more sense to make the
object serializable or transient? I'm confused...

Cheers,
Navid

Mike Kienenberger wrote:

  session-scoped backing beans are going to be serialized into your session.

Any properties not marked transient on a serialized object are also
going to be serialized.

Try marking your object reference as transient.

Converters are used to convert objects into string representations on
your components stored in the html response (ie, the form values), and
vise-versa.

They don't directly interact with session-scoped backing beans.

On 9/29/05, Navid Vahdat <[EMAIL PROTECTED]> wrote:
  
  
The Object is not marked transient -- as is no other. It's part of a
property of a component's backing bean. AFAIK you're not forced to mark
them transient, are you?

What is trying to serialize them is quite obvious from the stack trace.
It's the State Manager. The question is why! And why doesn't it call the
converter? My converter would provite it with a beautifully serializable
String.

Mike Kienenberger wrote:



  Is your non-serialiable object marked as transient in your
session-scoped bean?  If not, it'll be serialized...

I think the first thing you'll want to do is to determine what is
trying to serialize it.   Is it a managed bean or a component?

On 9/29/05, Navid Vahdat <[EMAIL PROTECTED]> wrote:


  
  
Just bringing this subject up once more. Somebody able to say something
about it?

Navid Vahdat wrote:
Hi Luca,

the relevant JSP code is


*:

















please find the whole JSP attached.

editListBean is a session scope bean that holds a dataobject -- a detail of
a master/detail relationship. This data object has a type, which can be the
below metamodel.ListType it has a name, a description and a couple of other
fields. The type is set in the selectDataType Dialog, which is opened with
the small looking glass to the right of the output text.

Thanks!

Navid

Luca Conte wrote:
Can U post the jsp code?
Navid Vahdat ha scritto:



Can somebody give me a hand on this? The Exception seems to be
connected to using a h:inputhidden with a custom converter. When the
value is null, everithing is fine. When the value is set to an object
(in this case metamodel.ListType), rendering the page is fine, but
triggering a UICommand that is not immediate causes the Exception.

I'm stuck. Is this a known bug?

Navid

Navid Vahdat wrote:



Guys, I get this not serializable exception. The exception is
correct, because metamodel.ListType, a value in a hidden field with a
working converter, definitely is not serializable. Why is myFaces
(ver. 1.1.0) trying to serialize it?

Thanks,
Navid

28.09.2005 10:26:51 org.apache.myfaces.util.StateUtils
encode64
SCHWERWIEGEND: Cannot encode Object with Base64
_java.io.NotSerializableException_: metamodel.ListType
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1054_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at java.util.ArrayList.writeObject(_ArrayList.java:529_)
at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

at java.lang.reflect.Method.invoke(_Method.java:324_)
at
java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)

at
java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)

at
java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)

at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1052_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutpu

Re: NotSerializableException

2005-09-29 Thread Mike Kienenberger
session-scoped backing beans are going to be serialized into your session.

Any properties not marked transient on a serialized object are also
going to be serialized.

Try marking your object reference as transient.

Converters are used to convert objects into string representations on
your components stored in the html response (ie, the form values), and
vise-versa.

They don't directly interact with session-scoped backing beans.

On 9/29/05, Navid Vahdat <[EMAIL PROTECTED]> wrote:
> The Object is not marked transient -- as is no other. It's part of a
> property of a component's backing bean. AFAIK you're not forced to mark
> them transient, are you?
>
> What is trying to serialize them is quite obvious from the stack trace.
> It's the State Manager. The question is why! And why doesn't it call the
> converter? My converter would provite it with a beautifully serializable
> String.
>
> Mike Kienenberger wrote:
>
> >Is your non-serialiable object marked as transient in your
> >session-scoped bean?  If not, it'll be serialized...
> >
> >I think the first thing you'll want to do is to determine what is
> >trying to serialize it.   Is it a managed bean or a component?
> >
> >On 9/29/05, Navid Vahdat <[EMAIL PROTECTED]> wrote:
> >
> >
> >> Just bringing this subject up once more. Somebody able to say something
> >>about it?
> >>
> >> Navid Vahdat wrote:
> >> Hi Luca,
> >>
> >> the relevant JSP code is
> >>
> >> 
> >> *:
> >> 
> >> 
> >> 
> >> 
> >>  >>id="type_name" value="#{editListBean.dataObject.type.name}"
> >>title="#{editListBean.dataObject.type.description}"/> >>id="type" value="#{editListBean.dataObject.type}" required="true"
> >>converter="datatypeConverter" />
> >> 
> >>  >>action="#{editListBean.selectDataType}" id="selectDataTypeLink"
> >>immediate="true">
> >>  >>url="/images/small-lookingglass.gif" id="selectDataTypeImage" alt="small
> >>looking glass" title="select typefilter"/>
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >>
> >> please find the whole JSP attached.
> >>
> >> editListBean is a session scope bean that holds a dataobject -- a detail of
> >>a master/detail relationship. This data object has a type, which can be the
> >>below metamodel.ListType it has a name, a description and a couple of other
> >>fields. The type is set in the selectDataType Dialog, which is opened with
> >>the small looking glass to the right of the output text.
> >>
> >> Thanks!
> >>
> >> Navid
> >>
> >> Luca Conte wrote:
> >> Can U post the jsp code?
> >>Navid Vahdat ha scritto:
> >>
> >>
> >>
> >> Can somebody give me a hand on this? The Exception seems to be
> >>connected to using a h:inputhidden with a custom converter. When the
> >>value is null, everithing is fine. When the value is set to an object
> >>(in this case metamodel.ListType), rendering the page is fine, but
> >>triggering a UICommand that is not immediate causes the Exception.
> >>
> >>I'm stuck. Is this a known bug?
> >>
> >>Navid
> >>
> >>Navid Vahdat wrote:
> >>
> >>
> >>
> >> Guys, I get this not serializable exception. The exception is
> >>correct, because metamodel.ListType, a value in a hidden field with a
> >>working converter, definitely is not serializable. Why is myFaces
> >>(ver. 1.1.0) trying to serialize it?
> >>
> >>Thanks,
> >>Navid
> >>
> >>28.09.2005 10:26:51 org.apache.myfaces.util.StateUtils
> >>encode64
> >>SCHWERWIEGEND: Cannot encode Object with Base64
> >>_java.io.NotSerializableException_: metamodel.ListType
> >> at
> >>java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1054_)
> >> at
> >>java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
> >> at
> >>java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
> >> at
> >>java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
> >> at
> >>java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
> >> at
> >>java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
> >> at
> >>java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
> >> at
> >>java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
> >> at java.util.ArrayList.writeObject(_ArrayList.java:529_)
> >> at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown
> >>Source)
> >> at
> >>sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)
> >>
> >> at java.lang.reflect.Method.invoke(_Method.java:324_)
> >> at
> >>java.io.ObjectStreamClass.invokeWriteObject

Re: NotSerializableException

2005-09-29 Thread Navid Vahdat
The Object is not marked transient -- as is no other. It's part of a 
property of a component's backing bean. AFAIK you're not forced to mark 
them transient, are you?


What is trying to serialize them is quite obvious from the stack trace. 
It's the State Manager. The question is why! And why doesn't it call the 
converter? My converter would provite it with a beautifully serializable 
String.


Mike Kienenberger wrote:


Is your non-serialiable object marked as transient in your
session-scoped bean?  If not, it'll be serialized...

I think the first thing you'll want to do is to determine what is
trying to serialize it.   Is it a managed bean or a component?

On 9/29/05, Navid Vahdat <[EMAIL PROTECTED]> wrote:
 


Just bringing this subject up once more. Somebody able to say something
about it?

Navid Vahdat wrote:
Hi Luca,

the relevant JSP code is


*:

















please find the whole JSP attached.

editListBean is a session scope bean that holds a dataobject -- a detail of
a master/detail relationship. This data object has a type, which can be the
below metamodel.ListType it has a name, a description and a couple of other
fields. The type is set in the selectDataType Dialog, which is opened with
the small looking glass to the right of the output text.

Thanks!

Navid

Luca Conte wrote:
Can U post the jsp code?
Navid Vahdat ha scritto:



Can somebody give me a hand on this? The Exception seems to be
connected to using a h:inputhidden with a custom converter. When the
value is null, everithing is fine. When the value is set to an object
(in this case metamodel.ListType), rendering the page is fine, but
triggering a UICommand that is not immediate causes the Exception.

I'm stuck. Is this a known bug?

Navid

Navid Vahdat wrote:



Guys, I get this not serializable exception. The exception is
correct, because metamodel.ListType, a value in a hidden field with a
working converter, definitely is not serializable. Why is myFaces
(ver. 1.1.0) trying to serialize it?

Thanks,
Navid

28.09.2005 10:26:51 org.apache.myfaces.util.StateUtils
encode64
SCHWERWIEGEND: Cannot encode Object with Base64
_java.io.NotSerializableException_: metamodel.ListType
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1054_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at java.util.ArrayList.writeObject(_ArrayList.java:529_)
at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

at java.lang.reflect.Method.invoke(_Method.java:324_)
at
java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)

at
java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)

at
java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)

at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1052_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at java.util.ArrayList.writeObject(_ArrayList.java:529_)
at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

at java.lang.reflect.Method.invoke(_Method.java:324_)
at
java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)

at
java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)

at
java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)

at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1052_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at
org.apache.myfaces.util.StateUtils.encode64(_StateUtils.java:33_)
at
org.apache.myfaces.re

Re: NotSerializableException

2005-09-29 Thread Mike Kienenberger
Is your non-serialiable object marked as transient in your
session-scoped bean?  If not, it'll be serialized...

I think the first thing you'll want to do is to determine what is
trying to serialize it.   Is it a managed bean or a component?

On 9/29/05, Navid Vahdat <[EMAIL PROTECTED]> wrote:
>  Just bringing this subject up once more. Somebody able to say something
> about it?
>
>  Navid Vahdat wrote:
>  Hi Luca,
>
>  the relevant JSP code is
>
>  
>  *:
>  
>  
>  
>  
>   id="type_name" value="#{editListBean.dataObject.type.name}"
> title="#{editListBean.dataObject.type.description}"/> id="type" value="#{editListBean.dataObject.type}" required="true"
> converter="datatypeConverter" />
>  
>   action="#{editListBean.selectDataType}" id="selectDataTypeLink"
> immediate="true">
>   url="/images/small-lookingglass.gif" id="selectDataTypeImage" alt="small
> looking glass" title="select typefilter"/>
>  
>  
>  
>  
>  
>  
>  
>  
>
>  please find the whole JSP attached.
>
>  editListBean is a session scope bean that holds a dataobject -- a detail of
> a master/detail relationship. This data object has a type, which can be the
> below metamodel.ListType it has a name, a description and a couple of other
> fields. The type is set in the selectDataType Dialog, which is opened with
> the small looking glass to the right of the output text.
>
>  Thanks!
>
>  Navid
>
>  Luca Conte wrote:
>  Can U post the jsp code?
> Navid Vahdat ha scritto:
>
>
>
>  Can somebody give me a hand on this? The Exception seems to be
> connected to using a h:inputhidden with a custom converter. When the
> value is null, everithing is fine. When the value is set to an object
> (in this case metamodel.ListType), rendering the page is fine, but
> triggering a UICommand that is not immediate causes the Exception.
>
> I'm stuck. Is this a known bug?
>
> Navid
>
> Navid Vahdat wrote:
>
>
>
>  Guys, I get this not serializable exception. The exception is
> correct, because metamodel.ListType, a value in a hidden field with a
> working converter, definitely is not serializable. Why is myFaces
> (ver. 1.1.0) trying to serialize it?
>
> Thanks,
> Navid
>
> 28.09.2005 10:26:51 org.apache.myfaces.util.StateUtils
> encode64
> SCHWERWIEGEND: Cannot encode Object with Base64
> _java.io.NotSerializableException_: metamodel.ListType
>  at
> java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1054_)
>  at
> java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
>  at
> java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
>  at
> java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
>  at
> java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
>  at
> java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
>  at
> java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
>  at
> java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
>  at java.util.ArrayList.writeObject(_ArrayList.java:529_)
>  at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown
> Source)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)
>
>  at java.lang.reflect.Method.invoke(_Method.java:324_)
>  at
> java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)
>
>  at
> java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)
>
>  at
> java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)
>
>  at
> java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1052_)
>  at
> java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
>  at
> java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
>  at
> java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
>  at java.util.ArrayList.writeObject(_ArrayList.java:529_)
>  at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown
> Source)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)
>
>  at java.lang.reflect.Method.invoke(_Method.java:324_)
>  at
> java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)
>
>  at
> java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)
>
>  at
> java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)
>
>  at
> java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1052_)
>  at
> java.io.ObjectOutputStream.writ

Re: inputDate

2005-09-29 Thread Bruno Aranda
There are more differences. The component calendar can be shown as an
input text and a button to popup the calendar, or just as a calendar
(without popup). Both have in common that they can pop up a calendar
if requested. Take a look at the examples for each of the components
in the simple examples, to see them in action with different
configurations,

Regards,

Bruno

2005/9/28, Dave <[EMAIL PROTECTED]>:
> what is the difference between inputDate and inputCalendar?
> Is the difference: inputDate can have hour/minute/second, but inputCalendar
> can not?
>
> Bruno Aranda <[EMAIL PROTECTED]> wrote:
> This is a bug solved after 1.1.0 (MYFACES-601), but it is currently
> fixed in the nightlies.
>
> Regards,
>
> Bruno
>
> Wed, 28 Sep 2005 13:04 +0200, [EMAIL PROTECTED] :
> > Hello!
> >
> > I have problems with the time of the inputDate. If I type in
> > 12:00:00...it will be converted to 00:00:00
> > How can I change this?
> >
> >
> >
> >
> > Thanks in advance
> >
> > regards,
> > Conny
> >
> >
> > --
> > Ein Service von http://www.sms.at
> >
> >
>
>
>  
> Yahoo! for Good
>  Click here to donate to the Hurricane Katrina relief effort.
>
>


Re: Hibernate and Datascroller

2005-09-29 Thread Joel Wilson
Personally I always tell hibernate to disable lazy loading, I've  
found that no matter what web framework you use that problem occurs  
(unless you take control and use it in a model 1).


On Sep 29, 2005, at 12:24 PM, Richard Wallace wrote:

The problem is that the bean that holds the list of data for the  
table is session scoped.  So, on the first request to the page the  
hibernate query is done and then you store the resulting List in  
the HTTP session.  On a subsequent request to the page you try to  
access data in the List that you didn't access on a previous  
request.  Since the List is lazily loaded and you are no longer  
operating within the same Hibernate session that was used to do the  
query you get the lazy initialization exception.
A general rule of thumb that I've had to adopt is to never put a  
Hibernate returned object or List in the HTTP session because if  
there is any lazy loading involved, whether they're elements in a  
List or properties of an object, you will get the LLE.  It's better  
just to re-run the query.  If you're using the 2nd level cache and  
query caching then it's not that much more overhead and much less  
work than trying to do something like DTOs.


Rich

Ryan Wynn wrote:



Any hibernate-spring experts out there that could tell me how I  
can still get a LazyInit exception inside my spring  
OpenSessionInViewFilter.  My stack trace clearly says I am inside  
the Filter.  Exception - No session or session was closed.


This is happening when using the myfaces datascroller for a  
datatable and paging.  Bean that holds List of data for table is  
session scoped.


Unfortunately, the data is a list of hibernate objects.  I  
probably should be copying these into plain pojos for the view,  
but that is not what I am doing.  Probably because then I could  
need to replicate my entire object tree.






Re: Rif: jboss problem

2005-09-29 Thread Werner Punz
Ok thanks, then something must be going wrong with my configuration,
I will give it another try soon.

Werner


Emmanuel Jay wrote:
> We are using JBoss 4.0.2 and having no problem with JSF. We have even
> recently tried some Jenia4Faces component and all works fine...
> 
> For the login we use a standard html page together with j_security_check
> and that works fine...
> 
> Regards,
> Emmanuel
> 
> On 9/29/05, *Bruno Aranda* <[EMAIL PROTECTED]
> > wrote:
> 
> We are using JBoss in out projects and we have not found any problem
> with JSF. The only thing is that JBoss 4.0.3 comes with myfaces
> already in it. So if you are using newer versions of myfaces you have
> to replace the jars in JBoss with your new ones in the folder
> $JBOSS_HOME/server/all/deploy/jbossweb-tomcat55.sar
> 
> Regards,
> 
> Bruno
> 
> 2005/9/29, Werner Punz <[EMAIL PROTECTED] >:
> > As soon as I have things up and running...
> >
> > I tried to integrate it via the embedded toolkit
> > into a normal tomcat yesterday and failed miserably due
> > to the integrated sql server not running,
> >
> > so I tried to go to a straig jboss today, the server looked
> > to be excellent ( I have to admit I havent had a look at jboss for
> years
> > being mostly happy with Tomcat)
> >
> > but the problem was to get jsf up and running, I have failed on
> two projects
> > for now :-)
> >
> > Werner
> >
> >
> > Dennis Byrne wrote:
> > >>hands, I really would love to try jboss for their Seam
> > >
> > > stuff ;-)
> > >
> > >>It looks to interesting to be bypassed.
> > >
> > >
> > > Please share the experience w/ the rest of us once you have
> > > done this Werner.
> > > Dennis Byrne
> > >
> >
> >
> 
> 



Re: NotSerializableException

2005-09-29 Thread Navid Vahdat




Just bringing this subject up once more. Somebody able to say something
about it?

Navid Vahdat wrote:

  
  
Hi Luca,
  
the relevant JSP code is 
  
                
                    *:
                    
                        
                            
                                
                                    
                                     
                                        
                                            
                                        
                                    
                                
                            
                        
                        
                    
                
  
please find the whole JSP attached.
  
editListBean is a session scope bean that holds a dataobject -- a
detail of a master/detail relationship. This data object has a type,
which can be the below metamodel.ListType it has a name, a description
and a couple of other fields. The type is set in the selectDataType
Dialog, which is opened with the small looking glass to the right of
the output text.
  
Thanks!
  
Navid
  
Luca Conte wrote:
  
Can U post the jsp code?
Navid Vahdat ha scritto:

  

  Can somebody give me a hand on this? The Exception seems to be
connected to using a h:inputhidden with a custom converter. When the
value is null, everithing is fine. When the value is set to an object
(in this case metamodel.ListType), rendering the page is fine, but
triggering a UICommand that is not immediate causes the Exception.

I'm stuck. Is this a known bug?

Navid

Navid Vahdat wrote:


  
Guys, I get this not serializable exception. The exception is
correct, because metamodel.ListType, a value in a hidden field with a
working converter, definitely is not serializable. Why is myFaces
(ver. 1.1.0) trying to serialize it?

Thanks,
Navid

28.09.2005 10:26:51 org.apache.myfaces.util.StateUtils encode64
SCHWERWIEGEND: Cannot encode Object with Base64
_java.io.NotSerializableException_: metamodel.ListType
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1054_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at java.util.ArrayList.writeObject(_ArrayList.java:529_)
at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

at java.lang.reflect.Method.invoke(_Method.java:324_)
at
java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)

at
java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)

at
java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)

at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1052_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at java.util.ArrayList.writeObject(_ArrayList.java:529_)
at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

at java.lang.reflect.Method.invoke(_Method.java:324_)
at
java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)

at
java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)

at
java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)

at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1052_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at
org.apache.myfaces.util.StateUtils.encode64(_StateUtils.java:33_)
at
org.apache.myfaces.renderkit.html.HtmlResponseStateManager.writeState(_HtmlResponseStateManager.java:104_)

at
org.apache.myfaces.application.jsp.JspStateManagerImpl.writeState(_JspStateManagerImpl.java:268_)

at
org.apache.myfaces.taglib.core.ViewTag.doAfterBody(_ViewTag.java:160_)
at
org.apache.jsp.EditList_jsp._jspx_meth_f_view_0(_EditList_jsp.java:201_)
at
org.apache.jsp.EditList_jsp._jspS

Re: swapImage not rendering at all.

2005-09-29 Thread Bruno Aranda
Could you open a JIRA with that? t:swapImage does work in the
examples, but it is not in a commandLink, so there might be a bug
here...

Bruno

2005/9/29, Gregg D Bolinger <[EMAIL PROTECTED]>:
> I have the following:
>
> 
>   swapImageUrl="images/circle_buttons/go_grey_2.gif"
>
> activeImageUrl="images/circle_buttons/go_grey_1.gif"/>
> 
>
> The image(s) do not render at all, and when I say that I mean this is what I
> get in the HTML
>
> 
>
> Nothing renders for the image(s).  I am using MyFaces 1.1.0 and I am using
> the 3 JARs instead of the -all.jar.
>
> Thanks.
>
> Gregg
>
>


Re: Rif: jboss problem

2005-09-29 Thread Emmanuel Jay
We are using JBoss 4.0.2 and having no problem with JSF. We have even
recently tried some Jenia4Faces component and all works fine...

For the login we use a standard html page together with j_security_check and that works fine...

Regards,
EmmanuelOn 9/29/05, Bruno Aranda <[EMAIL PROTECTED]> wrote:
We are using JBoss in out projects and we have not found any problemwith JSF. The only thing is that JBoss 4.0.3 comes with myfacesalready in it. So if you are using newer versions of myfaces you haveto replace the jars in JBoss with your new ones in the folder
$JBOSS_HOME/server/all/deploy/jbossweb-tomcat55.sarRegards,Bruno2005/9/29, Werner Punz <[EMAIL PROTECTED]>:> As soon as I have things up and running...
>> I tried to integrate it via the embedded toolkit> into a normal tomcat yesterday and failed miserably due> to the integrated sql server not running,>> so I tried to go to a straig jboss today, the server looked
> to be excellent ( I have to admit I havent had a look at jboss for years> being mostly happy with Tomcat)>> but the problem was to get jsf up and running, I have failed on two projects> for now :-)
>> Werner>>> Dennis Byrne wrote:> >>hands, I really would love to try jboss for their Seam> >> > stuff ;-)> >> >>It looks to interesting to be bypassed.
> >> >> > Please share the experience w/ the rest of us once you have> > done this Werner.> > Dennis Byrne> >>>


Horizontal pannelNavigation

2005-09-29 Thread Doug Schnelzer
Is there a way to set the
pannelNavigation tag to render a horizontal instead of a vertical menu?  I
couldn't find an attribute for the tag.

 


Thanks, Doug




Re: Hibernate and Datascroller

2005-09-29 Thread Werner Punz
Ryan Wynn wrote:
> 
> The problem was the old/new session as Rich described.  Instead of
> rerunning the query I just reattached the objects to the new session
> with session.lock.
> 
> I opted for this because the table data comes from 1 of 2 queries
> depending on user interaction within the page.  Instead of trying to
> figure out what the user did to generate the table I just reattached the
> objects.  
> 
> Is the reattach with hibernate session.lock(obj, LockMode.NONE)
> expensive?  What does it do?
> 
It does what it is said to do, it locks the object to the session,
but the thing is, that this only works with lock if the object has not been 
altered
also it seems to fail with lazy at least in your case ;-)...

I am not even sure if you can alter the object afterwards and save it, I 
remember vaguely
that you cannot.

Usually if you do not have any lazy loading problems on your hand
you can directly save the  object to the session.

I have to admit, I have to reread the chapter again, because the mechanisms of 
attaching
reattaching etc... are not too well described there, and even after several
projects I still am not fully sure how they differ.

All I can say is if you need straight write access from an object outside of 
your session
use save update saveOrUpdate or persist and things should work out as expected.

This is definitely one of the biggest issue areas in my opinin, where the 
Hibernate
documentation needs more substance and also where the api has to be simplified.
The whole lock only if unmodified, and then even it fails if you write etc...
stuff is outright confusing.





Re: Rif: jboss problem

2005-09-29 Thread Bruno Aranda
We are using JBoss in out projects and we have not found any problem
with JSF. The only thing is that JBoss 4.0.3 comes with myfaces
already in it. So if you are using newer versions of myfaces you have
to replace the jars in JBoss with your new ones in the folder
$JBOSS_HOME/server/all/deploy/jbossweb-tomcat55.sar

Regards,

Bruno

2005/9/29, Werner Punz <[EMAIL PROTECTED]>:
> As soon as I have things up and running...
>
> I tried to integrate it via the embedded toolkit
> into a normal tomcat yesterday and failed miserably due
> to the integrated sql server not running,
>
> so I tried to go to a straig jboss today, the server looked
> to be excellent ( I have to admit I havent had a look at jboss for years
> being mostly happy with Tomcat)
>
> but the problem was to get jsf up and running, I have failed on two projects
> for now :-)
>
> Werner
>
>
> Dennis Byrne wrote:
> >>hands, I really would love to try jboss for their Seam
> >
> > stuff ;-)
> >
> >>It looks to interesting to be bypassed.
> >
> >
> > Please share the experience w/ the rest of us once you have
> > done this Werner.
> > Dennis Byrne
> >
>
>


Re: How to Pass a Value from to JavaScript?

2005-09-29 Thread Matt Blum
I suggest avoiding using the form objects entirely, and simply using
document.getElementById([id]) to obtain references to the text fields.

-MattOn 9/29/05, Caroline Jen <[EMAIL PROTECTED]> wrote:
I have to use JSF to pop up a window from the parentwindow.  In the popup window, I have to pass the valuethat is entered in a  back to a textfield in the parent window.In order to make sure that I know the way to
communicate between the parent window and the popupwindow, I have tried coding it in HTML.  And I havedone it successfully.Then, I try to convert the HTML code to JSF.  I havesearched the internet and I have tried different
specifications myself.  I am stuck.  This is the linethat I have been struggling with:[CODE]window.opener.document.forms[0].form["dataManagement:textField"].value=document.forms[0].form["externalFile:inputField"].value;
[/CODE]If textField is in HTML parent window name=textField  /> and the inputField is in HTMLpopup window , the_javascript_ can recognize (No problem! the datum is
passed.):[CODE]window.opener.document.forms[0].textField.value =document.forms[0].inputField.value;[/CODE]Now, the dataManagement is the "id" attribute in myJSF parent  tag.  The externalFile is the "id"
attribute in my JSF popup  tag.The textField is in the JSF parent window as both the"id" attribute and a "property" name (i.e.value="#{dataManagementBean.textField
}" )in the tag.The inputField is in the JSF popup window as both the"id" attribute and a "property" name (i.e.value="#{accessExternalFileBean.inputField
}" ) in the tag.No matter how I experiment with differentspecifications, I cannot get the textField andinputField in the _javascript_.  I got that "it is nullor not an object" _javascript_ error.  Please advise if
you have done it successfully.__Yahoo! Mail - PC Magazine Editors' Choice 2005http://mail.yahoo.com



Re: Hibernate and Datascroller

2005-09-29 Thread Ryan Wynn

The problem was the old/new session
as Rich described.  Instead of rerunning the query I just reattached
the objects to the new session with session.lock. 

I opted for this because the table data
comes from 1 of 2 queries depending on user interaction within the page.
 Instead of trying to figure out what the user did to generate the
table I just reattached the objects.  

Is the reattach with hibernate session.lock(obj,
LockMode.NONE) expensive?  What does it do?








Werner Punz <[EMAIL PROTECTED]>

Sent by: news <[EMAIL PROTECTED]>
09/29/2005 12:37 PM



Please respond to
"MyFaces Discussion"





To
users@myfaces.apache.org


cc



Subject
Re: Hibernate and Datascroller








Ryan Wynn wrote:
> 
> Any hibernate-spring experts out there that could tell me how I can
> still get a LazyInit exception inside my spring OpenSessionInViewFilter.
>  My stack trace clearly says I am inside the Filter.  Exception
- No
> session or session was closed.
> 
> This is happening when using the myfaces datascroller for a datatable
> and paging.  Bean that holds List of data for table is session
scoped.
> 
> Unfortunately, the data is a list of hibernate objects.  I probably
> should be copying these into plain pojos for the view, but that is
not
> what I am doing.  Probably because then I could need to replicate
my
> entire object tree.
Probably a recycled data model?
Another option, which I had once in a project... either the filter
is not correctly set, or you might have an iframe somewhere triggering
something hibernatish outside of your filter.

Werner





How to Pass a Value from to JavaScript?

2005-09-29 Thread Caroline Jen
I have to use JSF to pop up a window from the parent
window.  In the popup window, I have to pass the value
that is entered in a  back to a text
field in the parent window.

In order to make sure that I know the way to
communicate between the parent window and the popup
window, I have tried coding it in HTML.  And I have
done it successfully.

Then, I try to convert the HTML code to JSF.  I have
searched the internet and I have tried different
specifications myself.  I am stuck.  This is the line
that I have been struggling with:

[CODE]
window.opener.document.forms[0].form["dataManagement:textField"].value
=
document.forms[0].form["externalFile:inputField"].value;
[/CODE]

If textField is in HTML parent window  and the inputField is in HTML
popup window , the
JavaScript can recognize (No problem! the datum is
passed.):

[CODE]
window.opener.document.forms[0].textField.value =
document.forms[0].inputField.value;
[/CODE]

Now, the dataManagement is the "id" attribute in my
JSF parent  tag.  The externalFile is the "id"
attribute in my JSF popup  tag.

The textField is in the JSF parent window as both the
"id" attribute and a "property" name (i.e.
value="#{dataManagementBean.textField}" )in the
 tag.

The inputField is in the JSF popup window as both the
"id" attribute and a "property" name (i.e.
value="#{accessExternalFileBean.inputField}" ) in the
 tag.

No matter how I experiment with different
specifications, I cannot get the textField and
inputField in the JavaScript.  I got that "it is null
or not an object" JavaScript error.  Please advise if
you have done it successfully.





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


Re: jboss problem

2005-09-29 Thread Mario Ivankovits

Werner Punz wrote:

Hi I gave JBoss 4.0.2 a testrun recently. I am running into problems with it
 
I installed jboss-jdk5-seam-403RC2 today and tried a very simple jsf 
page. Just 3 Even if there comes a myfacse.jar with this jboss installation I put the 
latest and hottest myfaces-all.jar simply in WEB-INF/lib and it works 
like a charme.


---
Mario



Problem with MyEclipse 4.0/MyFaces 1.1.0/jscookmenu

2005-09-29 Thread Kevin
Hi,

I posted this to the MyEclipse forum, but I was directed here sine the
problem is more likely due to MyFaces caching.
Any info would be much appreciated!

***
I am working with the following:

Eclipse 3.1 Build I20050627-1435 (freshly installed=yes)
MyEclipse 4.0 Build id: 20050829-4.0.0-GA
Tomcat 5.5.9, Sun JVM 1.5.0_05-b05
OS: Windows 2000 SP4
RAM: 1 GB
- Are any other external plugins installed?
de.jayefem.log4e_free_1.0.4
- How many plugins in the /plugins directory are like org.eclipse.pde.*
4
- Are there any exceptions in the Eclipse log file?
(/.metadata/.log)
No.
***

I replaced the MyFaces support that shipped with MyEclipse 4.0 with
MyFace 1.1.0.
It seems to work...more or less.

Here is a problem that I noticed.
This may not be the fault of Eclipse/MyEclipse, but a problem with the
way MyFaces works?

Example:

I am trying to use jscookmenu which is part of Tomahawk.
My menu looks a little something like this:







   
   











Loading this up the first time, it works great (if you do everything
right of course).

However, when I make changes and save (which recompiles the JSP), I do
not see the changes. This is true even if I do a reload in the Tomcat
Web Application Manager.
Strangely though, if I remove the menu completely from the JSP, save
the JSP and reload it in the browser, then add it in again with the
changes, save, etc. I can then see the changes.
Example change = changing theme="ThemeOffice" to theme="ThemeMiniBlack"
I think I know why I am not seeing these changes.
If you do a View Source on a rendered JSP with a jscookmenu, you will
see something like this in the HTML header.








These values are not changing when I make a change in my JSP. To see
my change, I have to totally remove the component as described above.
I believe that this "feature" is related ot the Apache MyFaces'
Extensions Filter:
http://myfaces.apache.org/tomahawk/extensionsFilter.html

So, I think it is caching the CSS and JavaScript files in memory and
not freeing them up when I recompile my JSP.

Does anyone have any experience with this problem or has anyone tried
out the jscookmenu under MyFaces 1.1.0 to confirm my suspicions?

Cheers,

Kevin Hutson


Re: Rif: jboss problem

2005-09-29 Thread Werner Punz
As soon as I have things up and running...

I tried to integrate it via the embedded toolkit
into a normal tomcat yesterday and failed miserably due
to the integrated sql server not running,

so I tried to go to a straig jboss today, the server looked
to be excellent ( I have to admit I havent had a look at jboss for years
being mostly happy with Tomcat)

but the problem was to get jsf up and running, I have failed on two projects
for now :-)

Werner


Dennis Byrne wrote:
>>hands, I really would love to try jboss for their Seam 
> 
> stuff ;-)
> 
>>It looks to interesting to be bypassed.
> 
> 
> Please share the experience w/ the rest of us once you have 
> done this Werner.
> Dennis Byrne
> 



t:updateActionListener and Master-detail

2005-09-29 Thread Richard Wallace

Hey all,

I'm running into a situation that's got me very confused.  Basically I'm 
using the  to do the master-detail pattern as in 
the examples.  The problem I'm running into is that the value passed to 
the property doesn't seem to be correct all the time.  I think the 
problem is that the list that I'm trying to drill down into is a 
filtered list and is filtered based on some state in the backing bean.  
I'm not preserving the state of the filters in the backing bean so when 
the data model is recreated it does so without the filters and uses 
instead an unfiltered list.  I can use  to save the 
filters, that's no problem. 

What I am a bit surprised by though is that the value parameter to the 
 doesn't seem to be figured out until after the 
user clicks the commandLink.  I was expecting the value of the parameter 
to be determined when the page first loads so that you're guaranteed 
that the value used when the page loads is the same value set in the 
property attribute.  Otherwise, it seems this is could result in 
problems if, for instance, the data model changes (elements are added 
and/or removed) in between the two requests.  That's one of the reasons 
I was using the  rather than doing something 
more like a handler that gets the data model and uses the getRowData() 
to get the currently selected object.


I know I could use the preserveDataModel attribute on the extended data 
table to make it unnecessary to refetch the data list, but I'm using 
Hibernate here so that's not really possible.  I also don't want to do 
that because the list could be quite large and change pretty frequently.


Is it possible to change the  to determine the 
value that is going to be set on the property when the page loads rather 
than after the commandLink or button is clicked?



Thanks,
Rich


Re: date conversion headache (HELP! URGENT!)

2005-09-29 Thread Matt Blum
Try changing the convertDateTime tag thusly:


-Matt
On 9/29/05, Jan Dockx <[EMAIL PROTECTED]> wrote:
1 step further:Submitting
data works ok: if I enter 1/9/2005 in the entry field, the DB ends up
with 1/9/2005, 0:00h. So the MyFaces DateTimeConverter converts ok. So
far so good. Data that comes from the DB creates a java.util.Date that
is 1/9/2005, 0:00h. Ok. When I show it with JSP EL, I see 1/9/2005. Ok.
When I show that Date with JSF however, it shows 31/8/2005 23:00h! When
I add timeZone="GMT+2", it renders 1/9/2005. We are in Belgium,
daylight saving time is active, and we are in GMT+1.At least, this is inconsistent behavior. And frankly, looking at the code of DateTimeConverter, I don't get it.On Thursday, September 29, 2005, at 05:28PM, Jan Dockx <
[EMAIL PROTECTED]> wrote:>I'm getting tired.>>We have this jsf code:>>1:
>2:
${enrollmentH.instance.startDate}>>
value="#{enrollmentH.instance.startDate}">
required="true">
size="10">
maxlength="10">
displayValueOnly="#{not enrollmentH.showFields}">
displayValueOnlyStyleClass="#{enrollmentH.viewMode}">>  >>>(ok, it's hacked)>>the enrollmentH.instance.startDate is a java.util.Date, 1 september 2005.>>What is shown is
>>31-aug-2005>2: 2005-09-01>31/08/2005?>>in other words:>>h:outputText rendes 31 august>JSP el renders 1 september>h:inputText renders 31 august>
>JSF is one day off!!!>>It's probably our fault. We are using a custom build of the main trunk, 2005-09-28, 11:00am CET.>What are we missing>>


Re: dataTable is not sortable with the SUN JSF RI

2005-09-29 Thread R. Müller

hello group,

i've just discovered exactly the same problem. but no solution yet :-(.

Ronald


Xavier Loiseau wrote:

Hi,


The "myfaces-1.1.0-examples/simple/openDataTable.jsp"
table is expected to be sortable through clicking on
any of the column headers.

This feature works when using the MyFaces JSF
implementation, that is when using the following jars:
- myfaces-api-1.1.0 and
- myfaces-impl-1.1.0 .

But this feature does not work when using the SUN JSF
RI, that is when using the following jars:
- jsf-api-1.1.1 and
- jsf-impl-1.1.1.

The table is displayed correctly but clicking on any
column header does not have any effect except printing
the following Java Script error: 
"Error: clear__5Fid1 is not defined".


Does anybody have any idea about this issue ?

Thank you !


Xav







___ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com




--
*
*M-Unicomp GmbH
*
*Ronald Müller
*
*Plauener Straße 163-165, Haus 11
*13053 Berlin
*
*fon   : +49 ( 0 ) 30  / 98 69 61 54
*mobil : +49 ( 0 ) 172 / 93 95 00 4
*fax   : +49 ( 0 ) 30  / 98 69 61 55
*email : [EMAIL PROTECTED]
*web   : www.unicomp-berlin.de



RE: Having a "Default" commandButton

2005-09-29 Thread CONNER, BRENDAN \(SBCSI\)
I just noticed some very strange behavior (using IE) regarding buttons:

If I have a single  field and a single ,
then hitting enter seems to invoke something (because the window
flickers), but the commandButton's action does not get fired.

However, if a add a second  field, even if it has no
associated action, then, if I enter something in the first 
field and hit enter, the 's action gets fired.

Summary:
One (or zero) entry box ==> hitting enter doesn't do anything
two entry boxes (or a table of check boxes) ==> hitting enter
causes the command button's action to fire

This is certainly strange.  Just to make sure, I did the following:

Created a screen with just a textArea and a commandButton ==>
hitting enter didn't do anything
Then added an empty inputText ==> hitting enter didn't do
anything
Then added another empty inputText ==> hitting enter fired the
commandButton's action

Does anyone else notice this behavior?

- Brendan

-Original Message-
From: Travis Reeder [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 28, 2005 11:30 AM
To: MyFaces Discussion
Subject: Re: Having a "Default" commandButton


I don't think there is one in MyFaces, but there probably should be
something in tomahawk that can do this.  I noticed this one a bit ago:
http://www.jsftutorials.net/defaultActionTag.html that does this.

Travis

On 9/28/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote:
> Is there a way to specify one's  so it is the
"default"
> button?  In other words, is there a way to specify it such that it is
> clicked when the user hits the "enter" key?
>
> Also, on a related note, is there a way to specify an 
such
> that the cursor gets placed there automatically when the page loads,
> rather than requiring the user to first click on the text box before
> typing?
>
> - Brendan
>


Re: Rif: jboss problem

2005-09-29 Thread Dennis Byrne
>hands, I really would love to try jboss for their Seam 
stuff ;-)
>It looks to interesting to be bypassed.

Please share the experience w/ the rest of us once you have 
done this Werner.
Dennis Byrne


Re: Rif: jboss problem

2005-09-29 Thread Werner Punz
Thanks for the hint, actually the login stuff is jsfed for a number
of reasons, one being that it is not only a login page...

But I do not think it will solve the problem,
I will give those issues a testrun tomorrow when I have more time on my
hands, I really would love to try jboss for their Seam stuff ;-)
It looks to interesting to be bypassed.


Werner

Sean Schofield wrote:
> Are you using JSF in your login page?  I would avoid that if possible.
>  There's really no need for JSF for something that simple.  Try a
> generic login page just to see if it works.
> 
> sean
> 



Re: Hibernate and Datascroller

2005-09-29 Thread Werner Punz
Ryan Wynn wrote:
> 
> Any hibernate-spring experts out there that could tell me how I can
> still get a LazyInit exception inside my spring OpenSessionInViewFilter.
>  My stack trace clearly says I am inside the Filter.  Exception - No
> session or session was closed.
> 
> This is happening when using the myfaces datascroller for a datatable
> and paging.  Bean that holds List of data for table is session scoped.
> 
> Unfortunately, the data is a list of hibernate objects.  I probably
> should be copying these into plain pojos for the view, but that is not
> what I am doing.  Probably because then I could need to replicate my
> entire object tree.
Probably a recycled data model?
Another option, which I had once in a project... either the filter
is not correctly set, or you might have an iframe somewhere triggering
something hibernatish outside of your filter.

Werner




Panel Navigation Examples

2005-09-29 Thread Doug Schnelzer








Can
someone send me some example source of the t:panelnavigation compontent?

 

Thanks,
Doug

 

[EMAIL PROTECTED]

 








Re: Hibernate and Datascroller

2005-09-29 Thread Richard Wallace
The problem is that the bean that holds the list of data for the table 
is session scoped.  So, on the first request to the page the hibernate 
query is done and then you store the resulting List in the HTTP 
session.  On a subsequent request to the page you try to access data in 
the List that you didn't access on a previous request.  Since the List 
is lazily loaded and you are no longer operating within the same 
Hibernate session that was used to do the query you get the lazy 
initialization exception. 

A general rule of thumb that I've had to adopt is to never put a 
Hibernate returned object or List in the HTTP session because if there 
is any lazy loading involved, whether they're elements in a List or 
properties of an object, you will get the LLE.  It's better just to 
re-run the query.  If you're using the 2nd level cache and query caching 
then it's not that much more overhead and much less work than trying to 
do something like DTOs.


Rich

Ryan Wynn wrote:


Any hibernate-spring experts out there that could tell me how I can 
still get a LazyInit exception inside my spring 
OpenSessionInViewFilter.  My stack trace clearly says I am inside the 
Filter.  Exception - No session or session was closed.


This is happening when using the myfaces datascroller for a datatable 
and paging.  Bean that holds List of data for table is session scoped.


Unfortunately, the data is a list of hibernate objects.  I probably 
should be copying these into plain pojos for the view, but that is not 
what I am doing.  Probably because then I could need to replicate my 
entire object tree. 




Re: Rif: jboss problem

2005-09-29 Thread Sean Schofield
Are you using JSF in your login page?  I would avoid that if possible.
 There's really no need for JSF for something that simple.  Try a
generic login page just to see if it works.

sean

On 9/29/05, Werner Punz <[EMAIL PROTECTED]> wrote:
> Could be but the wiki indicates that 4.0.2 already uses the tomcat
> classloader so this problem should not persist anymore
>
>
> [EMAIL PROTECTED] wrote:
> > If im'not wrong jboss doesn't look for jars in WEB-INF/lib.
> > Try isolating the classloading process for your webapp:
> >
> > http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
> >
> >
> > Hope this will help you.
> >
> > Roberto
> >
> >
> >
> >   Werner Punz
> >   <[EMAIL PROTECTED]>   Per:  
> > users@myfaces.apache.org
> >   Inviato da: news Cc:
> >   <[EMAIL PROTECTED]Oggetto:  jboss problem
> >   rg>
> >
> >
> >   29/09/2005 17.36
> >   Per favore,
> >   rispondere a
> >   "MyFaces
> >   Discussion"
> >
> >
> >
> >
> >
> >
> > Hi I gave JBoss 4.0.2 a testrun recently. I am running into problems with
> > it
> >
> > I have a perfectly working app which runs quite well on a tomcat 5.5.9
> >
> > when I deploy the thing to jboss I get following error:
> >
> > javax.servlet.ServletException: /login/login.jsp(36,7) No tag "messages"
> > defined in tag library imported with prefix "h"
> >  javax.faces.webapp.FacesServlet.service(FacesServlet.java:125)
> >
> > org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
> >
> >
> > de.mindmatters.faces.spring.RequestHandledFilter.doFilter(RequestHandledFilter.java:117)
> >
> >
> > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
> >
> >
> >
> > The MyFaces is 1.0.9 and the jars are included in the Web-inf/lib
> > does anyone of the participating people from jboss know on what is going
> >  on here, obviously jboss thinks that the tag does not exist, but I have
> > no clue why, the jar is there.
> >
> > (the header is following:
> > <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
> > <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
> > <%@ taglib uri="http://myfaces.apache.org/extensions"; prefix="x"%>
> >
> >
> >
> >
> >
> >
> >
>
>


Re: Rif: jboss problem

2005-09-29 Thread Werner Punz
Could be but the wiki indicates that 4.0.2 already uses the tomcat
classloader so this problem should not persist anymore


[EMAIL PROTECTED] wrote:
> If im'not wrong jboss doesn't look for jars in WEB-INF/lib.
> Try isolating the classloading process for your webapp:
> 
> http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
> 
> 
> Hope this will help you.
> 
> Roberto
> 
> 
>   
>  
>   Werner Punz 
>  
>   <[EMAIL PROTECTED]>   Per:  
> users@myfaces.apache.org  
>   Inviato da: news Cc:
>  
>   <[EMAIL PROTECTED]Oggetto:  jboss problem   
>   
>   rg> 
>  
>   
>  
>   
>  
>   29/09/2005 17.36
>  
>   Per favore, 
>  
>   rispondere a
>  
>   "MyFaces
>  
>   Discussion" 
>  
>   
>  
>   
>  
> 
> 
> 
> 
> Hi I gave JBoss 4.0.2 a testrun recently. I am running into problems with
> it
> 
> I have a perfectly working app which runs quite well on a tomcat 5.5.9
> 
> when I deploy the thing to jboss I get following error:
> 
> javax.servlet.ServletException: /login/login.jsp(36,7) No tag "messages"
> defined in tag library imported with prefix "h"
>  javax.faces.webapp.FacesServlet.service(FacesServlet.java:125)
> 
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
> 
> 
> de.mindmatters.faces.spring.RequestHandledFilter.doFilter(RequestHandledFilter.java:117)
> 
> 
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
> 
> 
> 
> The MyFaces is 1.0.9 and the jars are included in the Web-inf/lib
> does anyone of the participating people from jboss know on what is going
>  on here, obviously jboss thinks that the tag does not exist, but I have
> no clue why, the jar is there.
> 
> (the header is following:
> <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
> <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
> <%@ taglib uri="http://myfaces.apache.org/extensions"; prefix="x"%>
> 
> 
> 
> 
> 
> 
> 



Re: date conversion headache (HELP! URGENT!)

2005-09-29 Thread Jan Dockx
1 step further:

Submitting data works ok: if I enter 1/9/2005 in the entry field, the DB ends 
up with 1/9/2005, 0:00h. So the MyFaces DateTimeConverter converts ok. So far 
so good. Data that comes from the DB creates a java.util.Date that is 1/9/2005, 
0:00h. Ok. When I show it with JSP EL, I see 1/9/2005. Ok. When I show that 
Date with JSF however, it shows 31/8/2005 23:00h! When I add timeZone="GMT+2", 
it renders 1/9/2005. We are in Belgium, daylight saving time is active, and we 
are in GMT+1.

At least, this is inconsistent behavior. And frankly, looking at the code of 
DateTimeConverter, I don't get it.


 
On Thursday, September 29, 2005, at 05:28PM, Jan Dockx <[EMAIL PROTECTED]> 
wrote:

>I'm getting tired.
>
>We have this jsf code:
>
>1:  />
>2: ${enrollmentH.instance.startDate} />
> value="#{enrollmentH.instance.startDate}"
> required="true"
> size="10"
> maxlength="10"
> displayValueOnly="#{not enrollmentH.showFields}"
> 
> displayValueOnlyStyleClass="#{enrollmentH.viewMode}">
>  
>
>
>(ok, it's hacked)
>
>the enrollmentH.instance.startDate is a java.util.Date, 1 september 2005.
>
>What is shown is
>
>31-aug-2005
>2: 2005-09-01
>31/08/2005?
>
>in other words:
>
>h:outputText rendes 31 august
>JSP el renders 1 september
>h:inputText renders 31 august
>
>JSF is one day off!!!
>
>It's probably our fault. We are using a custom build of the main trunk, 
>2005-09-28, 11:00am CET.
>What are we missing
>
>


Hibernate and Datascroller

2005-09-29 Thread Ryan Wynn

Any hibernate-spring experts out there
that could tell me how I can still get a LazyInit exception inside my spring
OpenSessionInViewFilter.  My stack trace clearly says I am inside
the Filter.  Exception - No session or session was closed.

This is happening when using the myfaces
datascroller for a datatable and paging.  Bean that holds List of
data for table is session scoped.

Unfortunately, the data is a list of
hibernate objects.  I probably should be copying these into plain
pojos for the view, but that is not what I am doing.  Probably because
then I could need to replicate my entire object tree.

Generating taglib documentation

2005-09-29 Thread Ricardo R. Ramírez Valenzuela
Just a quick question. What tool is used for generating taglib 
documentation?

Does it use information from the .tld or from the source files directly?

Ricardo


Re: Best Practices Using DataScroller

2005-09-29 Thread Werner Punz
Yes that is the beauty of it, all you have to provide is some kind
of datasource which you have to provide for the data table anyway, the
scroller hooks itself onto the table and adds scrolling capabilities.



Mike Kienenberger wrote:
> No, it's very transparent to use.
> 
> You simply add one or more data scroller tags to your page and point
> it to the id of your dataTable, then set the value of the row
> attribute on your dataTable.   No java code required.
> 
> On 9/29/05, Rafael Nami <[EMAIL PROTECTED]> wrote:
> 
>>Good morning.
>>
>>I have to use DataScroller in my project. I was wondering what are the
>>"best practices" using this component, like, did it have to add some
>>atributes to my Backing bean to use it?
>>
>>Thanks in advance, and best all
>>
>>Rafael Mauricio Nami
>>
> 
> 



Rif: jboss problem

2005-09-29 Thread roberto . cavenaghi

If im'not wrong jboss doesn't look for jars in WEB-INF/lib.
Try isolating the classloading process for your webapp:

http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration


Hope this will help you.

Roberto



   
  Werner Punz   
   
  <[EMAIL PROTECTED]>   Per:  
users@myfaces.apache.org  
  Inviato da: news Cc:  
   
  <[EMAIL PROTECTED]Oggetto:  jboss problem 

  rg>   
   

   

   
  29/09/2005 17.36  
   
  Per favore,   
   
  rispondere a  
   
  "MyFaces  
   
  Discussion"   
   

   

   




Hi I gave JBoss 4.0.2 a testrun recently. I am running into problems with
it

I have a perfectly working app which runs quite well on a tomcat 5.5.9

when I deploy the thing to jboss I get following error:

javax.servlet.ServletException: /login/login.jsp(36,7) No tag "messages"
defined in tag library imported with prefix "h"
 javax.faces.webapp.FacesServlet.service(FacesServlet.java:125)

org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)


de.mindmatters.faces.spring.RequestHandledFilter.doFilter(RequestHandledFilter.java:117)


org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)



The MyFaces is 1.0.9 and the jars are included in the Web-inf/lib
does anyone of the participating people from jboss know on what is going
 on here, obviously jboss thinks that the tag does not exist, but I have
no clue why, the jar is there.

(the header is following:
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/extensions"; prefix="x"%>








jboss problem

2005-09-29 Thread Werner Punz
Hi I gave JBoss 4.0.2 a testrun recently. I am running into problems with it

I have a perfectly working app which runs quite well on a tomcat 5.5.9

when I deploy the thing to jboss I get following error:

javax.servlet.ServletException: /login/login.jsp(36,7) No tag "messages"
defined in tag library imported with prefix "h"
javax.faces.webapp.FacesServlet.service(FacesServlet.java:125)

org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)

de.mindmatters.faces.spring.RequestHandledFilter.doFilter(RequestHandledFilter.java:117)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


The MyFaces is 1.0.9 and the jars are included in the Web-inf/lib
does anyone of the participating people from jboss know on what is going
 on here, obviously jboss thinks that the tag does not exist, but I have
no clue why, the jar is there.

(the header is following:
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/extensions"; prefix="x"%>



Re: date conversion headache (HELP! URGENT!)

2005-09-29 Thread Matt Blum
My guess is that it's something to do with time zones.  Is it
possible that the startDate property is being set using your local
time, which I'm assuming is CET, and that the JSF tags are rendering
based on GMT?  If so, a date/time of midnight on 1 Sept. 2005
would be 11:00pm on 31 August 2005.

-MattOn 9/29/05, Jan Dockx <[EMAIL PROTECTED]> wrote:
I'm getting tired.We have this jsf code:1:
2:
${enrollmentH.instance.startDate}
value="#{enrollmentH.instance.startDate}"
required="true"
size="10"
maxlength="10"
displayValueOnly="#{not enrollmentH.showFields}"
displayValueOnlyStyleClass="#{enrollmentH.viewMode}">  (ok, it's hacked)the enrollmentH.instance.startDate is a java.util.Date, 1 september 2005.What is shown is31-aug-2005
2: 2005-09-0131/08/2005?in other words:h:outputText rendes 31 augustJSP el renders 1 septemberh:inputText renders 31 augustJSF is one day off!!!It's probably our fault. We are using a custom build of the main trunk, 2005-09-28, 11:00am CET.
What are we missing


date conversion headache (HELP! URGENT!)

2005-09-29 Thread Jan Dockx
I'm getting tired.

We have this jsf code:

1: 
2: ${enrollmentH.instance.startDate}

  


(ok, it's hacked)

the enrollmentH.instance.startDate is a java.util.Date, 1 september 2005.

What is shown is

31-aug-2005
2: 2005-09-01
31/08/2005?

in other words:

h:outputText rendes 31 august
JSP el renders 1 september
h:inputText renders 31 august

JSF is one day off!!!

It's probably our fault. We are using a custom build of the main trunk, 
2005-09-28, 11:00am CET.
What are we missing


dataTable is not sortable with the SUN JSF RI

2005-09-29 Thread Xavier Loiseau
Hi,


The "myfaces-1.1.0-examples/simple/openDataTable.jsp"
table is expected to be sortable through clicking on
any of the column headers.

This feature works when using the MyFaces JSF
implementation, that is when using the following jars:
- myfaces-api-1.1.0 and
- myfaces-impl-1.1.0 .

But this feature does not work when using the SUN JSF
RI, that is when using the following jars:
- jsf-api-1.1.1 and
- jsf-impl-1.1.1.

The table is displayed correctly but clicking on any
column header does not have any effect except printing
the following Java Script error: 
"Error: clear__5Fid1 is not defined".

Does anybody have any idea about this issue ?

Thank you !


Xav







___ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com


Re: Javascript(window.open) is executed before Method in Bean ->How can I change?

2005-09-29 Thread Mike Kienenberger
Yes, this is expected behavior.

You click on the button, the onclick code runs, and after it
completes, the form is submitted, which causes the server to execute
your actionListener and return a response.

Jenia4Faces PopupFrame appears to do what you want.
However, I've been unable to get it to work properly in my environment
so far, but that might just be because I'm using facelets, and haven't
created the correct TagHandler yet.

http://www.jenia.org, Family Popup

On 9/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I have a problem displaying the current data of a database query in a popup.
> The Popup is opened with javascript by a window.open COmmand. The data for
> the popup is retrieved by a ActionListener Method Binding.
>
> The Problem now seems to me, that the javascript is executed before the
> method and that's why I always have the previous shown data(from the popup
> opened before - because the data is in session) in the popup, although the
> database query was done perfectly. When I press F5 the correct data is
> shown.
>
> How can I tell Myfaces to use the method first and then open the Popup with
> the javascript command?
> Or do I have to use a completly other code? Perhaps is it possible to define
> a navigation rule, where I can tell Myfaces to open a small window?
>
> Here is my code:
>
>  image="images/downloaddatenblatt.gif"
> rendered="#{detailsDto.b_showdatenblatt}"
> onclick="window.open('popupDatasheet.jsf', 'Datasheets',
> 'width=800,height=400');" >
> 
> Regards
> Andy
> ~~
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify your system manager.
> This footnote also confirms that this email message has been swept for the
> presence of computer viruses.
> ~~
>


Re: Best Practices Using DataScroller

2005-09-29 Thread Mike Kienenberger
No, it's very transparent to use.

You simply add one or more data scroller tags to your page and point
it to the id of your dataTable, then set the value of the row
attribute on your dataTable.   No java code required.

On 9/29/05, Rafael Nami <[EMAIL PROTECTED]> wrote:
> Good morning.
>
> I have to use DataScroller in my project. I was wondering what are the
> "best practices" using this component, like, did it have to add some
> atributes to my Backing bean to use it?
>
> Thanks in advance, and best all
>
> Rafael Mauricio Nami
>


tree2 usage: how to detect which node was clicked?

2005-09-29 Thread Marcel Ruff

Hi,

i have a tree2, but how do i detect in my
backing bean which node id was clicked?

I'm using actionListener="#{mybean.clicked}" and
looking into the delivered ActionEvent instance
didn't help me yet.

thanks
Marcel


problem with extended datatable and preserveDataModel

2005-09-29 Thread Stefan Gesigora








Hi!

 

I’m using the extended datatable
with preserveDataModel=true for a page with search form and the search results.

The search results were shown in the
datatable. I have to use preserveDataModel=true cause the search results have
got an link to an edit page.

Everytime
the search action will be called the delegate returns a collection from the db.

When I first click the search button
everything works fine: The results where displayed in the datatable.

BUT if I click the search button again
this message were shown:

 

Modell-Aktualisierungsfehler: Fehler
w303244hrend der Aktualisierung der Wertes 'null' für Modell 'null'. 

 

If I delete the preserveDataModel tag everything is fine except
the links in the datatable!

 

Does
anyone has a solution

 

Regards,

Stefan
Gesigora

 

 








Re: Best Practices Using DataScroller

2005-09-29 Thread Werner Punz
I have used it in combination with a custom data model,
worked very well...

Werner


Rafael Nami wrote:
> Good morning.
> 
> I have to use DataScroller in my project. I was wondering what are the
> "best practices" using this component, like, did it have to add some
> atributes to my Backing bean to use it?
> 
> Thanks in advance, and best all
> 
> Rafael Mauricio Nami
> 



Re: Examples src

2005-09-29 Thread Sean Schofield
There's no need to reverse engineer something that is open source. 
The source code is available for all to see in the repository.  I'm
not sure if there was a problem with the 1.1.0 release but the latest
nightly (and upcoming 1.1.1) release have the example src code in the
source bundle.

sean

On 9/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> If you mean the java Files, then you could download JAD 
> (http://kpdus.tripod.com/jad.html) to decompile(make java Files out of class 
> Files) class Files which are in the WEB-INF/Classes Folder
>
> Regards
>
> -Ursprüngliche Nachricht-
> Von: Sean Schofield [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 29. September 2005 16:10
> An: MyFaces Discussion; Rafael Nami
> Betreff: Re: Examples src
>
>
> Also the example pags themselves have a cool "view source" option so
> you can quickly see the JSP behind the example.
>
> sean
>
> On 9/29/05, Sean Schofield <[EMAIL PROTECTED]> wrote:
> > Subversion repository or nightly builds.  See
> > http://myfaces.apache.org for more details.
> >
> > sean
> >
> > On 9/29/05, Rafael Nami <[EMAIL PROTECTED]> wrote:
> > > Sorry for the dumb question, but where can I find the srcs from de
> > > myfaces examples?
> > >
> > > Thanks in advance
> > >
> > > Rafael Mauricio Nami
> > > --
> > > Java - Assim no Server como no Palm
> > > Java - thus in the Server as it is in Palm
> > >
> >
>
>
> ~~
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> your system manager.
>
> This footnote also confirms that this email message has been swept
> for the presence of computer viruses.
>
> ~~
>


Best Practices Using DataScroller

2005-09-29 Thread Rafael Nami
Good morning.

I have to use DataScroller in my project. I was wondering what are the
"best practices" using this component, like, did it have to add some
atributes to my Backing bean to use it?

Thanks in advance, and best all

Rafael Mauricio Nami


AW: Examples src

2005-09-29 Thread andreas.mitter
If you mean the java Files, then you could download JAD 
(http://kpdus.tripod.com/jad.html) to decompile(make java Files out of class 
Files) class Files which are in the WEB-INF/Classes Folder

Regards

-Ursprüngliche Nachricht-
Von: Sean Schofield [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 29. September 2005 16:10
An: MyFaces Discussion; Rafael Nami
Betreff: Re: Examples src


Also the example pags themselves have a cool "view source" option so
you can quickly see the JSP behind the example.

sean

On 9/29/05, Sean Schofield <[EMAIL PROTECTED]> wrote:
> Subversion repository or nightly builds.  See
> http://myfaces.apache.org for more details.
>
> sean
>
> On 9/29/05, Rafael Nami <[EMAIL PROTECTED]> wrote:
> > Sorry for the dumb question, but where can I find the srcs from de
> > myfaces examples?
> >
> > Thanks in advance
> >
> > Rafael Mauricio Nami
> > --
> > Java - Assim no Server como no Palm
> > Java - thus in the Server as it is in Palm
> >
>


~~
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.

~~


Re: Examples src

2005-09-29 Thread Sean Schofield
Also the example pags themselves have a cool "view source" option so
you can quickly see the JSP behind the example.

sean

On 9/29/05, Sean Schofield <[EMAIL PROTECTED]> wrote:
> Subversion repository or nightly builds.  See
> http://myfaces.apache.org for more details.
>
> sean
>
> On 9/29/05, Rafael Nami <[EMAIL PROTECTED]> wrote:
> > Sorry for the dumb question, but where can I find the srcs from de
> > myfaces examples?
> >
> > Thanks in advance
> >
> > Rafael Mauricio Nami
> > --
> > Java - Assim no Server como no Palm
> > Java - thus in the Server as it is in Palm
> >
>


Re: Examples src

2005-09-29 Thread Sean Schofield
Subversion repository or nightly builds.  See
http://myfaces.apache.org for more details.

sean

On 9/29/05, Rafael Nami <[EMAIL PROTECTED]> wrote:
> Sorry for the dumb question, but where can I find the srcs from de
> myfaces examples?
>
> Thanks in advance
>
> Rafael Mauricio Nami
> --
> Java - Assim no Server como no Palm
> Java - thus in the Server as it is in Palm
>


Re: Tree2 does not select node

2005-09-29 Thread Sean Schofield
At a glance there doesn't seem to be anything wrong with your
approach.  Perhaps your styles are not available.  Try replacing
"#{t.nodeSelected ? 'nodeSelected':'node'}" with "nodeSelected" just
to verify that your nodes look the way you would expect.

sean

On 9/28/05, Carsten Burghardt <[EMAIL PROTECTED]> wrote:
> Am Wednesday 28 September 2005 19:58 schrieb Frank Langelage:
> > Carsten Burghardt wrote:
> > >I have a tree2 with client side toggling (also tried server side but that
> > >didn't solve the problem). The problem is that the nodes do not get
> > > selected. The action is triggered fine but the nodes (facet "plugin") do
> > > not change their css style.
>
> > try embedding tree2 into an f:view. A h:form is usally not needed here.
>
> The tree is part of a panelLayout, so it is included like this in the main
> page:
>
> 
> 
> <[EMAIL PROTECTED] file="inc/navigation.jsp" %>
> 
> 
>
>
>
> Carsten
>


Examples src

2005-09-29 Thread Rafael Nami
Sorry for the dumb question, but where can I find the srcs from de
myfaces examples?

Thanks in advance

Rafael Mauricio Nami
--
Java - Assim no Server como no Palm
Java - thus in the Server as it is in Palm


RE: h:Datatable nested in another h:Datatable in own row -->HOWTO?

2005-09-29 Thread CONNER, BRENDAN \(SBCSI\)
Title: Message



Could 
it be that you want a  of dataTables, rather than a table 
within a table?  I couldn't see the picture, so I'm just guessing based 
upon the conversation.
 
- 
Brendan

  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, September 29, 2005 2:20 AMTo: 
  users@myfaces.apache.org; [EMAIL PROTECTED]; 
  [EMAIL PROTECTED]Subject: AW: h:Datatable nested in 
  another h:Datatable in own row -->HOWTO?
  Hi! 
  Thx for your reply:
   
  To 
  Martin:
  I 
  need the second datatable in a second row..Like you see it on the screenshot. 
  If I can't use a panelgrid, how else can I do that?
   
  To 
  Mike:
  I 
  don't know what you mean... I want a Table with at least 2 rows. In the first 
  row there are 3 columns of the first Datatable. In the second row there are 
  some other rows of the second datatable. The second datatable is dependent to 
  the first datatable...
   
  Thx 
  for help!
  Regards,
  Andy
  
-Ursprüngliche Nachricht-Von: Mike Kienenberger 
[mailto:[EMAIL PROTECTED]Gesendet: Mittwoch, 28. September 2005 
18:40An: MyFaces Discussion; 
[EMAIL PROTECTED]Betreff: Re: h:Datatable nested in another 
h:Datatable in own row -->HOWTO?Also, it's going to 
end up as a table with a row containing another table rather than merging 
all of the rows together into one table.It's unclear from your 
example if that's what you want.
On 9/28/05, Martin 
Marinschek <[EMAIL PROTECTED] 
> wrote: 
Only 
  h:column elements may be children of h:dataTable elements - so you need to 
  wrap your dataTable into one of these columns - and not use a panelGrid in 
  between.regards,Martin 
  
  On 9/28/05, [EMAIL PROTECTED] < 
  [EMAIL PROTECTED]> wrote: 
  
I want to display a h:dataTable inside 
another h:datatable. The second h:dataTable should be in an OWN Row. How 
can I do that. I tried to work with h:panelGrid and h:panelGroup but 
that didn't work.
Here is the code I tried: 
    
    
    
     
    
    
    
    
     
    
    
    
    
    
         
    
    
    
    
    
         
    
    
    
    
    
    
         
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    f:facet>     
    
    
    
    
    
    
         
    
    
    
    
    
    h:column> 
    
    
    
    
    
    
    ... 
    
    
    
    
    
    h:panelGroup>     
    
    
    
    
         
    
    
    
    
    
         
    
    
    
    
    
    
    

RE: how to set id in dataTable.

2005-09-29 Thread CONNER, BRENDAN \(SBCSI\)
Title: Message



I 
believe that, if you use , it will use the name given in the 
column header (for dataTables) or the associated outputLabel (in other 
cases).
 
I put 
in a request to expand  to optionally take the 
component's identifying name from the component's title attribute.  I 
was going to try to do this patch myself, but then I got bogged down in getting 
a clean compile from the code I got from Subversion, so I haven't made much 
progress in that regard.
 
- 
Brendan

  
  -Original Message-From: Dave 
  [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 
  12:36 AMTo: users@myfaces.apache.orgSubject: how to set 
  id in dataTable.
  In the dataTable, I like to set id for inputText so that the JSF 
  validator can give user a nice message when it is required but 
  empty.  The id can not bind to an EL, but in dataTable all values should 
  come from data model to be meaningful. Current message like:
   
     _id39: value required.
   
  The id is generated by JSF. From the Id ,users does not know which field 
  is required.
   
  Thanks for ideas.
   
  Dave
   
   
  
  
  Yahoo! for GoodClick 
  here to donate to the Hurricane Katrina relief effort. 



Javascript(window.open) is executed before Method in Bean ->How can I change?

2005-09-29 Thread andreas.mitter
Title: Javascript(window.open) is executed before Method in Bean ->How can I change?






I have a problem displaying the current data of a database query in a popup.

The Popup is opened with _javascript_ by a window.open COmmand. The data for the popup is retrieved by a ActionListener Method Binding. 

The Problem now seems to me, that the _javascript_ is executed before the method and that's why I always have the previous shown data(from the popup opened before - because the data is in session) in the popup, although the database query was done perfectly. When I press F5 the correct data is shown.

How can I tell Myfaces to use the method first and then open the Popup with the _javascript_ command?

Or do I have to use a completly other code? Perhaps is it possible to define a navigation rule, where I can tell Myfaces to open a small window?

Here is my code:




t:commandButton


Regards

Andy



~~
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.

~~



Re: Exception selectOneListbox

2005-09-29 Thread Mathias Brökelmann
The valuebinding TimeRangeBean.choiceList (your method
getChoiseList()) must not return null. It should be an instance of
SelectItem, SelectItem[], Collection or Map.

2005/9/29, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> Hello!
>
> Since I have included myFaces 1.1.0 I get an exception I don't understand! 
> The component isn't myFaces depending but I can't find the reason for it.
>
> java.lang.IllegalArgumentException: Value binding 
> '#{TimeRangeBean.choiceList}'of UISelectItems with component-path 
> {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: 
> /timerange.jsp][Class: javax.faces.component.html.HtmlForm,Id: 
> timeRangeForm][Class: javax.faces.component.html.HtmlPanelGrid,Id: 
> id_otherWidgets][Class: javax.faces.component.html.HtmlSelectOneListbox,Id: 
> id_choiceList][Class: javax.faces.component.UISelectItems,Id: id_itemsTest]} 
> does not reference an Object of type SelectItem, SelectItem[], Collection or 
> Map but of type : null
> at 
> javax.faces.component._SelectItemsIterator.hasNext(_SelectItemsIterator.java:131)
> at 
> javax.faces.component._SelectItemsUtil.matchValue(_SelectItemsUtil.java:46)
> at 
> javax.faces.component.UISelectOne.validateValue(UISelectOne.java:52)
> at javax.faces.component.UIInput.validate(UIInput.java:269)
> at javax.faces.component.UIInput.processValidators(UIInput.java:144)
> at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:417)
> at javax.faces.component.UIForm.processValidators(UIForm.java:68)
> at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:417)
> at 
> javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:142)
> at 
> org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:208)
> at 
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at 
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> at 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> at java.lang.Thread.run(Unknown Source)
>
>
> Does someone know what  this means?
> My source code:
> 
>  value="#{TimeRangeBean.label}" />
>  test="${TimeRangeBean.isManyIntervalBack}">
>  value="#{TimeRangeBean.intervals}" size="2"/>
> 
>  title="#{TimeRangeBean.label}"
> 
> value="#{TimeRangeBean.currentChoice}" size="1" onchange="submit()">
>  value="#{TimeRangeBean.choiceList}" />
> 
> 
>
>
> Thanks in advance!
>
> regards,
> Conny
>
> --
> Ein Service von http://www.sms.at
>
>


--
Mathias


Problems with creating a custom component

2005-09-29 Thread Eurig Jones
I'm still having problems retrieving a value from a tag parameter.. It'd 
be great if someone could help. This is my tag...



HtmlBoardTag.java...
...
private String whiteOnBottom;

public String getWhiteOnBottom()
{
  return whiteOnBottom;
}

public String setWhiteOnBottom(String s)
{
  whiteOnBottom = s;
}

protected void setProperties(UIComponent component)
{
  super.setProperties(component);
  setBooleanProperty(component, "whiteOnBottom", whiteOnBottom);
}

public void release()
{
  whiteOnBottom = null;
}
...


My UIBoard.java...
...
private Boolean whiteOnBottom;

public boolean isWhiteOnBottom()
{
  if (whiteOnBottom != null)
  {
 return whiteOnBottom.booleanValue();
  }
ValueBinding vB = getValueBinding("whiteOnBottom");
  if (vB != null)
  {
 return ((Boolean)vB.getValue(getFacesContext())).booleanValue();
  }
  else
  {
 return true;
  }
}

public void setWhiteOnBottom(boolean whiteOnBottom)
{
  this.whiteOnBottom = Boolean.valueOf(whiteOnBottom);
}
...


I have a component declaration in my faces-config.xml
...

  Board
  ej.board
  com.ej.program.UIBoard

...

and also I have an XML in the components directory called UIBoard.xml
...

  ej.board
  com.ej.program.UIBoard

  
 whiteOnBottom
 boolean
  

...

I just can't get the "true" value which i specified in my tag to reach 
my UIBoard component!! I've also tried to remove the UIBoard.xml file 
and set the 'whiteOnBottom' as a '' in the component tag in 
faces-config.xml, but I still can't get it to work! what am I doing wrong?!
I based my component on the MyFaces custom components code such as 
tree2, calendar etc etc




Exception selectOneListbox

2005-09-29 Thread shed
Hello!

Since I have included myFaces 1.1.0 I get an exception I don't understand! The 
component isn't myFaces depending but I can't find the reason for it.

java.lang.IllegalArgumentException: Value binding 
'#{TimeRangeBean.choiceList}'of UISelectItems with component-path 
{Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: 
/timerange.jsp][Class: javax.faces.component.html.HtmlForm,Id: 
timeRangeForm][Class: javax.faces.component.html.HtmlPanelGrid,Id: 
id_otherWidgets][Class: javax.faces.component.html.HtmlSelectOneListbox,Id: 
id_choiceList][Class: javax.faces.component.UISelectItems,Id: id_itemsTest]} 
does not reference an Object of type SelectItem, SelectItem[], Collection or 
Map but of type : null
at 
javax.faces.component._SelectItemsIterator.hasNext(_SelectItemsIterator.java:131)
at 
javax.faces.component._SelectItemsUtil.matchValue(_SelectItemsUtil.java:46)
at javax.faces.component.UISelectOne.validateValue(UISelectOne.java:52)
at javax.faces.component.UIInput.validate(UIInput.java:269)
at javax.faces.component.UIInput.processValidators(UIInput.java:144)
at 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:417)
at javax.faces.component.UIForm.processValidators(UIForm.java:68)
at 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:417)
at 
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:142)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:208)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)


Does someone know what  this means? 
My source code:




 






Thanks in advance!

regards,
Conny

--
Ein Service von http://www.sms.at



AW: Master-Detail with SelectOneRadioButtons

2005-09-29 Thread andreas.mitter
I have now tried with the latest Build, but the rowItem[0] is null when I first 
select one radiobutton and then  press the button to show the details.
Here is the code:







  







 

 






As you can see I also tried with a commandbutton for each row -->Here the 
rowItem[0] is NOT null...
What could be the problem?

Thx, regards
Andy




-Ursprüngliche Nachricht-
Von: Mathias Brökelmann [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 28. September 2005 12:10
An: users@myfaces.apache.org
Betreff: Re: Master-Detail with SelectOneRadioButtons


It should contain the value of rowItem[0] or null if nothing is selected.

Have your tried it with the latest nightly?

2005/9/28, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> First of all this works, but the Problem is, that when I am doing like this:
> 
>forceId="true" forceIdIndex="false"
> value="#{searchResultDto.paId}">
>  itemLabel="" />
>  
>
> 
>
> and when I press a Button with a MethodBinding behind, the 
> searchResultDto.paId has the result 0 (not null)
> When I am doing the whole thing with a Button in each row and have a 
> updateActionListener then the searchResultDto.paId is like it should be...
>
> What is wrong here?
>
> Regards, Andy
>
> -Ursprüngliche Nachricht-
> Von: Mathias Brökelmann [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 28. September 2005 10:41
> An: MyFaces Discussion
> Betreff: Re: Master-Detail with SelectOneRadioButtons
>
>
> try this one:
>
> 
>   
>value="#{data.selectedRowId}">
>   
> 
>   
> 
>
> you have to use forceId="true" forceIdIndex="false" and provide an id
> for the selectOneRadio
>
> Please note: There could be bug with this in the current release
> 1.1.0. Try using the latest nightly if you have problems with it.
>
> 2005/9/28, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> >
> >
> > I'm using a datatable to display a Database Query.
> > While I'm iterating through the list, there should be an SelectOneReadio
> > Component in each row.
> > The user then should have the possibility to click on the SelectOneRadio
> > Buttons to select one of the datatable entries for a detailed display
> > (therefore he must then click the Button ShowDetails)
> >
> > The problem now is, that I can click every RadioButton in the list, although
> > it should be possible to click only one.
> > In old plain html you had to give the radio Buttons the same "NAME"
> > Attribute. But in JSF there is not such a attribute.
> >
> > How can I do that to implement a Master-Detail Display for my entry.
> > I know, that I can display a "ShowDetailButton" for every entry in the list,
> > but I actually don't want that.
> >
> > That you know, what I mean, here a screenshoot.
> >
> >
> >
> > Thx for help
> > Regards,
> > Andy
>
>
> --
> Mathias
>
>
> ~~
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> your system manager.
>
> This footnote also confirms that this email message has been swept
> for the presence of computer viruses.
>
> ~~
>


--
Mathias


~~
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.

~~


AW: myfaces-1.1.0-examples.zip Simple.war - Why is there no listener-class in the web.xml?

2005-09-29 Thread andreas.mitter



This 
will help you:
http://wiki.apache.org/myfaces/From_1.0.9m9_to_1.1.0
 
 

  -Ursprüngliche Nachricht-Von: Jeffrey Porter 
  [mailto:[EMAIL PROTECTED]Gesendet: Dienstag, 27. 
  September 2005 14:53An: MyFaces DiscussionBetreff: RE: 
  myfaces-1.1.0-examples.zip Simple.war - Why is there no listener-class in the 
  web.xml?
  
   
  I’ve found the reason 
  for this problem.
   
  It seems that my 
  version of JBoss doesn’t like the examples. E.g. blank.war
   
  What I have 
  setup
   
  JBoss 4.02 – Portal 
  release
  ActiveBPEL
      
  Container being used: ALL
   
  Not sure which of 
  these parts or the combination of these causes the problem.
   
  I’ve tested against a 
  new download of…
   
  JBoss 
  4.0.2
  JBoss 4.0.2 – 
  Portal
   
  Both of these work 
  fine with the DEFAULT container.
   
  I’m not going to look 
  into the reason any further at the moment since my project has postponed the 
  use of ActiveBPEL.
   
  Anyone else having 
  the same problem might want to test the blank.war file in the ALL container 
  and/or ActiveBPEL.
   
  Hope this helps 
  someone else out.
   
  JP.
   
   
  -Original 
  Message-From: Jeffrey 
  Porter [mailto:[EMAIL PROTECTED] Sent: 27 September 
  2005 11:06To: users@myfaces.apache.orgSubject: myfaces-1.1.0-examples.zip 
  Simple.war - Why is there no listener-class in the web.xml?
   
   
  Hello all, 
   
  Hoping you can shed some light on 
  the following questions I have.
   
  I’m learning from the file 
  myfaces-1.1.0-examples.zip
   
  Questions:
   
  Why is there no Listener class 
  defined in the web.xml?
  How does the example 
  work?
   
  I’ve placed simple.war into a ear 
  file which works fine, except when I rename simple.war to anything else e.g. billy.war
  When I do this I get the following 
  error message…
   
  java.lang.IllegalStateException: No 
  Factories configured for this Application - typically this is because a 
  context listener is not setup in your web.xml.A typical config looks like 
  this;org.apache.myfaces.webapp.StartupServletContextListener
   
  (I update the application xml with the 
  same context & file name)
   
  Thanks
  Jeff
   
~~
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.

~~



RE: myfaces-1.1.0-examples.zip Simple.war - Why is there no listener-class in the web.xml?

2005-09-29 Thread Jeffrey Porter








 

I’ve found the reason for this
problem.

 

It seems that my version of JBoss doesn’t
like the examples. E.g. blank.war

 

What I have setup

 

JBoss 4.02 – Portal release

ActiveBPEL

    Container
being used: ALL

 

Not sure which of these parts or the combination
of these causes the problem.

 

I’ve tested against a new download
of…

 

JBoss 4.0.2

JBoss 4.0.2 – Portal

 

Both of these work fine with the DEFAULT
container.

 

I’m not going to look into the
reason any further at the moment since my project has postponed the use of ActiveBPEL.

 

Anyone else having the same problem might
want to test the blank.war file in the ALL container and/or ActiveBPEL.

 

Hope this helps someone else out.

 

JP.

 

 

-Original Message-
From: Jeffrey Porter
[mailto:[EMAIL PROTECTED] 
Sent: 27 September
 2005 11:06
To: users@myfaces.apache.org
Subject:
myfaces-1.1.0-examples.zip Simple.war - Why is there no listener-class in the
web.xml?

 

 

Hello all, 

 

Hoping you can shed some light on
the following questions I have.

 

I’m learning from the file myfaces-1.1.0-examples.zip

 

Questions:

 

Why is there no Listener class
defined in the web.xml?

How does the example work?

 

I’ve placed simple.war into a
ear file which works fine, except when I rename simple.war to anything else e.g. billy.war

When I do this I get the following
error message…

 

java.lang.IllegalStateException:
No Factories configured for this Application - typically this is because a
context listener is not setup in your web.xml.
A typical config looks like this;

org.apache.myfaces.webapp.StartupServletContextListener


 

(I update the application
xml with the same context & file name)

 

Thanks

Jeff

 








Re: Restricting the user from using the back-button

2005-09-29 Thread Paul Klaer
On Thu, 29 Sep 2005 00:47:05 +0200, Simon Kitching  
<[EMAIL PROTECTED]> wrote:



Paul Klaer wrote:

You don't need to capture the back button.
 Just add this js snippet to your javascript on each page:   
"history.forward();"


Interesting - so if the user has used the app normally (ie not used the  
back button) then history.forward does nothing. But if they have used  
back, then as soon as the previous page loads it jumps *forward* to the  
page they were on when they hit the back button, effectively making  
"back" act like a "refresh" button?


No, a "refresh" submits the form values, if any available, again (The user  
has to confirm normally by a popup window). A forward just moves the  
browser forward without submitting the values again.
So, if you really don't want the user to use the back button it's a  
possibility to use that js.




Re: NotSerializableException

2005-09-29 Thread Navid Vahdat




Hi Luca,

the relevant JSP code is 

                
                    *:
                    
                        
                            
                                
                                    
                                     
                                        
                                            
                                        
                                    
                                
                            
                        
                        
                    
                

please find the whole JSP attached.

editListBean is a session scope bean that holds a dataobject -- a
detail of a master/detail relationship. This data object has a type,
which can be the below metamodel.ListType it has a name, a description
and a couple of other fields. The type is set in the selectDataType
Dialog, which is opened with the small looking glass to the right of
the output text.

Thanks!

Navid

Luca Conte wrote:

  Can U post the jsp code?
Navid Vahdat ha scritto:

  
  
Can somebody give me a hand on this? The Exception seems to be
connected to using a h:inputhidden with a custom converter. When the
value is null, everithing is fine. When the value is set to an object
(in this case metamodel.ListType), rendering the page is fine, but
triggering a UICommand that is not immediate causes the Exception.

I'm stuck. Is this a known bug?

Navid

Navid Vahdat wrote:



  Guys, I get this not serializable exception. The exception is
correct, because metamodel.ListType, a value in a hidden field with a
working converter, definitely is not serializable. Why is myFaces
(ver. 1.1.0) trying to serialize it?

Thanks,
Navid

28.09.2005 10:26:51 org.apache.myfaces.util.StateUtils encode64
SCHWERWIEGEND: Cannot encode Object with Base64
_java.io.NotSerializableException_: metamodel.ListType
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1054_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at java.util.ArrayList.writeObject(_ArrayList.java:529_)
at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

at java.lang.reflect.Method.invoke(_Method.java:324_)
at
java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)

at
java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)

at
java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)

at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1052_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at java.util.ArrayList.writeObject(_ArrayList.java:529_)
at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

at java.lang.reflect.Method.invoke(_Method.java:324_)
at
java.io.ObjectStreamClass.invokeWriteObject(_ObjectStreamClass.java:809_)

at
java.io.ObjectOutputStream.writeSerialData(_ObjectOutputStream.java:1296_)

at
java.io.ObjectOutputStream.writeOrdinaryObject(_ObjectOutputStream.java:1247_)

at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1052_)
at
java.io.ObjectOutputStream.writeArray(_ObjectOutputStream.java:1224_)
at
java.io.ObjectOutputStream.writeObject0(_ObjectOutputStream.java:1050_)
at
java.io.ObjectOutputStream.writeObject(_ObjectOutputStream.java:278_)
at
org.apache.myfaces.util.StateUtils.encode64(_StateUtils.java:33_)
at
org.apache.myfaces.renderkit.html.HtmlResponseStateManager.writeState(_HtmlResponseStateManager.java:104_)

at
org.apache.myfaces.application.jsp.JspStateManagerImpl.writeState(_JspStateManagerImpl.java:268_)

at
org.apache.myfaces.taglib.core.ViewTag.doAfterBody(_ViewTag.java:160_)
at
org.apache.jsp.EditList_jsp._jspx_meth_f_view_0(_EditList_jsp.java:201_)
at
org.apache.jsp.EditList_jsp._jspService(_EditList_jsp.java:128_)
at
org.apache.jasper.runtime.HttpJspBase.service(_HttpJspBase.java:94_)
at
javax.servlet

Re: h:Datatable nested in another h:Datatable in own row -->HOWTO?

2005-09-29 Thread Mike Kienenberger
It's more possible, but still not as easy as you want it to be.

Your example shows two different sets of columns.

dataTable requires a static set of columns.



You might be able to do this by switching to the myfaces tomahawk t:dataTable and using a t:columns (with an "s") object.



http://myfaces.apache.org/tomahawk/columns.html

http://wiki.apache.org/myfaces/Dynamic_Columns



t:columns allows you to dynamically specify the number of columns.


Perhaps you could set it up so that it shows one set of h:column
components for one kind of data row, and another set of h:column
components for a different kind of data row by specifying the
"rendered" attribute based on your data row data type.  
However, I've never tried this.

Maybe you could do the same thing with a rendered attribute on a regular column, but I haven't tried that either.
On 9/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:






Yes I 
need this one:
 
    
1st row from first data 
set    
    
    
1st row from 2nd data 
set    
2nd row from 2nd data 
set    
3rd row from 2nd data 
set    
    

 
Is this possible?


  -Ursprüngliche Nachricht-Von: Mike Kienenberger 
  [mailto:[EMAIL PROTECTED]]Gesendet: Donnerstag, 29. September 2005 
  09:29An: users@myfaces.apache.orgCc: Mitter Andreas, 
  IDEBetreff: Re: h:Datatable nested in another h:Datatable in own 
  row -->HOWTO?It's not clear from your picture what 
  you're trying to do.It's sounding like you want this kind of 
  output:    1st row 
  from first data set    
  2nd row from first data 
  set    1st row 
  from 2nd data set    
  2nd row from 2nd data 
  set    3rd row 
  from 2nd data setThat's not 
  possible with a dataTable component.Maybe I'm misunderstanding, and 
  you're really asking for this, 
  however,    1st 
  row from first data set    
  2nd row from first data 
  set    
      
      
  1st row from 2nd data 
  set    
  2nd row from 2nd data 
  set    
  3rd row from 2nd data 
  set    
      
  
  On 9/29/05, [EMAIL PROTECTED]
 
  <[EMAIL PROTECTED] 
  > wrote:
  
Hi! Thx for your 
reply:
 
To 
Martin:
I need the second datatable 
in a second row..Like you see it on the screenshot. If I can't use a 
panelgrid, how else can I do that?
 
To 
Mike:
I don't know what you 
mean... I want a Table with at least 2 rows. In the first row there are 3 
columns of the first Datatable. In the second row there are some other rows 
of the second datatable. The second datatable is dependent to the first 
datatable...
 
Thx for 
help!
Regards,
Andy

  -Ursprüngliche 
  Nachricht-Von: Mike Kienenberger [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 28. 
  September 2005 18:40An: MyFaces Discussion; [EMAIL PROTECTED]Betreff: Re: h:Datatable 
  nested in another h:Datatable in own row -->HOWTO?
  Also, it's going to end up as a 
  table with a row containing another table rather than merging all of the 
  rows together into one table.It's unclear from your example if 
  that's what you want.
  On 9/28/05, Martin 
  Marinschek <[EMAIL PROTECTED] > wrote: 
  Only 
h:column elements may be children of h:dataTable elements - so you need 
to wrap your dataTable into one of these columns - and not use a 
panelGrid in between.regards,Martin 

On 9/28/05, [EMAIL PROTECTED] 
< 
[EMAIL PROTECTED]> wrote: 

  I want to display a h:dataTable inside 
  another h:datatable. The second h:dataTable should be in an OWN Row. 
  How can I do that. I tried to work with h:panelGrid and h:panelGroup 
  but that didn't work.
  Here is the code I tried: 
      
      
      
       
      
      
      
      
       
      
      
      
      
      
           
      
      
      
      
      
           
      
      
      
      
  

Re: Using Javascript to submit a form doesn't work [Problem Solved]

2005-09-29 Thread Paul Klaer
Here is a better example to show the difference between input fields of  
type "submit" and js script... Normally you would expect on both buttons  
the same effect...




function doSubmit() {
if(document.forms['theForm'].onsubmit()) {
submit();
}
}

 
 
 onclick="doSubmit()" />

 
 
 
 

On Wed, 28 Sep 2005 23:46:51 +0200, Paul Klaer <[EMAIL PROTECTED]> wrote:


Oh, sorry. You're right.

Didn't saw that this script is invoked by a js command submit(). But if  
you click on the browser "submit" button you need to be careful, because  
the browser executes onsubmit:






			value="button test js submit">





On Wed, 28 Sep 2005 23:21:09 +0200, Matt Blum <[EMAIL PROTECTED]> wrote:


No, it's not. When you invoke the submit method on a form, its onsubmit
handler is not executed at all. That's the reason this code is  
necessary in

the first place.

-Matt

On 9/28/05, Paul Klaer <[EMAIL PROTECTED]> wrote:


Be careful with that script!

Your onsubmit method is executed twice if it will return a value true!

You have to use this code:

if(document.forms['body:theForm'].onsubmit) {
document.forms['body:theForm'].submit();
} else {
document.forms['body:theForm'].submit();
}

otherwise:

if(document.forms['body:theForm'].onsubmit) {
if(document.forms['body:theForm'].onsubmit()) <<<- onsubmit is
executed here and if it returns true submit
document.forms['body:theForm'].submit(); <<<-- and onsubmit is
executed here
} else {
document.forms['body:theForm'].submit();
}

On Wed, 28 Sep 2005 03:24:06 +0200, Saul Qunming Yuan  
<[EMAIL PROTECTED]>

wrote:

> if(document.forms['body:theForm'].onsubmit) {
> if(document.forms['body:theForm'].onsubmit())
> document.forms['body:theForm'].submit();
> } else {
> document.forms['body:theForm'].submit();
> }











Re: h:Datatable nested in another h:Datatable in own row -->HOWTO?

2005-09-29 Thread Mike Kienenberger
It's not clear from your picture what you're trying to do.
It's sounding like you want this kind of output:


    1st row from first data set
    2nd row from first data set
    1st row from 2nd data set
    2nd row from 2nd data set
    3rd row from 2nd data set


That's not possible with a dataTable component.

Maybe I'm misunderstanding, and you're really asking for this, however,



    1st row from first data set

    2nd row from first data set

    
    
   
1st row from 2nd data set
   
2nd row from 2nd data set
   
3rd row from 2nd data set
    


    


On 9/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:






Hi! 
Thx for your reply:
 
To 
Martin:
I need 
the second datatable in a second row..Like you see it on the screenshot. If I 
can't use a panelgrid, how else can I do that?
 
To 
Mike:
I 
don't know what you mean... I want a Table with at least 2 rows. In the first 
row there are 3 columns of the first Datatable. In the second row there are some 
other rows of the second datatable. The second datatable is dependent to the 
first datatable...
 
Thx 
for help!
Regards,
Andy

  -Ursprüngliche Nachricht-Von: Mike Kienenberger 
  [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 28. September 2005 
  18:40An: MyFaces Discussion; 
  [EMAIL PROTECTED]Betreff: Re: h:Datatable nested in another 
  h:Datatable in own row -->HOWTO?Also, it's going to 
  end up as a table with a row containing another table rather than merging all 
  of the rows together into one table.It's unclear from your example if 
  that's what you want.
  On 9/28/05, Martin 
  Marinschek <[EMAIL PROTECTED] > 
  wrote:
  Only 
h:column elements may be children of h:dataTable elements - so you need to 
wrap your dataTable into one of these columns - and not use a panelGrid in 
between.regards,Martin

On 9/28/05, [EMAIL PROTECTED]
 < 
[EMAIL PROTECTED]> wrote:

  I want to display a h:dataTable inside another 
  h:datatable. The second h:dataTable should be in an OWN Row. How can I do 
  that. I tried to work with h:panelGrid and h:panelGroup but that didn't 
  work.
  Here is the code I tried: 
      
      
      
       
      
      
      
      
       
      
      
      
      
      
       
      
      
      
      
      
      
           
      
      
      
      
      
      
       
      
      
      
      
      
      
      
      
       
      
      
      
      
      
      
      
      f:facet>     
      
      
      
      
      
      
           
      
      
      
      
      
      h:column> 
      
      
      
      
      
      
      ... 
      
      
      
      
      
      h:panelGroup>     
      
      
      
      
       
      
      
      
      
      
      
           
      
      
      
      
      
      
      AW: h:Datatable nested in another h:Datatable in own row -->HOWTO?




Hi! 
Thx for your reply:
 
To 
Martin:
I need 
the second datatable in a second row..Like you see it on the screenshot. If I 
can't use a panelgrid, how else can I do that?
 
To 
Mike:
I 
don't know what you mean... I want a Table with at least 2 rows. In the first 
row there are 3 columns of the first Datatable. In the second row there are some 
other rows of the second datatable. The second datatable is dependent to the 
first datatable...
 
Thx 
for help!
Regards,
Andy

  -Ursprüngliche Nachricht-Von: Mike Kienenberger 
  [mailto:[EMAIL PROTECTED]Gesendet: Mittwoch, 28. September 2005 
  18:40An: MyFaces Discussion; 
  [EMAIL PROTECTED]Betreff: Re: h:Datatable nested in another 
  h:Datatable in own row -->HOWTO?Also, it's going to 
  end up as a table with a row containing another table rather than merging all 
  of the rows together into one table.It's unclear from your example if 
  that's what you want.
  On 9/28/05, Martin 
  Marinschek <[EMAIL PROTECTED] > 
  wrote:
  Only 
h:column elements may be children of h:dataTable elements - so you need to 
wrap your dataTable into one of these columns - and not use a panelGrid in 
between.regards,Martin

On 9/28/05, [EMAIL PROTECTED] < 
[EMAIL PROTECTED]> wrote:

  I want to display a h:dataTable inside another 
  h:datatable. The second h:dataTable should be in an OWN Row. How can I do 
  that. I tried to work with h:panelGrid and h:panelGroup but that didn't 
  work.
  Here is the code I tried: 
      
      
      
       
      
      
      
      
       
      
      
      
      
      
       
      
      
      
      
      
      
           
      
      
      
      
      
      
       
      
      
      
      
      
      
      
      
       
      
      
      
      
      
      
      
      f:facet>     
      
      
      
      
      
      
           
      
      
      
      
      
      h:column> 
      
      
      
      
      
      
      ... 
      
      
      
      
      
      h:panelGroup>