Render an element whithout reload

2005-08-24 Thread Nicolas GENSOLLEN

Hi everybody,

I'd like to know if it's possible to render or not a component (panel for 
exemple) whitout reloading the page. Like a span and javascript in html for 
example...


Thank's a lot. 



Re: How to call a method in the backing bean from a JSF page

2005-08-24 Thread ssobot
but remember that getter may be called few times!

i assume that in order to see your page user must click sth (ex.
somme kind of menu) and i assume that u have action binded to that
click that returs string maped to desired page. so just add call
your method in that action.

Słąwek Sobótka


> Thanks for your reply, that makes sense. But won't h:commandLink
render a 
> link and h:commandButton render a button in the page? I don't want to 
> display anything on the screen. My purpose is to initiate a call
from the 
> JSF page to a method in the backing bean when the JSF page loads. I'm 
> returning an empty string from the method so nothing gets printed
out from 
> .
> 
> 
> - Original Message - 
> From: "Ken" <[EMAIL PROTECTED]>
> To: "MyFaces Discussion" 
> Sent: Wednesday, August 24, 2005 9:53 PM
> Subject: Re: How to call a method in the backing bean from a JSF page
> 
> 
> > Try h:commandLink or h:commandButton.
> > If your method returns a string that doesn't match any
navigation-rule
> > in your faces-confix.xml then the same page you came from will be
> > rendered again.
> >
> >
> > On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi,
> >>
> >> I'm wondering what's the correct way to call a method in the
backing bean
> >> from a JSF page. What I tried is to use  >> value="#{theBackingBean.theMethod}" />, the backing bean method
returns 
> >> an
> >> empty string, so nothing gets printed out in the page. Which
works, but I 
> >> am
> >> not sure this is the correct way to do it.
> >>
> >> thanks,
> >> Saul 
> 
> 



Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread ssobot
thats right

> I believe Slawek was referring to "Rick Hightower".
> 
> On 8/24/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> > On 8/24/05, Slawek <[EMAIL PROTECTED]> wrote:
> > >  
> > > but Rick says in his article that:
> > > view is only jsp page, controler is backing bean and model has
business
> > > logic
> > 
> >  I take it by article you mean 'e-mail post' ? I don't think I
posted any
> > comments on JSF architecture since I obviously am just learning
it myself. 
> >  
> >  -- 
> >  Rick
> 



Re: How to call a method in the backing bean from a JSF page

2005-08-24 Thread Ken Weiner
I am not sure if this is the best way, but one idea that could work is
to create a PhaseListener that acts after the view is restored.  In
this phase listener, you could check if the view being restored is the
view for which you want to call your backing bean method.  Then, you
could obtain a MessageBinding object for your backing bean expression
and use that to call your method.

Create YourPhaseListener and register it in faces-config.xml:

...

com.yourcompany.YourPhaseListener



public class YourPhaseListener implements PhaseListener {

public void beforePhase(PhaseEvent event) {
// Nothing to do
}

public void afterPhase(PhaseEvent event) {
FacesContext facesContext = event.getFacesContext();
UIViewRoot viewRoot = facesContext.getViewRoot();
String idOfYourPage = ...
if (viewRoot.getId().equals(idOfYourPage)) {
Application application = facesContext.getApplication();
String methodExpression = ...
Class[] params = ...
MethodBinding methodBinding =
application.getMessageBinding(methodExpression, params);
methodBinding.invoke(facesContext, ...);
}

public PhaseId getPhaseId() {
return PhaseId.RESTORE_VIEW;
}

}

Disclaimer: I haven't tried this code so I don't know if it would work
or even compile.

-Ken

On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
> Thanks for your response. I guess I didn't make me clear here. My question
> is how to call a method in the backing bean from a JSF page without
> rendering out anything to the screen.


inputFileUpload on panelTabbedPane

2005-08-24 Thread ketan . khimani

Refering to follwing problem , I am
also facing the
same problem for File Upload in panelTabedPane

http://www.mail-archive.com/users@myfaces.apache.org/msg01548.html

File upload is working in case of one
JSF page, but if
JSF is embeded in 
are using 
enctype="multipart/form-data"
> , because of the 
autoform generated by JSF, there are
two HTML forms (
tags). 
the form parameters are null on server
side.

How should I handle this??

Ketan Lilaram Khimani
Tata Consultancy Services Limited
Gateway Park, Road No.13,
MIDC, Andheri (E)
Mumbai - 400 093,Maharashtra
India
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information.   If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited.   If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments.  Thank you


Re: How to call a method in the backing bean from a JSF page

2005-08-24 Thread Saul Qunming Yuan
Thanks for your response. I guess I didn't make me clear here. My question 
is how to call a method in the backing bean from a JSF page without 
rendering out anything to the screen.



- Original Message - 
From: "Sean Schofield" <[EMAIL PROTECTED]>

To: "MyFaces Discussion" 
Sent: Wednesday, August 24, 2005 10:04 PM
Subject: Re: How to call a method in the backing bean from a JSF page



The value attribute should be a *value* binding expression.  It must
bind to a *property*.  So you do something like this ...

value=#{theBackingBean.foo}"

and in your backing bean you have

public String getFoo()
{ ... }

public void setFoo(String fooValue)
{ ... }


sean

On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:


Hi,

I'm wondering what's the correct way to call a method in the backing bean
from a JSF page. What I tried is to use value="#{theBackingBean.theMethod}" />, the backing bean method returns 
an
empty string, so nothing gets printed out in the page. Which works, but I 
am

not sure this is the correct way to do it.

thanks,
Saul 




Re: How to call a method in the backing bean from a JSF page

2005-08-24 Thread Saul Qunming Yuan
I see. The outputText way is actually what I did. So, is there a way to call 
a method in the backing bean when/before loading a JSF page? Something like 
a pre-render method before loading a JSF page? I can do that in the backing 
bean methods that forward to the JSF page, but there are many places that 
could forward to that JSF page. That's why I trying to do it in the JSF page 
itself.


thanks


- Original Message - 
From: "Ken" <[EMAIL PROTECTED]>

To: "MyFaces Discussion" 
Sent: Wednesday, August 24, 2005 10:17 PM
Subject: Re: How to call a method in the backing bean from a JSF page



Yes, commandLink and commandButton will render an anchor tag.  If you
don't want to do this you can do work in your properies getter method
when it gets called by outputText value and return an empty string.
However, I don't believe there is any guarante as to call order.
Putting your target outputText in the first line of your jsp file
doesn't mean it will get called before other getter methods further
down in the jsp file get called.


On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:

Thanks for your reply, that makes sense. But won't h:commandLink render a
link and h:commandButton render a button in the page? I don't want to
display anything on the screen. My purpose is to initiate a call from the
JSF page to a method in the backing bean when the JSF page loads. I'm
returning an empty string from the method so nothing gets printed out 
from

.


- Original Message -
From: "Ken" <[EMAIL PROTECTED]>
To: "MyFaces Discussion" 
Sent: Wednesday, August 24, 2005 9:53 PM
Subject: Re: How to call a method in the backing bean from a JSF page


> Try h:commandLink or h:commandButton.
> If your method returns a string that doesn't match any navigation-rule
> in your faces-confix.xml then the same page you came from will be
> rendered again.
>
>
> On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I'm wondering what's the correct way to call a method in the backing 
>> bean

>> from a JSF page. What I tried is to use >> value="#{theBackingBean.theMethod}" />, the backing bean method 
>> returns

>> an
>> empty string, so nothing gets printed out in the page. Which works, 
>> but I

>> am
>> not sure this is the correct way to do it.
>>
>> thanks,
>> Saul






Re: How to call a method in the backing bean from a JSF page

2005-08-24 Thread Ken
Yes, commandLink and commandButton will render an anchor tag.  If you
don't want to do this you can do work in your properies getter method
when it gets called by outputText value and return an empty string. 
However, I don't believe there is any guarante as to call order. 
Putting your target outputText in the first line of your jsp file
doesn't mean it will get called before other getter methods further
down in the jsp file get called.


On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
> Thanks for your reply, that makes sense. But won't h:commandLink render a
> link and h:commandButton render a button in the page? I don't want to
> display anything on the screen. My purpose is to initiate a call from the
> JSF page to a method in the backing bean when the JSF page loads. I'm
> returning an empty string from the method so nothing gets printed out from
> .
> 
> 
> - Original Message -
> From: "Ken" <[EMAIL PROTECTED]>
> To: "MyFaces Discussion" 
> Sent: Wednesday, August 24, 2005 9:53 PM
> Subject: Re: How to call a method in the backing bean from a JSF page
> 
> 
> > Try h:commandLink or h:commandButton.
> > If your method returns a string that doesn't match any navigation-rule
> > in your faces-confix.xml then the same page you came from will be
> > rendered again.
> >
> >
> > On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi,
> >>
> >> I'm wondering what's the correct way to call a method in the backing bean
> >> from a JSF page. What I tried is to use  >> value="#{theBackingBean.theMethod}" />, the backing bean method returns
> >> an
> >> empty string, so nothing gets printed out in the page. Which works, but I
> >> am
> >> not sure this is the correct way to do it.
> >>
> >> thanks,
> >> Saul
> 
>


Re: How to call a method in the backing bean from a JSF page

2005-08-24 Thread Saul Qunming Yuan
Thanks for your reply, that makes sense. But won't h:commandLink render a 
link and h:commandButton render a button in the page? I don't want to 
display anything on the screen. My purpose is to initiate a call from the 
JSF page to a method in the backing bean when the JSF page loads. I'm 
returning an empty string from the method so nothing gets printed out from 
.



- Original Message - 
From: "Ken" <[EMAIL PROTECTED]>

To: "MyFaces Discussion" 
Sent: Wednesday, August 24, 2005 9:53 PM
Subject: Re: How to call a method in the backing bean from a JSF page



Try h:commandLink or h:commandButton.
If your method returns a string that doesn't match any navigation-rule
in your faces-confix.xml then the same page you came from will be
rendered again.


On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:


Hi,

I'm wondering what's the correct way to call a method in the backing bean
from a JSF page. What I tried is to use value="#{theBackingBean.theMethod}" />, the backing bean method returns 
an
empty string, so nothing gets printed out in the page. Which works, but I 
am

not sure this is the correct way to do it.

thanks,
Saul 




Re: How to call a method in the backing bean from a JSF page

2005-08-24 Thread Sean Schofield
The value attribute should be a *value* binding expression.  It must
bind to a *property*.  So you do something like this ...

value=#{theBackingBean.foo}"

and in your backing bean you have

public String getFoo()
{ ... }

public void setFoo(String fooValue)
{ ... }


sean

On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
>  
> Hi, 
>   
> I'm wondering what's the correct way to call a method in the backing bean
> from a JSF page. What I tried is to use  value="#{theBackingBean.theMethod}" />, the backing bean method returns an
> empty string, so nothing gets printed out in the page. Which works, but I am
> not sure this is the correct way to do it. 
>   
> thanks, 
> Saul


Re: How to call a method in the backing bean from a JSF page

2005-08-24 Thread Ken
Try h:commandLink or h:commandButton.
If your method returns a string that doesn't match any navigation-rule
in your faces-confix.xml then the same page you came from will be
rendered again.


On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
>  
> Hi, 
>   
> I'm wondering what's the correct way to call a method in the backing bean
> from a JSF page. What I tried is to use  value="#{theBackingBean.theMethod}" />, the backing bean method returns an
> empty string, so nothing gets printed out in the page. Which works, but I am
> not sure this is the correct way to do it. 
>   
> thanks, 
> Saul


Re: Does a doc exist describing the MyFaces features?

2005-08-24 Thread Sean Schofield
We're getting there.  The simple examples are also a very good "show
by example" approach to learning about the components.  We're trying
to establish some documentation standards for new components but we
have some catching up to do with the old stuff.

sean


On 8/24/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> another one:
> 
> http://myfaces.apache.org/tomahawk/overview.html
> 
> http://myfaces.apache.org/sandbox/overview.html
> 
> but there is no comprehensive doc or pdf.
> 
> regards,
> 
> Martin
> 
> On 8/24/05, Dave Brondsema <[EMAIL PROTECTED]> wrote:
> > Also see the TLD links on http://myfaces.apache.org/javadoc.html
> >
> > Balaji Saranathan wrote:
> > > This URL lists various components and features of MyFaces.
> > > http://wiki.apache.org/myfaces/
> > >
> > > -Original Message-
> > > *From:* Rick Reumann [mailto:[EMAIL PROTECTED]
> > > *Sent:* Wednesday, August 24, 2005 2:37 PM
> > > *To:* MyFaces Discussion
> > > *Subject:* Does a doc exist describing the MyFaces features?
> > >
> > > Someone mentioned using x:dataList in place of JSTL for each. I'm
> > > curious, is there a document that shows a list of all the different
> > > features MyFaces supplies? I know the MyFaces example app shows a
> > > lot (maybe all?), but it would be nice to see all these features and
> > > a quick example of usage in a single pdf or doc. (Trust me not
> > > complaining if one doesn't exist, was just curious if there was one
> > > floating around somewhere). Thanks.
> > >
> > > --
> > > Rick
> > >
> > >
> > >
> > > Confidentiality Notice
> > >
> > > The information contained in this electronic message and any attachments
> > > to this message are intended
> > > for the exclusive use of the addressee(s) and may contain confidential
> > > or privileged information. If
> > > you are not the intended recipient, please notify the sender at Wipro or
> > > [EMAIL PROTECTED] immediately
> > > and destroy all copies of this message and any attachments.
> > >
> >
> >
> > --
> > Dave Brondsema
> > Software Developer
> > Cornerstone University
> >
> >
> >
> 
> 
> --
> 
> http://www.irian.at
> Your JSF powerhouse -
> JSF Trainings in English and German
>


How to call a method in the backing bean from a JSF page

2005-08-24 Thread Saul Qunming Yuan



Hi,
 
I'm wondering what's the correct way to call a 
method in the backing bean from a JSF page. What I tried is to 
use , the backing 
bean method returns an empty string, so nothing gets printed out in the page. 
Which works, but I am not sure this is the correct way to do it. 
 
thanks,
Saul


h:commandLink with f:param not working with expired session.

2005-08-24 Thread Ken
I'm attempting to convert working Sun JSF RI application to MyFaces
containing many h:commandLinks with nested f:param tags.

For some reason most but not all of my commandLinks no longer execute
the action method when my session has expired.  I'm not sure why some
work and others don't anymore with MyFaces.  Can't determine the
difference but behavior is inconsistent even within the same h:form
tag.  Instead, framework goes straight back to the same jsp page for
many of my commandLinks without giving me a chance to do anything in
the action method.

I've tried various configurations of the type attribute (button,
submit).  Tried commandButton.  Also tried various
org.apache.myfaces.DETECT_JAVASCRIPT and
org.apache.myfaces.ALLOW_JAVASCRIPT parameter settings in web.xml.

What am I missing?  Anyone have any ideas why my action methods aren't
getting called after my session has expired?

Thanks,
Ken


Re: Questions on required="true" attribute

2005-08-24 Thread Ken Weiner
Thanks so much for pointing out that messages tag.  I was just about
to write something similar because I didn't know about it.  Is it
listed somewhere on the MyFaces website?  I don't see it here:
http://myfaces.apache.org/tomahawk/overview.html

Regarding your comment on it being specific to MyFaces:  Isn't it only
specific to the MyFaces extensions?  In other words, couldn't I use it
with the RI as long as I included the myfaces-extensions-1.0.9.jar and
referenced the taglib?

-Ken

On 8/24/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> Use the t:message/t:messages tags, and MyFaces will automatically use
> the label (or the column header if you are in a table) for the field
> identification.
> 
> Bear in mind that this is MyFaces specific!
> 
> regards,
> 
> Martin


Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Ken Weiner
I believe Slawek was referring to "Rick Hightower".

On 8/24/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> On 8/24/05, Slawek <[EMAIL PROTECTED]> wrote:
> >  
> > but Rick says in his article that:
> > view is only jsp page, controler is backing bean and model has business
> > logic
> 
>  I take it by article you mean 'e-mail post' ? I don't think I posted any
> comments on JSF architecture since I obviously am just learning it myself. 
>  
>  -- 
>  Rick


Re: Spanish accents in Javascript

2005-08-24 Thread Matt Blum
I understand that.  I'm suggesting that, instead of "La fórmula es correcta" in your properties file, you put "La f\u00f3rmula es correcta."

-MattOn 8/24/05, Enrique Medina <[EMAIL PROTECTED]> wrote:
Hi Matt,

But the problem is that encoding is generated by JSF when using EL like this:

#{messages.literal1}2005/8/24, Matt Blum <[EMAIL PROTECTED]>:

You need to use the Unicode encoding for the character, like so:

"La f\u00f3rmula es correcta"

There's a handy online tool to find the codes for most special characters here:
http://www.saila.com/usage/tips/examples/special_characters.html



-MattOn 8/24/05, Enrique Medina <

[EMAIL PROTECTED]
> wrote:Hi,

I know this is not a question directly related with MyFaces, but does anybody knows how to solve this problem?

I define my literal strings in a properties file, and then I have
created a custom messages tag that renders the message as an alert of
_javascript_. So when a JSF message is generated, it is rendered as an
alert. My problem is with accents. For example, in the alert window the
text appears like:

"La fórmula es correcta"

while it should be:

"La fórmula es correcta"

Is it a matter of escaping the text in _javascript_? Because I have tried the escape() function but with no success...









Re: Does a doc exist describing the MyFaces features?

2005-08-24 Thread Martin Marinschek
another one:

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

http://myfaces.apache.org/sandbox/overview.html

but there is no comprehensive doc or pdf.

regards,

Martin

On 8/24/05, Dave Brondsema <[EMAIL PROTECTED]> wrote:
> Also see the TLD links on http://myfaces.apache.org/javadoc.html
> 
> Balaji Saranathan wrote:
> > This URL lists various components and features of MyFaces.
> > http://wiki.apache.org/myfaces/
> >
> > -Original Message-
> > *From:* Rick Reumann [mailto:[EMAIL PROTECTED]
> > *Sent:* Wednesday, August 24, 2005 2:37 PM
> > *To:* MyFaces Discussion
> > *Subject:* Does a doc exist describing the MyFaces features?
> >
> > Someone mentioned using x:dataList in place of JSTL for each. I'm
> > curious, is there a document that shows a list of all the different
> > features MyFaces supplies? I know the MyFaces example app shows a
> > lot (maybe all?), but it would be nice to see all these features and
> > a quick example of usage in a single pdf or doc. (Trust me not
> > complaining if one doesn't exist, was just curious if there was one
> > floating around somewhere). Thanks.
> >
> > --
> > Rick
> >
> >
> >
> > Confidentiality Notice
> >
> > The information contained in this electronic message and any attachments
> > to this message are intended
> > for the exclusive use of the addressee(s) and may contain confidential
> > or privileged information. If
> > you are not the intended recipient, please notify the sender at Wipro or
> > [EMAIL PROTECTED] immediately
> > and destroy all copies of this message and any attachments.
> >
> 
> 
> --
> Dave Brondsema
> Software Developer
> Cornerstone University
> 
> 
> 


-- 

http://www.irian.at
Your JSF powerhouse - 
JSF Trainings in English and German


Re: Questions on required="true" attribute

2005-08-24 Thread Martin Marinschek
Use the t:message/t:messages tags, and MyFaces will automatically use
the label (or the column header if you are in a table) for the field
identification.

Bear in mind that this is MyFaces specific!

regards,

Martin

On 8/24/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote:
> When going from JSF 1.0 to MyFaces JSF, I noticed that the detailed
> message that gets displayed when one specifies required="true" now
> includes the name of the field.  Is that something that's specific to
> MyFaces, or is it part of JSF 1.1?
> 
> Also, related to that, is that message now overridable?  I seem to
> recall that, unlike the messages for other validators, the message for
> required="true" is not overridable.
> 
> Finally, is it possible for the message to refer to the name of the
> field in some way other than through the id of the field?  Our IDs
> cannot have spaces in them, which requires compound names to get
> concatenated.  This is fine for internally used variables, but users get
> a little freaked when they see a name like ModuleID instead of "Module
> ID".  One thought I had was to use the field's title in the message
> instead of the field's id.
> 
> Thanks,
> 
> - Brendan
> 


-- 

http://www.irian.at
Your JSF powerhouse - 
JSF Trainings in English and German


Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Rick Reumann
On 8/24/05, Slawek <[EMAIL PROTECTED]> wrote:
 but Rick says in his article that:view is only jsp page, controler is backing bean and model has businesslogic
I take it by article you mean 'e-mail post' ? I don't think I posted
any comments on JSF architecture since I obviously am just learning it
myself. 

-- 
Rick


RE: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread CONNER, BRENDAN \(SBCSI\)
That's one reason we separate the data bean from the action bean.  From
within the UI layer, we have the Action Bean as the controller, the Data
Bean as the model, and the JSP as the view.  (Of course, in a three-tier
environment, the Action Bean calls the Session Bean facade to grab the
back-end data to populate the Data Bean, so, from an architectural point
of view, the Session Bean is the Controller, the DAOs or Entity Beans
are the model, and all the JSF stuff combined is the view.  I guess it
depends upon one's perspective.)

- Brendan

-Original Message-
From: Slawek [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 24, 2005 3:51 PM
To: MyFaces Discussion
Subject: Re: confusion on best practices in regard to a VO in
BackingBean


now im little confused...

i have started studying design patterns little before jsf and at first 
glance i thought that considering MVC:
view is jsp page, controler is backing bean and model is pure data bean 
(with no business logic)

now, after somme more studying i concluded that:
view is jsp page AND backing bean


but Rick says in his article that:
view is only jsp page, controler is backing bean and model has business 
logic



could somme guru explain relation between mvc and jsf framwework?

>
> Rick Hightower does this in his "Clearing the FUD about JSF" 
> http://www-128.ibm.com/developerworks/java/library/j-jsf1/
>
> He has the XyzBeand and XyzController with the controller containing:
>
> XyzBean xyzBean = new XyzBean();
>
> and then supporting the methods etc. via xyzBean.method() calls. His 
> Controller is your Action.
>
> See his extremely fine articles for more details.
>
> -david-
>
>




Re: Any idea what I'm doing wrong here?

2005-08-24 Thread Rick Reumann
How embarrassing:) It's been a long day. 

I wonder how much time I've lost of my life based on stupid typos:) Sad
thing is I must have starred at the code a million times.
On 8/24/05, Matt Blum <[EMAIL PROTECTED]> wrote:
Did you copy and paste out of those files?  If so, you have
several typos: "empoloyees.jsp" and "empoloyeesForm.jsp" in the
faces-config.

-MattOn 8/24/05, Rick Reumann <
[EMAIL PROTECTED]> wrote:
I'm sort of stumped since the error logs aren't revealing much to me.

I'm just working on page flow test and I'm on 'emloyees.jsp' and I'm
clicking on a button that should access another managed bean and then
forward me to 'employeeForm.jsp'. Error first then some relevant souce
code to follow:

2005-08-24 16:29:05 StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Unrecognized Content Type.
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:327)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
  
Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: Unrecognized Content Type.
    at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:821)
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
    at org.apache.jsp.employees_jsp._jspService(employees_jsp.java:83)


faces config
-

    
  /empoloyees.jsp
  
 getEmployeeSuccess
 /empoloyeeForm.jsp
  
   

    
  employees
  net.reumann.EmployeesBacking
  request
   
    
  employee
  net.reumann.EmployeeBacking
  request
   



index.jsp
-



employees.jsp
---
//dataTable  listing employees



EmployeeBacking

//the retrieveEmployeeAction below  is getting hit since the log message is showing up
 public String retrieveEmployeeAction() {
    log.debug("in retrieveEmployeeAction()");
    //get Employee from backend
    this.name = "Rover";
    this.age = new Integer(25);
    return "getEmployeeSuccess";
    }

employeeForm.jsp
-
never getting here. 



-- Rick


Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Slawek

now im little confused...

i have started studying design patterns little before jsf and at first 
glance i thought that considering MVC:
view is jsp page, controler is backing bean and model is pure data bean 
(with no business logic)


now, after somme more studying i concluded that:
view is jsp page AND backing bean


but Rick says in his article that:
view is only jsp page, controler is backing bean and model has business 
logic




could somme guru explain relation between mvc and jsf framwework?



Rick Hightower does this in his "Clearing the FUD about JSF" 
http://www-128.ibm.com/developerworks/java/library/j-jsf1/


He has the XyzBeand and XyzController with the controller containing:

XyzBean xyzBean = new XyzBean();

and then supporting the methods etc. via xyzBean.method() calls. His 
Controller is your Action.


See his extremely fine articles for more details.

-david-







Re: Any idea what I'm doing wrong here?

2005-08-24 Thread Matt Blum
Did you copy and paste out of those files?  If so, you have
several typos: "empoloyees.jsp" and "empoloyeesForm.jsp" in the
faces-config.

-MattOn 8/24/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
I'm sort of stumped since the error logs aren't revealing much to me.

I'm just working on page flow test and I'm on 'emloyees.jsp' and I'm
clicking on a button that should access another managed bean and then
forward me to 'employeeForm.jsp'. Error first then some relevant souce
code to follow:

2005-08-24 16:29:05 StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Unrecognized Content Type.
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:327)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
  
Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: Unrecognized Content Type.
    at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:821)
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
    at org.apache.jsp.employees_jsp._jspService(employees_jsp.java:83)


faces config
-

    
  /empoloyees.jsp
  
 getEmployeeSuccess
 /empoloyeeForm.jsp
  
   

    
  employees
  net.reumann.EmployeesBacking
  request
   
    
  employee
  net.reumann.EmployeeBacking
  request
   



index.jsp
-



employees.jsp
---
//dataTable  listing employees



EmployeeBacking

//the retrieveEmployeeAction below  is getting hit since the log message is showing up
 public String retrieveEmployeeAction() {
    log.debug("in retrieveEmployeeAction()");
    //get Employee from backend
    this.name = "Rover";
    this.age = new Integer(25);
    return "getEmployeeSuccess";
    }

employeeForm.jsp
-
never getting here. 




Re: Spanish accents in Javascript

2005-08-24 Thread Matt Blum
Have you tried putting the Unicode encodings in the properties
files?  Java uses the same encoding method, so it should work
seamlessly with your server-side code, too.

-MattOn 8/24/05, Slawek <[EMAIL PROTECTED]> wrote:
i have noticed strange corelations while displaying special (polish)characters:im also using message boundle and when im doing like that:function display(text){alert(text);}
than everything is ok, but when doing it like that:function display(){text="";alert(text);}than i see \uSH1T or sth;)its little annoyin cause sommetimes my text should be constans and i dont
need to pass it as parameter.cheersSławek Sobótka> Hi Matt,>> But the problem is that encoding is generated by JSF when using EL like> this:>> #{messages.literal1
}>> 2005/8/24, Matt Blum <[EMAIL PROTECTED]>: You need to use the Unicode encoding for the character, like so: "La f\u00f3rmula es correcta"
 There's a handy online tool to find the codes for most special>> characters>> here:>> http://www.saila.com/usage/tips/examples/special_characters.html
 -Matt On 8/24/05, Enrique Medina <[EMAIL PROTECTED] > wrote:>> >>> > Hi,>> >
>> > I know this is not a question directly related with MyFaces, but does>> > anybody knows how to solve this problem?>> >>> > I define my literal strings in a properties file, and then I have
>> > created a custom messages tag that renders the message as an alert of>> > _javascript_. So when a JSF message is generated, it is rendered as an>> alert.>> > My problem is with accents. For example, in the alert window the text
>> > appears like:>> >>> > "La fórmula es correcta">> >>> > while it should be:>> >>> > "La fórmula es correcta"
>> >>> > Is it a matter of escaping the text in _javascript_? Because I have>> tried>> > the escape() function but with no success...>> >>> >>>



Any idea what I'm doing wrong here?

2005-08-24 Thread Rick Reumann
I'm sort of stumped since the error logs aren't revealing much to me.

I'm just working on page flow test and I'm on 'emloyees.jsp' and I'm
clicking on a button that should access another managed bean and then
forward me to 'employeeForm.jsp'. Error first then some relevant souce
code to follow:

2005-08-24 16:29:05 StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Unrecognized Content Type.
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:327)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
  
Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: Unrecognized Content Type.
    at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:821)
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
    at org.apache.jsp.employees_jsp._jspService(employees_jsp.java:83)


faces config
-

    
  /empoloyees.jsp
  
 getEmployeeSuccess
 /empoloyeeForm.jsp
  
   

    
  employees
  net.reumann.EmployeesBacking
  request
   
    
  employee
  net.reumann.EmployeeBacking
  request
   



index.jsp
-



employees.jsp
---
//dataTable  listing employees



EmployeeBacking

//the retrieveEmployeeAction below  is getting hit since the log message is showing up
 public String retrieveEmployeeAction() {
    log.debug("in retrieveEmployeeAction()");
    //get Employee from backend
    this.name = "Rover";
    this.age = new Integer(25);
    return "getEmployeeSuccess";
    }

employeeForm.jsp
-
never getting here. 


RE: HTML output

2005-08-24 Thread CONNER, BRENDAN \(SBCSI\)
I think you want escape="false" not escape="true"

- Brendan

-Original Message-
From: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 24, 2005 3:30 PM
To: MyFaces Discussion
Subject: Re: HTML output


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

i dont get it, i already tried it with the outputText

example:


produces:
thats a bold

what i make wrong?

albartell wrote:
> And depending on whether you want it escaped you should also add the
> 'escape="[true|false]"' attribute to the outputText tag. 
> 
> -Original Message-
> From: Joel Wilson [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 24, 2005 1:36 PM
> To: MyFaces Discussion
> Subject: Re: HTML output
> 
> 
>  style="embeddedCSS"/>
> On Aug 24, 2005, at 2:22 PM, Helmut Juskewycz wrote:
> 
> 
> Hi,
> 
> please dont laugh but which component do i need to print out an html 
> text?
> i want something like this:
> 
> 
> 
> and then the text should be printed in html style
> 
> thx
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE

iD8DBQFDDNjVkg7OsoSBexYRAofsAJ92SEI2US5Bo4f+gUJrQv4/M0Tw/QCfaAbd
zowpSP1pSWm4l7GjtylLk8E=
=OOeM
-END PGP SIGNATURE-


Re: HTML output

2005-08-24 Thread Helmut Juskewycz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

i dont get it, i already tried it with the outputText

example:


produces:
thats a bold

what i make wrong?

albartell wrote:
> And depending on whether you want it escaped you should also add the
> 'escape="[true|false]"' attribute to the outputText tag. 
> 
> -Original Message-
> From: Joel Wilson [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 24, 2005 1:36 PM
> To: MyFaces Discussion
> Subject: Re: HTML output
> 
> 
>  style="embeddedCSS"/>
> On Aug 24, 2005, at 2:22 PM, Helmut Juskewycz wrote:
> 
> 
> Hi,
> 
> please dont laugh but which component do i need to print out an html 
> text?
> i want something like this:
> 
> 
> 
> and then the text should be printed in html style
> 
> thx
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE

iD8DBQFDDNjVkg7OsoSBexYRAofsAJ92SEI2US5Bo4f+gUJrQv4/M0Tw/QCfaAbd
zowpSP1pSWm4l7GjtylLk8E=
=OOeM
-END PGP SIGNATURE-


Re: Spanish accents in Javascript

2005-08-24 Thread Slawek
i have noticed strange corelations while displaying special (polish) 
characters:


im also using message boundle and when im doing like that:


function display(text){
alert(text);
}




than everything is ok, but when doing it like that:


function display(){
text="";
alert(text);
}



than i see \uSH1T or sth;)


its little annoyin cause sommetimes my text should be constans and i dont 
need to pass it as parameter.



cheers

Sławek Sobótka


Hi Matt,

But the problem is that encoding is generated by JSF when using EL like
this:

#{messages.literal1}

2005/8/24, Matt Blum <[EMAIL PROTECTED]>:


You need to use the Unicode encoding for the character, like so:

"La f\u00f3rmula es correcta"

There's a handy online tool to find the codes for most special 
characters

here:
http://www.saila.com/usage/tips/examples/special_characters.html

-Matt

On 8/24/05, Enrique Medina <[EMAIL PROTECTED] > wrote:
>
> Hi,
>
> I know this is not a question directly related with MyFaces, but does
> anybody knows how to solve this problem?
>
> I define my literal strings in a properties file, and then I have
> created a custom messages tag that renders the message as an alert of
> Javascript. So when a JSF message is generated, it is rendered as an 
alert.

> My problem is with accents. For example, in the alert window the text
> appears like:
>
> "La fórmula es correcta"
>
> while it should be:
>
> "La fórmula es correcta"
>
> Is it a matter of escaping the text in Javascript? Because I have 
tried

> the escape() function but with no success...
>
>






RE: Spanish accents in Javascript

2005-08-24 Thread CONNER, BRENDAN \(SBCSI\)
Title: Message



How 
are you invoking this value in your JSP?  Can you provide a snippet of 
relevant JSP and _javascript_ code?
 
- 
Brendan

  
  -Original Message-From: Enrique Medina 
  [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 24, 2005 3:08 
  PMTo: MyFaces DiscussionSubject: Re: Spanish accents in 
  _javascript_Hi Matt,But the problem is that 
  encoding is generated by JSF when using EL like 
  this:#{messages.literal1}
  2005/8/24, Matt Blum <[EMAIL PROTECTED]>:
  You 
need to use the Unicode encoding for the character, like so:"La 
f\u00f3rmula es correcta"There's a handy online tool to find the 
codes for most special characters here:http://www.saila.com/usage/tips/examples/special_characters.html-Matt

On 8/24/05, Enrique 
Medina < [EMAIL PROTECTED] 
> wrote:
Hi,I 
  know this is not a question directly related with MyFaces, but does 
  anybody knows how to solve this problem?I define my literal 
  strings in a properties file, and then I have created a custom messages 
  tag that renders the message as an alert of _javascript_. So when a JSF 
  message is generated, it is rendered as an alert. My problem is with 
  accents. For example, in the alert window the text appears 
  like:"La fórmula es correcta"while it should 
  be:"La fórmula es correcta"Is it a matter of escaping the 
  text in _javascript_? Because I have tried the escape() function but with no 
  success...


Re: Spanish accents in Javascript

2005-08-24 Thread Enrique Medina
Hi Matt,

But the problem is that encoding is generated by JSF when using EL like this:

#{messages.literal1}2005/8/24, Matt Blum <[EMAIL PROTECTED]>:
You need to use the Unicode encoding for the character, like so:

"La f\u00f3rmula es correcta"

There's a handy online tool to find the codes for most special characters here:
http://www.saila.com/usage/tips/examples/special_characters.html


-MattOn 8/24/05, Enrique Medina <
[EMAIL PROTECTED]
> wrote:Hi,

I know this is not a question directly related with MyFaces, but does anybody knows how to solve this problem?

I define my literal strings in a properties file, and then I have
created a custom messages tag that renders the message as an alert of
_javascript_. So when a JSF message is generated, it is rendered as an
alert. My problem is with accents. For example, in the alert window the
text appears like:

"La fórmula es correcta"

while it should be:

"La fórmula es correcta"

Is it a matter of escaping the text in _javascript_? Because I have tried the escape() function but with no success...







Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread David Haynes

Craig McClanahan wrote:


On 8/24/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
 


On 8/24/05, David Haynes <[EMAIL PROTECTED]> wrote:
   



So, if you have already created an instance of employeeBackingBean (and
it is defined as having a session scope), it should be available for all
subsequent pages in the session.
 



Correct. But I wouldn't think I'd need to have to give my backing bean
session scope in order to accomplish this.
   



You don't.  If you navigate from one page to another in the same
request (i.e. your navigation rule does not include redirect="true"),
then request scoped beans (managed beans, or beans you put into
request scope manually) are visible in both the "from" and the "to"
pages.

Craig
 


Yes, my bad. I forgot that the default scope is 'page'.

-david-



was Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Rick Reumann
On 8/24/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote:







 (BTW, if you need 
something more than request scope but less than session scope, use the handy 
 tag that MyFaces gives you to "carry along" the bean for as 
many pages as you need to.  Then you can simply declare it with request 
scope.

Wow! That sounds  like a killer tag!  I look forward to checking that out.

Thanks everyone for your help.
-- Rick


Questions on required="true" attribute

2005-08-24 Thread CONNER, BRENDAN \(SBCSI\)
When going from JSF 1.0 to MyFaces JSF, I noticed that the detailed
message that gets displayed when one specifies required="true" now
includes the name of the field.  Is that something that's specific to
MyFaces, or is it part of JSF 1.1?

Also, related to that, is that message now overridable?  I seem to
recall that, unlike the messages for other validators, the message for
required="true" is not overridable.

Finally, is it possible for the message to refer to the name of the
field in some way other than through the id of the field?  Our IDs
cannot have spaces in them, which requires compound names to get
concatenated.  This is fine for internally used variables, but users get
a little freaked when they see a name like ModuleID instead of "Module
ID".  One thought I had was to use the field's title in the message
instead of the field's id.

Thanks,

- Brendan


Re: Why not reuse jsf-api.jar from Sun?

2005-08-24 Thread Craig McClanahan
On 8/24/05, Ken Weiner <[EMAIL PROTECTED]> wrote:
> > Trust me ... you don't want to read all the EG threads on that topic
> > :-).  But the short answer is, consider what happens in a future
> > version of JSF, when (for good reason) a new method signature is added
> > to the Renderer API.  If it were an interface, you've just broken
> > every current implementation in the world.  As an abstract base class,
> > you can add a default implementation that mirrors the previous
> > behavior, so the only potential breakage is if an implementation had
> > their own version of that very same method signature.
> 
> It seems like you could get the best of both worlds with an interface
> and an abstract class that implements it.  Since this has been
> well-vetted by the EG, I'll accept the reasons it was done without an
> interface.
> 

That certainly would have been possible, and would have broken fewer
people (only those who chose to directly implement the interface
instead of extending the base class), but that wasn't the choice we
ended up making.

> > An actual instance, of course, must be of a concrete class that can be
> > instantiated.  But whether that concrete class extends an abstract
> > base class, or implements an interface, is irrelevant to how many
> > copies there are.  In this particular case, it simply has to be that
> > "instanceof Renderer" returns true, since the JSF implementation is
> > going to cast it to this before calling its methods.
> 
> So, it sounds like the JSF implementation *does* get to choose whether
> or not javax.faces.render.Renderer is an abstract class or in
> interface since an "instanceof Renderer" check could be done for an
> instance of either.  Am I understanding correctly?
> 

No.  Part of the compatibility tests for a JCP spec is a "signature
test" that ensures that every public class (or interface) in the javax
namespace has *exactly* the correct nature (public class, abstract
public class, interface, etc.) as well as *exactly* the correct public
and protected method/variable signatures.  If different
implementations were allowed to choose interface versus base class
(i.e. we threw away the signature tests), then your Renderer
implementation would not be portable -- because the inheritance
hierarchy embedded in your compiled class would be different.

> >
> > Craig
> >
> 

Craig


RE: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread CONNER, BRENDAN \(SBCSI\)
Title: Message



Yes, 
it can all be handled through the request scope.  (BTW, if you need 
something more than request scope but less than session scope, use the handy 
 tag that MyFaces gives you to "carry along" the bean for as 
many pages as you need to.  Then you can simply declare it with request 
scope.)
 
The 
steps you outlined are correct, except that the action bean, after it reads from 
the database, will do the following:
 
getEmployeeBean().setName(result.name);
getEmployeeBean().setAddress(result.address);
...
 
or the 
equivalent.  The employee bean will already be instantiated by JSF at that 
point; the action bean just needs to fill it in.  Then, once the action 
bean returns and navigation takes it to the next page, the bean will have all 
the values it needs for the JSP to refer to.
 
- 
Brendan

  
  -Original Message-From: Rick Reumann 
  [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 24, 2005 
  1:43 PMTo: MyFaces DiscussionSubject: Re: confusion on 
  best practices in regard to a VO in BackingBeanOn 
  8/24/05, David Haynes <[EMAIL PROTECTED]> 
  wrote:
  
  So, 
if you have already created an instance of employeeBackingBean (andit is 
defined as having a session scope), it should be available for 
allsubsequent pages in the session.
  Correct. But I wouldn't think I'd need to have to give my backing 
  bean session scope in order to accomplish this. Using Struts as an example, if 
  I'm in my Action responsible for "getting an Employee" from the backend and I 
  then shove it request scope, the Employee is now available on the resulting 
  page that I forward to. I'm still a bit stumped how this is accomplished with 
  JSF without using Session scoped backing beans. To reiterate the flow 
  ..."employees.jsp"  - user clicks on edit employee link (passing 
  in employee id)backing bean "getEmployeeAction" method called 
  returning an employee object from backend. (For simplicity lets just assume 
  Employee object is in this EmployeeBackingBean). navigation rule has 
  us now forward to the "employeeForm.jsp" which should be autopopulated with 
  the Employee information we returned in our backing bean. Can all of this be 
  done with Request scope? I would think it should since it's pretty basic CRUD 
  UI flow in applications.-- Rick 



Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Craig McClanahan
On 8/24/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> On 8/24/05, David Haynes <[EMAIL PROTECTED]> wrote:
> >  
> > So, if you have already created an instance of employeeBackingBean (and
> > it is defined as having a session scope), it should be available for all
> > subsequent pages in the session.
> 
>  
>  Correct. But I wouldn't think I'd need to have to give my backing bean
> session scope in order to accomplish this.

You don't.  If you navigate from one page to another in the same
request (i.e. your navigation rule does not include redirect="true"),
then request scoped beans (managed beans, or beans you put into
request scope manually) are visible in both the "from" and the "to"
pages.

Craig


Re: Does a doc exist describing the MyFaces features?

2005-08-24 Thread Dave Brondsema
Also see the TLD links on http://myfaces.apache.org/javadoc.html

Balaji Saranathan wrote:
> This URL lists various components and features of MyFaces.
> http://wiki.apache.org/myfaces/
> 
> -Original Message-
> *From:* Rick Reumann [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, August 24, 2005 2:37 PM
> *To:* MyFaces Discussion
> *Subject:* Does a doc exist describing the MyFaces features?
> 
> Someone mentioned using x:dataList in place of JSTL for each. I'm
> curious, is there a document that shows a list of all the different
> features MyFaces supplies? I know the MyFaces example app shows a
> lot (maybe all?), but it would be nice to see all these features and
> a quick example of usage in a single pdf or doc. (Trust me not
> complaining if one doesn't exist, was just curious if there was one
> floating around somewhere). Thanks.
> 
> -- 
> Rick 
> 
> 
> 
> Confidentiality Notice
> 
> The information contained in this electronic message and any attachments
> to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential
> or privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or
> [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.
> 


-- 
Dave Brondsema
Software Developer
Cornerstone University


signature.asc
Description: OpenPGP digital signature


Re: Why not reuse jsf-api.jar from Sun?

2005-08-24 Thread Ken Weiner
> Trust me ... you don't want to read all the EG threads on that topic
> :-).  But the short answer is, consider what happens in a future
> version of JSF, when (for good reason) a new method signature is added
> to the Renderer API.  If it were an interface, you've just broken
> every current implementation in the world.  As an abstract base class,
> you can add a default implementation that mirrors the previous
> behavior, so the only potential breakage is if an implementation had
> their own version of that very same method signature.

It seems like you could get the best of both worlds with an interface
and an abstract class that implements it.  Since this has been
well-vetted by the EG, I'll accept the reasons it was done without an
interface.

> An actual instance, of course, must be of a concrete class that can be
> instantiated.  But whether that concrete class extends an abstract
> base class, or implements an interface, is irrelevant to how many
> copies there are.  In this particular case, it simply has to be that
> "instanceof Renderer" returns true, since the JSF implementation is
> going to cast it to this before calling its methods.

So, it sounds like the JSF implementation *does* get to choose whether
or not javax.faces.render.Renderer is an abstract class or in
interface since an "instanceof Renderer" check could be done for an
instance of either.  Am I understanding correctly?

> 
> Craig
>


RE: HTML output

2005-08-24 Thread albartell
And depending on whether you want it escaped you should also add the
'escape="[true|false]"' attribute to the outputText tag. 

-Original Message-
From: Joel Wilson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 24, 2005 1:36 PM
To: MyFaces Discussion
Subject: Re: HTML output



On Aug 24, 2005, at 2:22 PM, Helmut Juskewycz wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> please dont laugh but which component do i need to print out an html 
> text?
> i want something like this:
>
> 
>
> and then the text should be printed in html style
>
> thx
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.1 (MingW32)
> Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE
>
> iD8DBQFDDLr/kg7OsoSBexYRAj39AJwK63nlSJPTy9RsTIVH+VEKx/O2hACePIEX
> dUz6SSZgkbB1ezC+vSACuho=
> =wQGF
> -END PGP SIGNATURE-
>



Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Rick Reumann
On 8/24/05, David Haynes <[EMAIL PROTECTED]> wrote:
 So, if you have already created an instance of employeeBackingBean (andit is defined as having a session scope), it should be available for allsubsequent pages in the session.

Correct. But I wouldn't think I'd need to have to give my backing bean
session scope in order to accomplish this. Using Struts as an example,
if I'm in my Action responsible for "getting an Employee" from the
backend and I then shove it request scope, the Employee is now
available on the resulting page that I forward to. I'm still a bit
stumped how this is accomplished with JSF without using Session scoped
backing beans. To reiterate the flow ...

"employees.jsp"  - user clicks on edit employee link (passing in employee id)

backing bean "getEmployeeAction" method called returning an employee
object from backend. (For simplicity lets just assume Employee object
is in this EmployeeBackingBean). 

navigation rule has us now forward to the "employeeForm.jsp" which
should be autopopulated with the Employee information we returned in
our backing bean. Can all of this be done with Request scope? I would
think it should since it's pretty basic CRUD UI flow in applications.

-- 
Rick


RE: Does a doc exist describing the MyFaces features?

2005-08-24 Thread Balaji Saranathan
Title: Message



This
URL lists various components and features of MyFaces.
http://wiki.apache.org/myfaces/

  
  -Original Message-From: Rick Reumann
  [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 24, 2005
  2:37 PMTo: MyFaces DiscussionSubject: Does a doc exist
  describing the MyFaces features?Someone mentioned using
  x:dataList in place of JSTL for each. I'm curious, is there a document that
  shows a list of all the different features MyFaces supplies? I know the
  MyFaces example app shows a lot (maybe all?), but it would be nice to see all
  these features and a quick example of usage in a single pdf or doc. (Trust me
  not complaining if one doesn't exist, was just curious if there was one
  floating around somewhere). Thanks.-- Rick




Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.


Re: HTML output

2005-08-24 Thread Joel Wilson


style="embeddedCSS"/>

On Aug 24, 2005, at 2:22 PM, Helmut Juskewycz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

please dont laugh but which component do i need to print out an  
html text?

i want something like this:



and then the text should be printed in html style

thx
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE

iD8DBQFDDLr/kg7OsoSBexYRAj39AJwK63nlSJPTy9RsTIVH+VEKx/O2hACePIEX
dUz6SSZgkbB1ezC+vSACuho=
=wQGF
-END PGP SIGNATURE-





Does a doc exist describing the MyFaces features?

2005-08-24 Thread Rick Reumann
Someone mentioned using x:dataList in place of JSTL for each. I'm
curious, is there a document that shows a list of all the different
features MyFaces supplies? I know the MyFaces example app shows a lot
(maybe all?), but it would be nice to see all these features and a
quick example of usage in a single pdf or doc. (Trust me not
complaining if one doesn't exist, was just curious if there was one
floating around somewhere). Thanks.-- Rick


Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread David Haynes

Rick Reumann wrote:



On 8/24/05, *CONNER, BRENDAN (SBCSI)* <[EMAIL PROTECTED] 
> wrote:


 
Our CalculatorBean would be a simple JavaBean containing firstNumber,

secondNumber, and result.
Our CalculatorAction class would have a field called calcBean (and its
getter and setter), which is set by JSF, plus the methods add() and
multiply().  (Note that, since the reference to calcBean is a managed
reference, CalculatorAction does *not* instantiate calculatorBean
itself.)

The JSP would then refer to #{calcBean.firstNumber},
#{calcBean.secondNumber }, #{calcBean.result}, #{calcAction.add}, and
#{calcAction.multiply}.



Ok, I really like this, but help me out with trying to understand a 
totally noob concept... to help me relate, lets change the above to an 
"Employee" and an "EmloyeeAction"...


First what I want to accomplish...

I'm on a JSP and I'm viewing a list of employees. I click on a button 
next to the employee that should bring me to an 'editEmployee' screen 
after looking up the employee from backend based on id.


Clicking on the button should call the "EmployeeAction" backing bean 
and retrieve an "Employee" (which using your scenario would also be a 
managed bean). The Employee object is returned from the 
EmployeeAction's 'getEmployee' method.


We now foward on to the 'employeeForm.jsp'

*Which backing bean am I now to use on this employeeForm.jsp* and how 
does it manage to get a handle to the "Employee" that we just returned 
from our EmployeeAction if we are using request scoped managed beans?


If I understand you correctly, you are really asking: "If I have a bean 
in a page and then forward to another page, can I still access the 
bean?" If so, I think the concept that applies is that of the scope of 
the bean - specifically, the session scope. [If I am wrong on this, oh 
senior folks, please let me know.]


According to Hans Bergsten's JavaServer Faces (OReilly):
"When JSF evaluates a value binding expression and encounters a variable 
that doesn't exist in one of the scopes, it consults the configuration 
file and creates an instance of the managed bean with a matching name."


So, if you have already created an instance of employeeBackingBean (and 
it is defined as having a session scope), it should be available for all 
subsequent pages in the session.


-david-




Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Rick Reumann
On 8/24/05, David Haynes <[EMAIL PROTECTED]> wrote:
 [in employeeBackingBean]...EmployeeBean eb = new EmployeeBean();...public String getName() {return eb.getName();}...So, all the elements of the EmployeeBean are available via the
employeeBackingBean in an unambiguous way. Or am I still missing the point?

Funny, I was just going to reply that I bet that is the way to handle
this (when using the combined action/value object wrapped up into one
managed bean concept). Thanks for clarifying this.

I will, however, be interested in the other replies on how you this
gets handled when you keep them as separate managed beans (
EmployeeAction and Employee ). 

Thanks again for your patience with me on this. It's 'slowly' starting
to click. I feel like an old dog trying to learn new tricks:)
-- Rick


HTML output

2005-08-24 Thread Helmut Juskewycz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

please dont laugh but which component do i need to print out an html text?
i want something like this:



and then the text should be printed in html style

thx
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE

iD8DBQFDDLr/kg7OsoSBexYRAj39AJwK63nlSJPTy9RsTIVH+VEKx/O2hACePIEX
dUz6SSZgkbB1ezC+vSACuho=
=wQGF
-END PGP SIGNATURE-


Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread David Haynes

Rick Reumann wrote:




On 8/24/05, *David Haynes* <[EMAIL PROTECTED] 
> wrote:


 
I'm confused here. If the EmployeeBean object is embedded in the

EmployeeController and all the methods of EmployeeBean are
available via
the EmployeeController, why do you need the EmployeeBean directly?


Well for example after you used your backing bean to "get an employee" 
(getEmployee method?), you would then want to display the employee 
name on the page.. so you might have...


employeeBackingBean.employee.name 



But that above would attempt to call 'getEmployee' which, if where my 
initial confusion on 'best practice' came from since 'getEmployee' 
could either mean 'get me the instance of the employee object from my 
backing bean' or 'call some backend method to get me an instance of 
the employee from the backend.'


--
Rick 


Using Rick Hightower's model, the name element would be contained in 
employeeBackingBean, so the reference would be employeeBackingBean.name. 
(The bean contains the data manipulation - not the data storage - in his 
modelling method.) Of course, it would be trivial to move the data 
storage to the bean (which I am starting to favour) and then provide 
accessor methods via the employeeBackingBean such as:


[in employeeBackingBean]
...
EmployeeBean eb = new EmployeeBean();
...
public String getName() {
   return eb.getName();
}
...

So, all the elements of the EmployeeBean are available via the 
employeeBackingBean in an unambiguous way. Or am I still missing the point?


-david-



Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Rick Reumann
On 8/24/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote:
 Our CalculatorBean would be a simple JavaBean containing firstNumber,secondNumber, and result.Our CalculatorAction class would have a field called calcBean (and itsgetter and setter), which is set by JSF, plus the methods add() and
multiply().  (Note that, since the reference to calcBean is a managedreference, CalculatorAction does *not* instantiate calculatorBeanitself.)The JSP would then refer to #{calcBean.firstNumber},#{calcBean.secondNumber
}, #{calcBean.result}, #{calcAction.add}, and#{calcAction.multiply}.

Ok, I really like this, but help me out with trying to understand a
totally noob concept... to help me relate, lets change the above to an
"Employee" and an "EmloyeeAction"...

First what I want to accomplish...

I'm on a JSP and I'm viewing a list of employees. I click on a button
next to the employee that should bring me to an 'editEmployee' screen
after looking up the employee from backend based on id.

Clicking on the button should call the "EmployeeAction" backing bean
and retrieve an "Employee" (which using your scenario would also be a
managed bean). The Employee object is returned from the
EmployeeAction's 'getEmployee' method. 

We now foward on to the 'employeeForm.jsp'

*Which backing bean am I now to use on this employeeForm.jsp* and how
does it manage to get a handle to the "Employee" that we just returned
from our EmployeeAction if we are using request scoped managed beans? 

There seems to be black-box stuff going on that I'm unclear about. I'm
used to stuffing the "Employee" object into the request in my Action
(struts terms), so I'm having trouble grasping how my resulting page is
going to have access to this employee object that was just returned in
my managed "EmployeeAction" bean?

Thanks so much for the help so far.



portlet modes

2005-08-24 Thread Dave Brondsema

How can I create a link which changes portlet modes (view, edit, etc)
and states (minimized, normal, etc)?

 gives me a URL but
when I try to put it in a commandlink or outputlink it doesn't work.
${viewURL} isn't allowed by the TLD and #{viewURL} outputs nothing.
Using ${viewURL} in a regular  gives errors about VIEW_ID

I am using uPortal 2.5.0

Thanks!

-- 
Dave Brondsema
Software Developer
Cornerstone University


signature.asc
Description: OpenPGP digital signature


Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Craig McClanahan
On 8/24/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> 
> 
> On 8/24/05, David Haynes <[EMAIL PROTECTED]> wrote:
> >  
> > I'm confused here. If the EmployeeBean object is embedded in the
> > EmployeeController and all the methods of EmployeeBean are available via
> > the EmployeeController, why do you need the EmployeeBean directly?
>  
> 
>  Well for example after you used your backing bean to "get an employee"
> (getEmployee method?), you would then want to display the employee name on
> the page.. so you might have...
>  
>  employeeBackingBean.employee.name
>  
>  But that above would attempt to call 'getEmployee' which, if where my
> initial confusion on 'best practice' came from since 'getEmployee' could
> either mean 'get me the instance of the employee object from my backing
> bean' or 'call some backend method to get me an instance of the employee
> from the backend.' 
>  

Why should the page author care which meaning is actually implemented?
 That should be up to the back end app developer.

The contract between the person doing the back end and the person
doing the front end needs to cover what value binding expressions to
use to pull data from the model, or push data back to the model. 
Multiple approaches are possible -- and this is no different than the
situation in Struts, where some people hang persistence tier model
objects onto the form bean, and others stick them directly in request
or session scope.  The thing that matters is that the VB expressions
actually work :-).

WRT a completed CRUD example, on the list of things to do is make a
Shale-ized version of the Struts mailreader app.  Frank has
volunteered to do that, but he's learning too ... it may be that I
need to help get that started a bit so it can be fleshed out.

Craig


> -- 
> Rick


Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Rick Reumann
On 8/24/05, David Haynes <[EMAIL PROTECTED]> wrote:
 I'm confused here. If the EmployeeBean object is embedded in theEmployeeController and all the methods of EmployeeBean are available viathe EmployeeController, why do you need the EmployeeBean directly?

Well for example after you used your backing bean to "get an employee"
(getEmployee method?), you would then want to display the employee name
on the page.. so you might have...

employeeBackingBean.employee.name

But that above would attempt to call 'getEmployee' which, if where my
initial confusion on 'best practice' came from since 'getEmployee'
could either mean 'get me the instance of the employee object from my
backing bean' or 'call some backend method to get me an instance of the
employee from the backend.' 
-- Rick


Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread David Haynes

Rick Reumann wrote:




On 8/24/05, *David Haynes* <[EMAIL PROTECTED] 
> wrote:


 
Rick Hightower does this in his "Clearing the FUD about JSF"

http://www-128.ibm.com/developerworks/java/library/j-jsf1/

He has the XyzBeand and XyzController with the controller containing:

XyzBean xyzBean = new XyzBean();

and then supporting the methods etc. via xyzBean.method() calls. His
Controller is your Action.

See his extremely fine articles for more details.



No offence, but I've looked at that article and it doesn't even 
remotely address what this thread is asking about



Well then, I apologize for missing the point.

[snip]

Imagine you need to perform tasks on an Employee - saveEmployee, 
getEmployee, etc. Yet, after getting an employee from the backend, you 
will then also need a reference to this employee object that you 
returned from the backend for use on your page. Someone previously 
mentioned use getEmployeeAction (does the business delegate call) and 
getEmployee (returns the instance of the Employee object from your 
backing bean). Hightower's example is dealing with a calculator and 
performing calculator operations - not returning a cacluator for use 
in the view..


I'm confused here. If the EmployeeBean object is embedded in the 
EmployeeController and all the methods of EmployeeBean are available via 
the EmployeeController, why do you need the EmployeeBean directly?


-david-



Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Rick Reumann
On 8/24/05, David Haynes <[EMAIL PROTECTED]> wrote:
 Rick Hightower does this in his "Clearing the FUD about JSF"http://www-128.ibm.com/developerworks/java/library/j-jsf1/He has the XyzBeand and XyzController with the controller containing:
XyzBean xyzBean = new XyzBean();and then supporting the methods etc. via xyzBean.method() calls. HisController is your Action.See his extremely fine articles for more details.


No offence, but I've looked at that article and it doesn't even remotely address what this thread is asking about

My question was in reference to using two managed beans one as your typical "action/controller" and one as your "value object."

Even discarding this question and going back to the original question,
Hightower's article does not address the issue at hand. In case some
have lost the initial thread question...

Imagine you need to perform tasks on an Employee - saveEmployee,
getEmployee, etc. Yet, after getting an employee from the backend, you
will then also need a reference to this employee object that you
returned from the backend for use on your page. Someone previously
mentioned use getEmployeeAction (does the business delegate call) and
getEmployee (returns the instance of the Employee object from your
backing bean). Hightower's example is dealing with a calculator and
performing calculator operations - not returning a cacluator for use in
the view..

I really wish there was a simple example dealing with CRUD stuff. I'm
in the process of writing one, but I'm surprised there isn't one out
there already. 
-- Rick


Re: Having trouble with JSTL inside JSF

2005-08-24 Thread Craig McClanahan
On 8/24/05, Bernd Bohmann <[EMAIL PROTECTED]> wrote:
> One question:
> 
> why the value attribute of x:outputText doesn't accept rtexpressions?
> 

It's not just this attribute ... the restriction is pretty much
universal across all attributes on all component tags.  There are two
reasons for this:

* If rtexpressions were allowed, there would be cases where
  the RT expression could return a JSF value binding expression,
  which would then be invoked ... and there are potential security
  issues with this (pretty much like how webapps can be subject
  to cross site scripting attacks if they allow arbitrary code to be
  emitted).

* The fact that you can use a value binding expression on nearly
  every attribute makes using rt expressions redundant ... you can
  do anything you need with a value binding anyway.

In JSF 1.2 / JSP 2.1, the concepts are getting unified ... but in the
mean time (when the JSP container doesn't know what a value binding
expression is) this was the decision made at the JSF spec level.

> 
> Bernd
>

Craig


RE: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread CONNER, BRENDAN \(SBCSI\)
Good article.  His packaging is a little different than ours.  For his
Calculator example, we would have separated the Calculator's data into
CalculatorBean, and our CalculatorAction (or CalculatorController) would
have had just a managed reference to the bean, plus the add() and
multiply() "action" methods.  In his example, his CalculatorController
contains the data plus the action methods.

So our faces-config.xml file would have looked like:


...

calcBean

com.arcmind.jsfquickstart.bean.CalculatorBean
request


calcAction

com.arcmind.jsfquickstart.bean.CalculatorAction
request

calcBean
#{calcBean}


...


Our CalculatorBean would be a simple JavaBean containing firstNumber,
secondNumber, and result.
Our CalculatorAction class would have a field called calcBean (and its
getter and setter), which is set by JSF, plus the methods add() and
multiply().  (Note that, since the reference to calcBean is a managed
reference, CalculatorAction does *not* instantiate calculatorBean
itself.)

The JSP would then refer to #{calcBean.firstNumber},
#{calcBean.secondNumber}, #{calcBean.result}, #{calcAction.add}, and
#{calcAction.multiply}.

Either way works.  We just prefer the flexibility we see in separating
the data and actions.

- Brendan

-Original Message-
From: David Haynes [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 24, 2005 12:07 PM
To: MyFaces Discussion
Subject: Re: confusion on best practices in regard to a VO in
BackingBean


Rick Reumann wrote:

> On 8/23/05, *CONNER, BRENDAN (SBCSI)* <[EMAIL PROTECTED] 
> > wrote:
>
> As another alternative, the practice we've been following is to
> have an
> XyzAction class and a separate XyzBean class.  The Action class
has a
> managed reference to the Bean class and has all the logic in it.
The
> Bean class is just a straight JavaBean and contains all the data
> needed
> by the JSF page.
>
>
>
> Are you stating to register both as managed beans? Currently I do have

> two separate classes (XyzAction and XyzBean, but XyzBean is nested 
> inside the backing bean XyzAction). Using the approach above my 
> question is best illustrated by an example...
>
> In XyzAaction:
>
> XyzBean getXyz  {
>   return backendDelegate.getXyz();
> }
>  
> My question is how do I now refrence XyzBean from the JSP (using your 
> separate managed bean approach)?  If I do xyz.name   
> how is it pulling the reference to getXyz? In other words, even if I 
> set XyzBean as a managed request scope bean how would this bean have 
> gotten set from the XyzAction in order to be available on the page? 
> I'm used to typical webapps where I stick stuff into the request from 
> servlets (actions in struts). In this scenario above I have not idea 
> how a separate managed XyzBean will be populated from a totally 
> separate managed bean?
>
> Can someone provide a concrete example of this usage? I'd love to see 
> a demo app with this approach. thanks.

Rick Hightower does this in his "Clearing the FUD about JSF" 
http://www-128.ibm.com/developerworks/java/library/j-jsf1/

He has the XyzBeand and XyzController with the controller containing:

XyzBean xyzBean = new XyzBean();

and then supporting the methods etc. via xyzBean.method() calls. His 
Controller is your Action.

See his extremely fine articles for more details.

-david-



Re: Why not reuse jsf-api.jar from Sun?

2005-08-24 Thread Craig McClanahan
On 8/24/05, Ken Weiner <[EMAIL PROTECTED]> wrote:
> Martin, yes, I will file this as an issue in Jira and reference this
> email thread.
> 
> Craig, thank you so much for your response.  I now understand the
> relationship between a java spec and the physical API source code much
> better.  You brought up an interesting point about JSF being different
> in that there is more executable code than in other frameworks.  What
> was the reason that classes like javax.faces.render.Renderer were
> defined as abstract classes rather than interfaces?

Trust me ... you don't want to read all the EG threads on that topic
:-).  But the short answer is, consider what happens in a future
version of JSF, when (for good reason) a new method signature is added
to the Renderer API.  If it were an interface, you've just broken
every current implementation in the world.  As an abstract base class,
you can add a default implementation that mirrors the previous
behavior, so the only potential breakage is if an implementation had
their own version of that very same method signature.

Breakage like this is not totally prohibited -- consider what has
happened in servlet (when new methods get added to the
HttpServletRequest interface) or JDBC (where there has been lots of
changes over the versions).  But that kind of breakage affects
relatively small audiences (app server and database vendors) versus
the potential for breaking every JSF component written by every
component developer in the world.

>  In Section 8.2,
> the spec refers to what an "instance" of Renderer should do.  Does the
> word "instance" imply a class rather than interface or is it up to the
> implementation?

No, "instance" is used in the O-O sense of the word, referring to how
many objects are instantiated into the JVM's memory.  In JSF, a
Renderer is an application-level singleton that is shared by all the
instances of the components (just like a Servlet is an application
level singleton that is shared by all requests mapped to the same URI
pattern).  With UIComponents, for example, there is a separate object
instance for every component on your page -- but if you have four text
fields, the four component instances will all share the same renderer
instance.

An actual instance, of course, must be of a concrete class that can be
instantiated.  But whether that concrete class extends an abstract
base class, or implements an interface, is irrelevant to how many
copies there are.  In this particular case, it simply has to be that
"instanceof Renderer" returns true, since the JSF implementation is
going to cast it to this before calling its methods.

> 
> -Ken
> 

Craig


Re: RE : RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Matt Blum
I'm not exactly sure what you mean.  The z-index of the suggestion
div is set to 100, IIRC.  I should probably change that so it's
settable via a style sheet, but no matter.  The z-index of the
iframe is supposed to be programmatically set to that of the suggestion
div minus 1, as you say.

My point was that the z-index of the select list which is being
superimposed on the div doesn't matter in this particular case, because
IE is going to ignore it anyway.  It does, of course, matter for
other browsers.

-MattOn 8/24/05, Werner Punz <[EMAIL PROTECTED]> wrote:
Matt Blum wrote:> Thanks.  Now that I think about it, and have had another cup of coffee> (and am therefore genuinely awake), the z-index of the select list> wouldn't matter anyway.>Correct me if I am wrong, but the zIndex of the drop down menu has to be
one above the one of the iframe, and also there was an issue with zindex100 in the drop down so that you have to use 99 or zero dunno exactlyanymoreI remember vaguely something like that...Giving the menu a zindex of 99 and the iframe one of 98 should work...



How to get a look at tobago

2005-08-24 Thread Solgrims

Hi,

is there a way to access the tobago repository? And if so: what do I 
need to build tobago?


Regards,

Stefan Hedtfeld.


Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread David Haynes

Rick Reumann wrote:

On 8/23/05, *CONNER, BRENDAN (SBCSI)* <[EMAIL PROTECTED] 
> wrote:


As another alternative, the practice we've been following is to
have an
XyzAction class and a separate XyzBean class.  The Action class has a
managed reference to the Bean class and has all the logic in it.  The
Bean class is just a straight JavaBean and contains all the data
needed
by the JSF page.



Are you stating to register both as managed beans? Currently I do have 
two separate classes (XyzAction and XyzBean, but XyzBean is nested 
inside the backing bean XyzAction). Using the approach above my 
question is best illustrated by an example...


In XyzAaction:

XyzBean getXyz  {
  return backendDelegate.getXyz();
}
 
My question is how do I now refrence XyzBean from the JSP (using your 
separate managed bean approach)?  If I do xyz.name   
how is it pulling the reference to getXyz? In other words, even if I 
set XyzBean as a managed request scope bean how would this bean have 
gotten set from the XyzAction in order to be available on the page? 
I'm used to typical webapps where I stick stuff into the request from 
servlets (actions in struts). In this scenario above I have not idea 
how a separate managed XyzBean will be populated from a totally 
separate managed bean?


Can someone provide a concrete example of this usage? I'd love to see 
a demo app with this approach. thanks.


Rick Hightower does this in his "Clearing the FUD about JSF" 
http://www-128.ibm.com/developerworks/java/library/j-jsf1/


He has the XyzBeand and XyzController with the controller containing:

XyzBean xyzBean = new XyzBean();

and then supporting the methods etc. via xyzBean.method() calls. His 
Controller is your Action.


See his extremely fine articles for more details.

-david-



Re: Having trouble with JSTL inside JSF

2005-08-24 Thread Bernd Bohmann

One question:

why the value attribute of x:outputText doesn't accept rtexpressions?

regards

Bernd



Martin Marinschek wrote:

Another suggestion:

use the x:dataList of Apache MyFaces for each occurence of forEach.

Handles this problem pretty well.

regards,

Martin

On 8/23/05, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:


On 8/23/05, Matt Raible <[EMAIL PROTECTED]> wrote:


Unfortunately, JSP EL and JSF EL don't play nicely together.  This will be
fixed in JSF 1.2 with the Unified EL. In the meantime, here's a hack that
should work:


It also needs JSP 2.1 to work well.








--
Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333


Re: Why not reuse jsf-api.jar from Sun?

2005-08-24 Thread Ken Weiner
Martin, yes, I will file this as an issue in Jira and reference this
email thread.

Craig, thank you so much for your response.  I now understand the
relationship between a java spec and the physical API source code much
better.  You brought up an interesting point about JSF being different
in that there is more executable code than in other frameworks.  What
was the reason that classes like javax.faces.render.Renderer were
defined as abstract classes rather than interfaces?  In Section 8.2,
the spec refers to what an "instance" of Renderer should do.  Does the
word "instance" imply a class rather than interface or is it up to the
implementation?

-Ken

On 8/24/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> Ken,
> 
> can I ask you to file that as a jira-issue?
> 
> If possible, include both yours and Craigs evaluation of the problem
> as comments.
> 
> regards,
> 
> Martin
> 
> On 8/24/05, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> > On 8/23/05, Ken Weiner <[EMAIL PROTECTED]> wrote:
> > > Thanks for the replies.  Do other specs from JCP behave this way?
> >
> > Yes, they *all* do.  An implementation of a JCP spec is required to
> > provide the javax.foo classes, as well as whatever implementation
> > classes they require to conform to the spec requirements.  The primary
> > difference for JSF is there is relatively more executable code in the
> > javax.faces classes, rather than just specifying APIs.  But the
> > compatibility test that MyFaces will be required to pass include
> > signature tests that ensure any given implementation implements
> > *exactly* the set of public and protected methods (and variables if
> > any) as is required by the spec.
> >
> > > don't remember ever seeing another situation where there are multiple
> > > versions of the same exact (same fully-qualified name) class.
> >
> > Question -- where do you get your definition of javax.servlet.Servlet
> > when you compile your webapp?  Answer ... that is totally up to the
> > server implementation you are using -- they do *not* all necessarily
> > share the same physical source code (although such sharing is not
> > uncommon either -- lots of app server vendors use the same
> > javax.servlet classes that Tomcat does, for example, because they are
> > available under the Apache license).
> >
> > The same principle applies to all of the JCP specs.
> >
> > > Here is an example of how my component would break if I switched
> > > implementations:
> > >
> > > Let's say I am coding a component that has children components.  My
> > > component extends javax.faces.render.Renderer.  If I am using the RI,
> > > I may be tempted to accept (not override) the implementation of
> > > Renderer.encodeChildren() which simply iterates thought the children
> > > and renders them as follows:
> > >
> > > public void encodeChildren(FacesContext context, UIComponent 
> > > component)
> > > throws IOException {
> > > if (context == null || component == null) {
> > > throw new NullPointerException();
> > > }
> > > Iterator kids = component.getChildren().iterator();
> > > while (kids.hasNext()) {
> > > UIComponent kid = (UIComponent) kids.next();
> > > kid.encodeBegin(context);
> > > if (kid.getRendersChildren()) {
> > > kid.encodeChildren(context);
> > > }
> > > kid.encodeEnd(context);
> > > }
> > > }
> > >
> > > Now if I switch to MyFaces, none of my children would render because
> > > the MyFaces version of javax.faces.render.Renderer.encodeChildren()
> > > does not render the children.  It looks like this:
> > >
> > > public void encodeChildren(FacesContext context,  UIComponent 
> > > component)
> > > throws IOException
> > > {
> > > if (context == null) throw new NullPointerException("context");
> > > if (component == null) throw new 
> > > NullPointerException("component");
> > > }
> > >
> > > So if I understand things correctly, my component would essentially
> > > break because none of its children would render with MyFaces.  Does
> > > that make sense?
> > >
> >
> > There are a couple bunch of overlapping questions here.
> >
> > * Does the spec require a particular behavior of this method?  If so,
> >   then an implementation that doesn't follow those requirements is
> >   totally broken, and should not be used until it is fixed.
> >
> > * Do the compatibility tests actually test that particular asserion?
> >   This will vary by assertion (like any other piece of software, the
> >   TCK tests are limited by how much resource can be devoted to
> >   creating them), so you cannot expect 100% coverage of even the
> >   testable assertions.  But, even if an assertion is not tested,
> >   failure to conform to the requirements means the implementation
> >   is broken (and, to be fair, the MyFaces folks will go out of their way
> >   to ensure compatibility with the spec

Re: Having trouble with JSTL inside JSF

2005-08-24 Thread Martin Marinschek
Another suggestion:

use the x:dataList of Apache MyFaces for each occurence of forEach.

Handles this problem pretty well.

regards,

Martin

On 8/23/05, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> On 8/23/05, Matt Raible <[EMAIL PROTECTED]> wrote:
> > Unfortunately, JSP EL and JSF EL don't play nicely together.  This will be
> > fixed in JSF 1.2 with the Unified EL. In the meantime, here's a hack that
> > should work:
> 
> It also needs JSP 2.1 to work well.
> 


-- 

http://www.irian.at
Your JSF powerhouse - 
JSF Trainings in English and German


Re: Bypassing validation while still preserving values

2005-08-24 Thread Richard Wallace

James Reynolds wrote:


Ooo! I know this one!

I lean heavily on the Core JSF book by Geary & Horstmann, there is some
good info on this in the page life cycle in Chapter 7.  Specifically,
the Immediate Components information on page 292.  As you mentioned, the
immediate attribute must be set to true for your components.  The
portion I tripped up on was adding "context.renderResponse();" at the
end of my ValueChangeEvent code for the valueChangeListener.  Then, the
model maintained the previous state of my page without firing
validation.

 

The problem with that is that then the model doesn't get updated when 
the command link is clicked so on the page they get directed to can't 
preserve the model info cause it was never updated.  The situation I 
have in mind is something like:


The user loads the page.  They enter some contact info.  They click on 
one of the command links.  The contact info shouldn't be validated but 
the model values should be udpated.  If you look at the lifecycle the 
validation occurs before updating the model values.  And immediate event 
handling gets handled before validation.  So, if I set the immediate 
attribute to true it will forward to the "quick add" page before 
validating the data or updating the model.  So  will be 
preserving old information, not the latest info the user entered.



JR

-Original Message-
From: Richard Wallace [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 24, 2005 10:14 AM

To: MyFaces Discussion
Subject: Bypassing validation while still preserving values

Hey everyone,

I've got a form that has a couple of optional command links on it.  They
are basically "quick add" buttons so a user can quickly add things to
drop downs if they aren't there.  When these "quick add" buttons are
clicked the user is sent to an add page, the user enters the new info
and is then redirected back to the original page where the new entry is
selected and all the other data is preserved from before they clicked
the "quick add" button.  The backing beans involved are request scoped
and the values filled in before clicking the "quick add" button are
preserved through the process using the  element. 


I'm trying to get the validation correct. I want all the form elements
to be required when the user clicks the submit button, but when they hit

the "quick add" link the validation should be bypassed.   I thought of 
doing this with the immediate attribute set to true on the "quick add" 
command links but if I do that then any data the user entered on that

page load (contact info type stuff) is lost.  So I kind of need to
bypass the validation but still update the model values if one of the
command links are clicked, but have full validation done when the
command button is pressed.

I was looking at the new OptionalValidation Framework but I'm not sure
exactly how to apply it in this case.  I mean, what I really want is to
have the validation type be none when command links are used and hard
otherwise.

Any ideas?

Thanks,
Rich

 





Re: Bypassing validation while still preserving values

2005-08-24 Thread Richard Wallace
Like I said, I tried that.  The problem with that is that the model 
values don't get updated and so can't be preserved with the 
 component.


Sean Schofield wrote:


Use immediate="true" on your command links.

sean

On 8/24/05, Richard Wallace <[EMAIL PROTECTED]> wrote:
 


Hey everyone,

I've got a form that has a couple of optional command links on it.  They
are basically "quick add" buttons so a user can quickly add things to
drop downs if they aren't there.  When these "quick add" buttons are
clicked the user is sent to an add page, the user enters the new info
and is then redirected back to the original page where the new entry is
selected and all the other data is preserved from before they clicked
the "quick add" button.  The backing beans involved are request scoped
and the values filled in before clicking the "quick add" button are
preserved through the process using the  element.

I'm trying to get the validation correct. I want all the form elements
to be required when the user clicks the submit button, but when they hit
the "quick add" link the validation should be bypassed.   I thought of
doing this with the immediate attribute set to true on the "quick add"
command links but if I do that then any data the user entered on that
page load (contact info type stuff) is lost.  So I kind of need to
bypass the validation but still update the model values if one of the
command links are clicked, but have full validation done when the
command button is pressed.

I was looking at the new OptionalValidation Framework but I'm not sure
exactly how to apply it in this case.  I mean, what I really want is to
have the validation type be none when command links are used and hard
otherwise.

Any ideas?

Thanks,
Rich

   





Re: Having trouble with JSTL inside JSF

2005-08-24 Thread Bernd Bohmann

Hello,

unfortunately, the value attribute of h:outputText does not accept any 
rtexpressions.
In jsp 2.1 and if h:outputText would allow any expression you could write this:


   
   
   
   
   


In tobago you can write this:


   
   
   
   
   


you can find a working example at

http://www.atanion.net/repos/asf/tobago/trunk in example/foreach


Bernd


Matt Raible wrote:
Unfortunately, JSP EL and JSF EL don't play nicely together.  This will 
be fixed in JSF 1.2 with the Unified EL. In the meantime, here's a hack 
that should work:


<%-- Step 1: Use a non-displayed dataTable to pull userList into request 
--%>
style="display:none"/>


varStatus="status">


I understand the below won't work as is without the backing bean put 
in scope with a useBean construct...but I'm more curious why I can not 
get c:out to evaluate (or really I should also just be able to use 
${..} without the c:out since using tomcat5). What I end up getting is 
the literal text ${status.index} being displayed. I've tried with 
commons-el.jar and without and the same result:( 


<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


varStatus="status">





 






--
Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333



RE: Bypassing validation while still preserving values

2005-08-24 Thread James Reynolds

Ooo! I know this one!

I lean heavily on the Core JSF book by Geary & Horstmann, there is some
good info on this in the page life cycle in Chapter 7.  Specifically,
the Immediate Components information on page 292.  As you mentioned, the
immediate attribute must be set to true for your components.  The
portion I tripped up on was adding "context.renderResponse();" at the
end of my ValueChangeEvent code for the valueChangeListener.  Then, the
model maintained the previous state of my page without firing
validation.

JR

-Original Message-
From: Richard Wallace [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 24, 2005 10:14 AM
To: MyFaces Discussion
Subject: Bypassing validation while still preserving values

Hey everyone,

I've got a form that has a couple of optional command links on it.  They
are basically "quick add" buttons so a user can quickly add things to
drop downs if they aren't there.  When these "quick add" buttons are
clicked the user is sent to an add page, the user enters the new info
and is then redirected back to the original page where the new entry is
selected and all the other data is preserved from before they clicked
the "quick add" button.  The backing beans involved are request scoped
and the values filled in before clicking the "quick add" button are
preserved through the process using the  element. 

I'm trying to get the validation correct. I want all the form elements
to be required when the user clicks the submit button, but when they hit

the "quick add" link the validation should be bypassed.   I thought of 
doing this with the immediate attribute set to true on the "quick add" 
command links but if I do that then any data the user entered on that
page load (contact info type stuff) is lost.  So I kind of need to
bypass the validation but still update the model values if one of the
command links are clicked, but have full validation done when the
command button is pressed.

I was looking at the new OptionalValidation Framework but I'm not sure
exactly how to apply it in this case.  I mean, what I really want is to
have the validation type be none when command links are used and hard
otherwise.

Any ideas?

Thanks,
Rich



Re: Bypassing validation while still preserving values

2005-08-24 Thread Sean Schofield
Use immediate="true" on your command links.

sean

On 8/24/05, Richard Wallace <[EMAIL PROTECTED]> wrote:
> Hey everyone,
> 
> I've got a form that has a couple of optional command links on it.  They
> are basically "quick add" buttons so a user can quickly add things to
> drop downs if they aren't there.  When these "quick add" buttons are
> clicked the user is sent to an add page, the user enters the new info
> and is then redirected back to the original page where the new entry is
> selected and all the other data is preserved from before they clicked
> the "quick add" button.  The backing beans involved are request scoped
> and the values filled in before clicking the "quick add" button are
> preserved through the process using the  element.
> 
> I'm trying to get the validation correct. I want all the form elements
> to be required when the user clicks the submit button, but when they hit
> the "quick add" link the validation should be bypassed.   I thought of
> doing this with the immediate attribute set to true on the "quick add"
> command links but if I do that then any data the user entered on that
> page load (contact info type stuff) is lost.  So I kind of need to
> bypass the validation but still update the model values if one of the
> command links are clicked, but have full validation done when the
> command button is pressed.
> 
> I was looking at the new OptionalValidation Framework but I'm not sure
> exactly how to apply it in this case.  I mean, what I really want is to
> have the validation type be none when command links are used and hard
> otherwise.
> 
> Any ideas?
> 
> Thanks,
> Rich
>


Bypassing validation while still preserving values

2005-08-24 Thread Richard Wallace

Hey everyone,

I've got a form that has a couple of optional command links on it.  They 
are basically "quick add" buttons so a user can quickly add things to 
drop downs if they aren't there.  When these "quick add" buttons are 
clicked the user is sent to an add page, the user enters the new info 
and is then redirected back to the original page where the new entry is 
selected and all the other data is preserved from before they clicked 
the "quick add" button.  The backing beans involved are request scoped 
and the values filled in before clicking the "quick add" button are 
preserved through the process using the  element. 

I'm trying to get the validation correct. I want all the form elements 
to be required when the user clicks the submit button, but when they hit 
the "quick add" link the validation should be bypassed.   I thought of 
doing this with the immediate attribute set to true on the "quick add" 
command links but if I do that then any data the user entered on that 
page load (contact info type stuff) is lost.  So I kind of need to 
bypass the validation but still update the model values if one of the 
command links are clicked, but have full validation done when the 
command button is pressed.


I was looking at the new OptionalValidation Framework but I'm not sure 
exactly how to apply it in this case.  I mean, what I really want is to 
have the validation type be none when command links are used and hard 
otherwise.


Any ideas?

Thanks,
Rich


radiobutton in datatable

2005-08-24 Thread Colin Chalmers

Hi all,

I have a situation where I have to show a table of (flight) data. The 
user should see a booleanRadioButton to the left of the info. Choosing 
one of the buttons signifies a choice for that flight. There could be up 
to 6 @ 7 different choices.


I seem to have difficulty getting the radio button to render/function 
correctly. There should be only one (button) per row marking a value as 
true/false to signify choice of flight. However any examples I've seen 
take a list if input values and renders them alongside each other, in 
different columns but the same row. This is not what I want.


Does anyone have an example/tips of what I'm trying to achieve?

It would help me heaps

Colin


Re: RE : RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Werner Punz

Matt Blum wrote:
Thanks.  Now that I think about it, and have had another cup of coffee 
(and am therefore genuinely awake), the z-index of the select list 
wouldn't matter anyway.


Correct me if I am wrong, but the zIndex of the drop down menu has to be 
one above the one of the iframe, and also there was an issue with zindex 
100 in the drop down so that you have to use 99 or zero dunno exactly 
anymore

I remember vaguely something like that...
Giving the menu a zindex of 99 and the iframe one of 98 should work...



Re: RE : RE : RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Matt Blum
Sounds like a good idea.

-MattOn 8/24/05, Clément Maignien <[EMAIL PROTECTED]> wrote:







I'll try to look at 
the code, but think I dont have enought skills in _javascript_ to find the bug. 
But I'll try it.
 
Do you me to add 
this bug as a commentary on the JIRA issue I've opened previously 
?
 
Thx Matt 
;)
Clément

  
  -Message d'origine-De : Matt Blum 
  [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 24 août 2005 
  17:26À : MyFaces DiscussionObjet : Re: RE : RE 
  : RE : inputSuggest : some others improvement to 
  doThanks.  Now that I think about it, and have had 
  another cup of coffee (and am therefore genuinely awake), the z-index of the 
  select list wouldn't matter anyway.There's obviously a bug in the 
  inputSuggest code.  I'll try to find some time tonight to look at it, but 
  may not be able to get to it till the weekend.  If anyone else feels like 
  taking a crack at it in the meantime, I won't be offended. 
  :)-Matt
  On 8/24/05, Clément 
  Maignien <[EMAIL PROTECTED]> 
  wrote:
  
Sorry but I can't find any z-index in the 
source ...
Here is what I have :
 
  janvier  février  mars  avril  mai  juin  juillet  août  septembre  octobre  novembre  décembrejscalendarSetImageDirectory("/cormag/faces/myFacesExtensionResource/calendar.HtmlCalendarRenderer/11230381/DB/")jscalendarMonthName = new 
Array("janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre");jscalendarDayName 
= new 
Array("lun.","mar.","mer.","jeu.","ven.","sam.","dim.");jscalendarStartAt = 
1;
-Message d'origine-De : Matt Blum [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 24 août 2005 16:39À : MyFaces DiscussionObjet : Re: RE : RE : inputSuggest : some others improvement to do Yep, that's exactly what I was talking about.  Could you check the z-index of the rendered inputDate component, please, and let me know what it is?-Matt On 8/24/05, Clément Maignien <[EMAIL PROTECTED]> wrote: I use the myfaces-20050802 nightly build. Do I should try with a more recent one ?   Here is what I found in the source code (it looks like what you've talk about, no ?) :   if (navigator.appVersion.toLowerCase().indexOf('msie') != -1 && navigator.userAgent.toLowerCase().indexOf('opera') == -1)document.writeln('');     Thanks for youe help Matt. Clément -Message d'origine-De : Matt Blum [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 24 août 2005 15:50À : MyFaces Discussion; [EMAIL PROTECTED]Objet : Re: RE : inputSuggest : some others improvement to do On 8/24/05, Werner Punz <[EMAIL PROTECTED] > wrote: Clément Maignien wrote:> 1- I have a small JSF page with an s:inputSuggest component and an> t:inputDate component under it.> When clicking inside the inputSuggest a dropdown box open and> displays firsts suggests. The problem is that under IE (not Firefox)> the dropdown-box is displayed behind the inputDate, hiding some> suggests.>That is a bug in the IE, the fix is to plug an iframe under the panel... has to be fixed on the _javascript_ side.Hm.  Curious.  Are you using the latest version of the component?  Sean committed a fix that I implemented for this a while ago, though it's possible it's still buggy.  The _javascript_ code *should* detect that you're using IE and, if so, render an iframe in between the panel and anything under it.Can you do a View Source on the rendered page, and look for _javascript_ code that looks like it should generate an iframe with an id ending in the string "Shim"?  If it's there, could you check the z-index of the rendered inputDate component?  If the iframe's not there, or is there but not rendering, you're either using an old version of the code, or there's a bug I don't know about.  If it's there and rendering, but you're still seeing that behavior, I may need to tweak the z-index calculations.  Please let me know, as I don't have time at the moment to test it myself.-Matt

Re: AW: AW: problem with JSCookMenu

2005-08-24 Thread Helmut Juskewycz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

hmm i think this is what u need but i not sure:
add the extension filter to the web.xml




extensionsFilter

org.apache.myfaces.component.html.util.ExtensionsFilter

uploadMaxFileSize
100m
Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB



uploadThresholdSize
100k
Set the threshold size - files
below this limit are stored in memory, files above
this limit are stored on disk.

Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB






extensionsFilter
*.jsf


extensionsFilter
/faces/*


Stefan Gesigora wrote:
> Thanks Helmut for your description!
> But I can't take the web.xml of the simple example cause I'm using Sun JSF 
> with MyFaces Extension!!
> I've tried to put some elements of the web.xml of the simple example to my 
> web.xml:
> 
> org.apache.myfaces.ALLOW_JAVASCRIPT
> org.apache.myfaces.DETECT_JAVASCRIPT
> org.apache.myfaces.PRETTY_HTML
> org.apache.myfaces.AUTO_SCROLL
> 
> But no jscookmenu were shown (with the nightly build and the modified 
> web.xml!)
> 
> Any suggestions?
> 
> Stefan Gesigora
> 
> 
> -Ursprüngliche Nachricht-
> Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 24. August 2005 15:08
> An: MyFaces Discussion
> Betreff: Re: AW: problem with JSCookMenu
> 
> yes that means you didnt install jscookmenu correct.
> 
> i told you before that you can define it in the head and so on but when
> you install the jscookmenu correctly then all works fine.
> 
> Here again how i did it (i hope i make no mistakes)
> 
> first: look at your web.xml (take the web.xml from the simple example)
> second: get the nightly build because of the submenu bug.
> 
> and jscookmenu is ready =)
> 
> again no declaration in the head, except you want to make your personal
> themes then you must declar them.
> 
> 
> @stefan just look at your web.xml and faces-config if all is ok and
> remove the javascript from the head.
> 
> @henri thx for help
> 
> Stefan Gesigora wrote:
> 
>>>Hi!
>>>
>>>After downloading the nightly build my submenus were shown! 
>>>It seems to be an big bug in myfaces 1.0.9!
>>>
>>>BUT in my submenus before and after each entry an broken image (x) were 
>>>shown. How can I disable this attitude?
>>>
>>>Greetings 
>>>Stefan Gesigora
>>>
>>>-Ursprüngliche Nachricht-
>>>Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
>>>Gesendet: Mittwoch, 24. August 2005 14:06
>>>An: MyFaces Discussion
>>>Betreff: Re: problem with JSCookMenu
>>>
>>>Henri,
>>>
>>>maybe you could help me with my link problem. why my links open a new
>>>browser? i wrote the problem in the thread "JSCookMenu Problems with
>>>Themes and with Action".
>>>
>>>thx
>>>
>>>Delbrouck, Henri-Philippe wrote:
>>>
>>>
>Your code seems ok.
>
>In my code, I directly work with array. Perhaps you should try.
>
>My backing bean is defined like this:
>
>public class MyMenu{
>   private NavigationMenuItem[] navItems;
>
>   public MyMenu{
>   NavigationMenuItem[] subItems1 = new NavigationMenuItem[3];
>
>   NavigationMenuItem fileMenu = new
>NavigationMenuItem(this,"File","",false,true,"action",null,false);
>
>   subItems1[0] = new
>NavigationMenuItem(this,"test1","test1",false,true,"action1",null,false);
>   subItems1[1] = new
>NavigationMenuItem(this,"test2","test2",false,true,"action2",null,false);
>   subItems1[2] = new
>NavigationMenuItem(this,"test3","test3",false,true,"action3",null,false);
>
>   
>   fileMenu.setNavigationMenuItems(subItems1);
>
>   }
>
>   public NavigationMenuItem[] getNavItems(){
>   return navItems;
>   }
>   
>   public void setNavItems(NavigationMenuItem[] navItems){
>   this.navItems = navItems;
>   }
>}
>
>Hope this help
>
>Henri-Philippe
>
>-Original Message-
>From: Stefan Gesigora [mailto:[EMAIL PROTECTED] 
>Sent: mercredi 24 août 2005 13:07
>To: MyFaces Discussion
>Subject: AW: problem with JSCookMenu
>
>
>
>Hi!
>
>Thanks for the hints!!
>
>I tried like Helmut told me. Now I can see the first level of the menu but
>the submenus weren't shown...
>Here's my code.
>Any ideas?
>
>Thanks Stefan Gesigora
>
>public List getMenu() {
>
>List menu = new ArrayList(); 
>NavigationMenuItem incident = new NavigationMenuItem("Incident", "action1",
>null,false);

RE : RE : RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Clément Maignien
Title: Message



I'll try to look at 
the code, but think I dont have enought skills in _javascript_ to find the bug. 
But I'll try it.
 
Do you me to add 
this bug as a commentary on the JIRA issue I've opened previously 
?
 
Thx Matt 
;)
Clément

  
  -Message d'origine-De : Matt Blum 
  [mailto:[EMAIL PROTECTED] Envoyé : mercredi 24 août 2005 
  17:26À : MyFaces DiscussionObjet : Re: RE : RE 
  : RE : inputSuggest : some others improvement to 
  doThanks.  Now that I think about it, and have had 
  another cup of coffee (and am therefore genuinely awake), the z-index of the 
  select list wouldn't matter anyway.There's obviously a bug in the 
  inputSuggest code.  I'll try to find some time tonight to look at it, but 
  may not be able to get to it till the weekend.  If anyone else feels like 
  taking a crack at it in the meantime, I won't be offended. 
  :)-Matt
  On 8/24/05, Clément 
  Maignien <[EMAIL PROTECTED]> 
  wrote:
  
Sorry but I can't find any z-index in the 
source ...
Here is what I have :
 
 entre le 
  janvier  février  mars  avril  mai  juin  juillet  août  septembre  octobre  novembre  décembrejscalendarSetImageDirectory("/cormag/faces/myFacesExtensionResource/calendar.HtmlCalendarRenderer/11230381/DB/")jscalendarMonthName = new 
Array("janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre");jscalendarDayName 
= new 
Array("lun.","mar.","mer.","jeu.","ven.","sam.","dim.");jscalendarStartAt = 
1;
-Message d'origine-De : Matt Blum [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 24 août 2005 16:39À : MyFaces DiscussionObjet : Re: RE : RE : inputSuggest : some others improvement to do Yep, that's exactly what I was talking about.  Could you check the z-index of the rendered inputDate component, please, and let me know what it is?-Matt On 8/24/05, Clément Maignien <[EMAIL PROTECTED]> wrote: I use the myfaces-20050802 nightly build. Do I should try with a more recent one ?   Here is what I found in the source code (it looks like what you've talk about, no ?) :   if (navigator.appVersion.toLowerCase().indexOf('msie') != -1 && navigator.userAgent.toLowerCase().indexOf('opera') == -1)document.writeln('');     Thanks for youe help Matt. Clément -Message d'origine-De : Matt Blum [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 24 août 2005 15:50À : MyFaces Discussion; [EMAIL PROTECTED]Objet : Re: RE : inputSuggest : some others improvement to do On 8/24/05, Werner Punz <[EMAIL PROTECTED] > wrote: Clément Maignien wrote:> 1- I have a small JSF page with an s:inputSuggest component and an> t:inputDate component under it.> When clicking inside the inputSuggest a dropdown box open and> displays firsts suggests. The problem is that under IE (not Firefox)> the dropdown-box is displayed behind the inputDate, hiding some> suggests.>That is a bug in the IE, the fix is to plug an iframe under the panel... has to be fixed on the _javascript_ side.Hm.  Curious.  Are you using the latest version of the component?  Sean committed a fix that I implemented for this a while ago, though it's possible it's still buggy.  The _javascript_ code *should* detect that you're using IE and, if so, render an iframe in between the panel and anything under it.Can you do a View Source on the rendered page, and look for _javascript_ code that looks like it should generate an iframe with an id ending in the string "Shim"?  If it's there, could you check the z-index of the rendered inputDate component?  If the iframe's not there, or is there but not rendering, you're either using an old version of the code, or there's a bug I don't know about.  If it's there and rendering, but you're still seeing that behavior, I may need to tweak the z-index calculations.  Please let me know, as I don't have time at the moment to test it myself.-Matt

Re: RE : RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Matt Blum
Thanks.  Now that I think about it, and have had another cup of
coffee (and am therefore genuinely awake), the z-index of the select
list wouldn't matter anyway.

There's obviously a bug in the inputSuggest code.  I'll try to
find some time tonight to look at it, but may not be able to get to it
till the weekend.  If anyone else feels like taking a crack at it
in the meantime, I won't be offended. :)

-MattOn 8/24/05, Clément Maignien <[EMAIL PROTECTED]> wrote:







Sorry but I can't 
find any z-index in the source ...
Here is what I have 
:
 
  janvier  février  mars  avril  mai  juin  juillet  août  septembre  octobre  novembre  décembrejscalendarSetImageDirectory("/cormag/faces/myFacesExtensionResource/calendar.HtmlCalendarRenderer/11230381/DB/")jscalendarMonthName = new 
Array("janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre");jscalendarDayName 
= new Array("lun.","mar.","mer.","jeu.","ven.","sam.","dim.");jscalendarStartAt 
= 1;
-Message d'origine-De : Matt Blum [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 24 août 2005 16:39À : MyFaces DiscussionObjet : Re: RE : RE : inputSuggest : some others improvement to doYep, that's exactly what I was talking about.  Could you check the z-index of the rendered inputDate component, please, and let me know what it is?-Matt On 8/24/05, Clément Maignien <[EMAIL PROTECTED]> wrote: I use the myfaces-20050802 nightly build. Do I should try with a more recent one ?   Here is what I found in the source code (it looks like what you've talk about, no ?) :   if (navigator.appVersion.toLowerCase().indexOf('msie') != -1 && navigator.userAgent.toLowerCase().indexOf('opera') == -1)document.writeln('');     Thanks for youe help Matt. Clément -Message d'origine-De : Matt Blum [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 24 août 2005 15:50À : MyFaces Discussion; [EMAIL PROTECTED] Objet : Re: RE : inputSuggest : some others improvement to do On 8/24/05, Werner Punz <[EMAIL PROTECTED] > wrote: Clément Maignien wrote:> 1- I have a small JSF page with an s:inputSuggest component and an> t:inputDate component under it.> When clicking inside the inputSuggest a dropdown box open and> displays firsts suggests. The problem is that under IE (not Firefox)> the dropdown-box is displayed behind the inputDate, hiding some> suggests.>That is a bug in the IE, the fix is to plug an iframe under the panel... has to be fixed on the _javascript_ side.Hm.  Curious.  Are you using the latest version of the component?  Sean committed a fix that I implemented for this a while ago, though it's possible it's still buggy.  The _javascript_ code *should* detect that you're using IE and, if so, render an iframe in between the panel and anything under it.Can you do a View Source on the rendered page, and look for _javascript_ code that looks like it should generate an iframe with an id ending in the string "Shim"?  If it's there, could you check the z-index of the rendered inputDate component?  If the iframe's not there, or is there but not rendering, you're either using an old version of the code, or there's a bug I don't know about.  If it's there and rendering, but you're still seeing that behavior, I may need to tweak the z-index calculations.  Please let me know, as I don't have time at the moment to test it myself.-Matt

Re: Spanish accents in Javascript

2005-08-24 Thread Matt Blum
You need to use the Unicode encoding for the character, like so:

"La f\u00f3rmula es correcta"

There's a handy online tool to find the codes for most special characters here:
http://www.saila.com/usage/tips/examples/special_characters.html

-MattOn 8/24/05, Enrique Medina <[EMAIL PROTECTED]
> wrote:Hi,

I know this is not a question directly related with MyFaces, but does anybody knows how to solve this problem?

I define my literal strings in a properties file, and then I have
created a custom messages tag that renders the message as an alert of
_javascript_. So when a JSF message is generated, it is rendered as an
alert. My problem is with accents. For example, in the alert window the
text appears like:

"La fórmula es correcta"

while it should be:

"La fórmula es correcta"

Is it a matter of escaping the text in _javascript_? Because I have tried the escape() function but with no success...





RE : RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Clément Maignien
Title: Message



Sorry but I can't 
find any z-index in the source ...
Here is what I have 
:
 
 entre le 
  janvier  février  mars  avril  mai  juin  juillet  août  septembre  octobre  novembre  décembrejscalendarSetImageDirectory("/cormag/faces/myFacesExtensionResource/calendar.HtmlCalendarRenderer/11230381/DB/")jscalendarMonthName = new 
Array("janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre");jscalendarDayName 
= new Array("lun.","mar.","mer.","jeu.","ven.","sam.","dim.");jscalendarStartAt 
= 1;
-Message d'origine-De : Matt Blum [mailto:[EMAIL PROTECTED] Envoyé : mercredi 24 août 2005 16:39À : MyFaces DiscussionObjet : Re: RE : RE : inputSuggest : some others improvement to doYep, that's exactly what I was talking about.  Could you check the z-index of the rendered inputDate component, please, and let me know what it is?-Matt On 8/24/05, Clément Maignien <[EMAIL PROTECTED]> wrote: I use the myfaces-20050802 nightly build. Do I should try with a more recent one ?   Here is what I found in the source code (it looks like what you've talk about, no ?) :   if (navigator.appVersion.toLowerCase().indexOf('msie') != -1 && navigator.userAgent.toLowerCase().indexOf('opera') == -1)document.writeln('');     Thanks for youe help Matt. Clément -Message d'origine-De : Matt Blum [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 24 août 2005 15:50À : MyFaces Discussion; [EMAIL PROTECTED]Objet : Re: RE : inputSuggest : some others improvement to do On 8/24/05, Werner Punz <[EMAIL PROTECTED]> wrote: Clément Maignien wrote:> 1- I have a small JSF page with an s:inputSuggest component and an> t:inputDate component under it.> When clicking inside the inputSuggest a dropdown box open and> displays firsts suggests. The problem is that under IE (not Firefox)> the dropdown-box is displayed behind the inputDate, hiding some> suggests.>That is a bug in the IE, the fix is to plug an iframe under the panel... has to be fixed on the _javascript_ side.Hm.  Curious.  Are you using the latest version of the component?  Sean committed a fix that I implemented for this a while ago, though it's possible it's still buggy.  The _javascript_ code *should* detect that you're using IE and, if so, render an iframe in between the panel and anything under it.Can you do a View Source on the rendered page, and look for _javascript_ code that looks like it should generate an iframe with an id ending in the string "Shim"?  If it's there, could you check the z-index of the rendered inputDate component?  If the iframe's not there, or is there but not rendering, you're either using an old version of the code, or there's a bug I don't know about.  If it's there and rendering, but you're still seeing that behavior, I may need to tweak the z-index calculations.  Please let me know, as I don't have time at the moment to test it myself.-Matt

RE: Searching for popup example

2005-08-24 Thread CONNER, BRENDAN \(SBCSI\)
See the book Core JavaServer Faces (Geary, Horstman), pp. 587 - 595 (in
the section: "How do I generate a popup window").

- Brendan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 24, 2005 6:28 AM
To: users@myfaces.apache.org
Subject: Searching for popup example


Hello,

does someone know where I can find a good example for a popup?


Thanks!
Shed

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



Spanish accents in Javascript

2005-08-24 Thread Enrique Medina
Hi,

I know this is not a question directly related with MyFaces, but does anybody knows how to solve this problem?

I define my literal strings in a properties file, and then I have
created a custom messages tag that renders the message as an alert of
_javascript_. So when a JSF message is generated, it is rendered as an
alert. My problem is with accents. For example, in the alert window the
text appears like:

"La fórmula es correcta"

while it should be:

"La fórmula es correcta"

Is it a matter of escaping the text in _javascript_? Because I have tried the escape() function but with no success...



Re: Button & Not Submitting

2005-08-24 Thread Enrique Medina
So easy, so effective!

Thanks, Zhong2005/8/24, Zhong Li <[EMAIL PROTECTED]>:
add attribute type="button"On 8/24/05, Enrique Medina <
[EMAIL PROTECTED]> wrote:
Hi,

How can a button be rendered so when the user clicks it, the form doesn't get submitted?

I mean:


     false;" />







AW: AW: problem with JSCookMenu

2005-08-24 Thread Stefan Gesigora
Thanks Helmut for your description!
But I can't take the web.xml of the simple example cause I'm using Sun JSF with 
MyFaces Extension!!
I've tried to put some elements of the web.xml of the simple example to my 
web.xml:

org.apache.myfaces.ALLOW_JAVASCRIPT
org.apache.myfaces.DETECT_JAVASCRIPT
org.apache.myfaces.PRETTY_HTML
org.apache.myfaces.AUTO_SCROLL

But no jscookmenu were shown (with the nightly build and the modified web.xml!)

Any suggestions?

Stefan Gesigora


-Ursprüngliche Nachricht-
Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 24. August 2005 15:08
An: MyFaces Discussion
Betreff: Re: AW: problem with JSCookMenu

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

yes that means you didnt install jscookmenu correct.

i told you before that you can define it in the head and so on but when
you install the jscookmenu correctly then all works fine.

Here again how i did it (i hope i make no mistakes)

first: look at your web.xml (take the web.xml from the simple example)
second: get the nightly build because of the submenu bug.

and jscookmenu is ready =)

again no declaration in the head, except you want to make your personal
themes then you must declar them.


@stefan just look at your web.xml and faces-config if all is ok and
remove the javascript from the head.

@henri thx for help

Stefan Gesigora wrote:
> Hi!
> 
> After downloading the nightly build my submenus were shown! 
> It seems to be an big bug in myfaces 1.0.9!
> 
> BUT in my submenus before and after each entry an broken image (x) were 
> shown. How can I disable this attitude?
> 
> Greetings 
> Stefan Gesigora
> 
> -Ursprüngliche Nachricht-
> Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 24. August 2005 14:06
> An: MyFaces Discussion
> Betreff: Re: problem with JSCookMenu
> 
> Henri,
> 
> maybe you could help me with my link problem. why my links open a new
> browser? i wrote the problem in the thread "JSCookMenu Problems with
> Themes and with Action".
> 
> thx
> 
> Delbrouck, Henri-Philippe wrote:
> 
>>>Your code seems ok.
>>>
>>>In my code, I directly work with array. Perhaps you should try.
>>>
>>>My backing bean is defined like this:
>>>
>>>public class MyMenu{
>>> private NavigationMenuItem[] navItems;
>>>
>>> public MyMenu{
>>> NavigationMenuItem[] subItems1 = new NavigationMenuItem[3];
>>>
>>> NavigationMenuItem fileMenu = new
>>>NavigationMenuItem(this,"File","",false,true,"action",null,false);
>>>
>>> subItems1[0] = new
>>>NavigationMenuItem(this,"test1","test1",false,true,"action1",null,false);
>>> subItems1[1] = new
>>>NavigationMenuItem(this,"test2","test2",false,true,"action2",null,false);
>>> subItems1[2] = new
>>>NavigationMenuItem(this,"test3","test3",false,true,"action3",null,false);
>>>
>>> 
>>> fileMenu.setNavigationMenuItems(subItems1);
>>>
>>> }
>>>
>>> public NavigationMenuItem[] getNavItems(){
>>> return navItems;
>>> }
>>> 
>>> public void setNavItems(NavigationMenuItem[] navItems){
>>> this.navItems = navItems;
>>> }
>>>}
>>>
>>>Hope this help
>>>
>>>Henri-Philippe
>>>
>>>-Original Message-
>>>From: Stefan Gesigora [mailto:[EMAIL PROTECTED] 
>>>Sent: mercredi 24 août 2005 13:07
>>>To: MyFaces Discussion
>>>Subject: AW: problem with JSCookMenu
>>>
>>>
>>>
>>>Hi!
>>>
>>>Thanks for the hints!!
>>>
>>>I tried like Helmut told me. Now I can see the first level of the menu but
>>>the submenus weren't shown...
>>>Here's my code.
>>>Any ideas?
>>>
>>>Thanks Stefan Gesigora
>>>
>>>public List getMenu() {
>>>
>>>List menu = new ArrayList(); 
>>>NavigationMenuItem incident = new NavigationMenuItem("Incident", "action1",
>>>null,false);
>>>NavigationMenuItem phases = new NavigationMenuItem("Phases", "action2",
>>>null,false);
>>>NavigationMenuItem factories = new NavigationMenuItem("Factories ",
>>>"action3", null,false);
>>>
>>>List testSub = new ArrayList();
>>>testSub.add(new NavigationMenuItem("Development",
>>>"action10", null, false));
>>>testSub.add(new NavigationMenuItem("Consultancy",
>>>"action11", null, false));
>>>testSub.add(new NavigationMenuItem("Services",
>>>"action12", null, false));
>>>
>>>NavigationMenuItem[] testSubArray =
>>>(NavigationMenuItem[])testSub.toArray(new NavigationMenuItem[0]);
>>>
>>>menu.add(incident);  
>>>menu.add(phases); 
>>>menu.add(factories);
>>>
>>>((NavigationMenuItem)menu.get(1)).setNavigationMenuItems(testSubArray);
>>>
>>>return menu;
>>>}
>>>
>>>
>>> 
>>>
>>>
>>>
>>>-Ursprüngliche Nachricht-
>>>Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
>>>Gesendet: Mittwoch, 24. August 2005 12:31
>>>An: MyFaces Discussion
>>>Betreff: Re: problem with JSCookMenu
>>>
>>>hi,
>>>
>>>i only see jscookmenu when i declare the script in the h

Re: Button & Not Submitting

2005-08-24 Thread Zhong Li
add attribute type="button"On 8/24/05, Enrique Medina <[EMAIL PROTECTED]> wrote:
Hi,

How can a button be rendered so when the user clicks it, the form doesn't get submitted?

I mean:


     false;" />





Re: RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Matt Blum
Yep, that's exactly what I was talking about.  Could you check the
z-index of the rendered inputDate component, please, and let me know
what it is?

-MattOn 8/24/05, Clément Maignien <[EMAIL PROTECTED]> wrote:







I use the 
myfaces-20050802 nightly build. Do I should try with a more recent one 
?
 
Here is what I found 
in the source code (it looks like what you've talk about, no ?) : 

 
if 
(navigator.appVersion.toLowerCase().indexOf('msie') != -1 && 
navigator.userAgent.toLowerCase().indexOf('opera') == 
-1)document.writeln('');
 
 
Thanks for youe help 
Matt.
Clément

  
  -Message d'origine-De : Matt Blum 
  [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 24 août 2005 
  15:50À : MyFaces Discussion; 
  [EMAIL PROTECTED]Objet : Re: RE : inputSuggest : some others 
  improvement to do
  On 8/24/05, Werner 
  Punz <[EMAIL PROTECTED]> wrote:
  Clément 
Maignien wrote:> 1- I have a small JSF page 
with an s:inputSuggest component and an> 
t:inputDate component under it.> When 
clicking inside the inputSuggest a dropdown box open 
and> displays firsts suggests. The problem is 
that under IE (not Firefox)> the dropdown-box 
is displayed behind the inputDate, hiding 
some> suggests.>That is a bug in 
the IE, the fix is to plug an iframe under the panel... has to be fixed 
on the _javascript_ side.Hm.  Curious.  
  Are you using the latest version of the component?  Sean committed a fix 
  that I implemented for this a while ago, though it's possible it's still 
  buggy.  The _javascript_ code *should* detect that you're using IE and, if 
  so, render an iframe in between the panel and anything under it.Can 
  you do a View Source on the rendered page, and look for _javascript_ code that 
  looks like it should generate an iframe with an id ending in the string 
  "Shim"?  If it's there, could you check the z-index of the rendered 
  inputDate component?  If the iframe's not there, or is there but not 
  rendering, you're either using an old version of the code, or there's a bug I 
  don't know about.  If it's there and rendering, but you're still seeing 
  that behavior, I may need to tweak the z-index calculations.  Please let 
  me know, as I don't have time at the moment to test it 
  myself.-Matt




Button & Not Submitting

2005-08-24 Thread Enrique Medina
Hi,

How can a button be rendered so when the user clicks it, the form doesn't get submitted?

I mean:


     false;" />



Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Rick Reumann
On 8/23/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote:
As another alternative, the practice we've been following is to have anXyzAction class and a separate XyzBean class.  The Action class has amanaged reference to the Bean class and has all the logic in it.  The
Bean class is just a straight JavaBean and contains all the data neededby the JSF page.

Are you stating to register both as managed beans? Currently I do have
two separate classes (XyzAction and XyzBean, but XyzBean is nested
inside the backing bean XyzAction). Using the approach above my
question is best illustrated by an example...

In XyzAaction:

XyzBean getXyz  {
  return backendDelegate.getXyz();
}
 My question is how do I now refrence XyzBean from the JSP
(using your separate managed bean approach)?  If I do
xyz.name  how is it pulling the reference to getXyz? In other
words, even if I set XyzBean as a managed request scope bean how would
this bean have gotten set from the XyzAction in order to be available
on the page? I'm used to typical webapps where I stick stuff into the
request from servlets (actions in struts). In this scenario above I
have not idea how a separate managed XyzBean will be populated from a
totally separate managed bean?

Can someone provide a concrete example of this usage? I'd love to see a demo app with this approach. thanks.


Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Rick Reumann
On 8/24/05, Sean Schofield <[EMAIL PROTECTED]> wrote:
You could also use a facade pattern.  We have one in our Struts appand we're planning on keeping the facade when we move to JSF.Before you had ...Facade::getInvoiceInvoiceForm::setInvoice, etc.
InvoiceAction::executeNow you have ..Facade::getInvoiceInvoiceBacker::getInvoice

I'm a bit confused about what you mean in the above. Are you
registering more than one managed bean in reference to an Invoice? My
concern is that "getInovice" can either mean 'perform some business
action to retrieve an invoice (maybe based on an id) OR "getInvoice"
can me simply get the "existing reference to an invoice for use on a
form." I'm not sure how your facade pattern here addresses the issue.

I think I'm going to try the "getInvoiceAction" "getInvoice" and use
one backing bean with an InvoiceVO nested inside although I like
the idea of keeping the backing bean and vo as separate managed beans.
I don't really know enough about how managed beans work in order to
accomplish this later approach. I'll ask my question in reply to that
e-mail vs asking it here.



RE : RE : RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Clément Maignien
Title: Message



Thx 
Matt for helping me :D
Clément

  
  -Message d'origine-De : Matt Blum 
  [mailto:[EMAIL PROTECTED] Envoyé : mercredi 24 août 2005 
  15:56À : MyFaces DiscussionObjet : Re: RE : RE 
  : RE : inputSuggest : some others improvement to doThat's 
  very odd.  I can understand there being a stylesheet bug, but I can't see 
  why the two pages wouldn't have the same bug on them.  I'll look into it 
  when I get a chance, but I'm really busy at work and at home right now, and 
  may not be able to until the weekend.-Matt
  On 8/24/05, Clément 
  Maignien <[EMAIL PROTECTED]> 
  wrote:
  This 
#2 behaviour happends with Firefox but not with IE ... True. But it is quite 
strange that the 2 pages do not render the same way.inputSuggest 
component + browsers issue ???-Message d'origine-De : 
Clément MaignienEnvoyé : mercredi 24 août 2005 14:19À : MyFaces 
Discussion; [EMAIL PROTECTED]Objet : RE : 
RE : inputSuggest : some others improvement to doBack to the #2 
problem : not sure it is a browser issue because I have the same 
inputSuggest component in 2 of my webapp pages, filled the same way (same 
number of items into), and the "white space" appears only in 1 of them ... 
Very wierd behaviour.Clément-Message 
d'origine-De : Werner Punz [mailto:[EMAIL PROTECTED]]Envoyé : mercredi 24 août 
2005 12:21À : users@myfaces.apache.orgObjet 
: Re: RE : inputSuggest : some others improvement to doClément 
Maignien wrote:> Hummm, sorry, the #2 issue is a mistake : I have 
another page with an> inputSuggest with many items into 
and  the white space isn't there. So > I'm asking why it is 
displayed on my other page and disappier when I> don't add the 
inputSuggest in the page ... wierd ...>Probably an issue within 
the browser, see below> Bye,> 
Clément.>> -Message 
d'origine-> *De :* Clément 
Maignien> *Envoyé :* mercredi 24 août 2005 
10:37> *À :* MyFaces 
Discussion> *Objet :* s:inputSuggest : some 
others improvement to do >> I've 
noticed some more improvements to make on this sandbox 
component.> I don't know if they really comes 
from the component itself but I> here they 
are :>> 1- I have a small JSF page 
with an s:inputSuggest component and an > 
t:inputDate component under it.> When 
clicking inside the inputSuggest a dropdown box open 
and> displays firsts suggests. The problem is 
that under IE (not Firefox)> the dropdown-box 
is displayed behind the inputDate, hiding some 
> suggests.>That is a bug in the 
IE, the fix is to plug an iframe under the panel... has to be fixed on the 
_javascript_ side.> 2- It also 
seems that under Firefox (not IE), the page vertical 
> lenght is increased depending on the number 
of items in the> inputSuggest. A white space 
is displayed under the last element of> the 
page. In my case I try to avoid the use of the page scroller in 
> my webapp pages, and now there is a 
scroller displayed because of> this big white 
space.>> Are those problems come from 
the browsers or the component> implementation 
?>both problems are browser specific and have to be targetted 
at the_javascript_ 
level.


RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Clément Maignien
Title: Message



I use the 
myfaces-20050802 nightly build. Do I should try with a more recent one 
?
 
Here is what I found 
in the source code (it looks like what you've talk about, no ?) : 

 
if 
(navigator.appVersion.toLowerCase().indexOf('msie') != -1 && 
navigator.userAgent.toLowerCase().indexOf('opera') == 
-1)document.writeln('');
 
 
Thanks for youe help 
Matt.
Clément

  
  -Message d'origine-De : Matt Blum 
  [mailto:[EMAIL PROTECTED] Envoyé : mercredi 24 août 2005 
  15:50À : MyFaces Discussion; 
  [EMAIL PROTECTED]Objet : Re: RE : inputSuggest : some others 
  improvement to do
  On 8/24/05, Werner 
  Punz <[EMAIL PROTECTED]> wrote:
  Clément 
Maignien wrote:> 1- I have a small JSF page 
with an s:inputSuggest component and an> 
t:inputDate component under it.> When 
clicking inside the inputSuggest a dropdown box open 
and> displays firsts suggests. The problem is 
that under IE (not Firefox)> the dropdown-box 
is displayed behind the inputDate, hiding 
some> suggests.>That is a bug in 
the IE, the fix is to plug an iframe under the panel... has to be fixed 
on the _javascript_ side.Hm.  Curious.  
  Are you using the latest version of the component?  Sean committed a fix 
  that I implemented for this a while ago, though it's possible it's still 
  buggy.  The _javascript_ code *should* detect that you're using IE and, if 
  so, render an iframe in between the panel and anything under it.Can 
  you do a View Source on the rendered page, and look for _javascript_ code that 
  looks like it should generate an iframe with an id ending in the string 
  "Shim"?  If it's there, could you check the z-index of the rendered 
  inputDate component?  If the iframe's not there, or is there but not 
  rendering, you're either using an old version of the code, or there's a bug I 
  don't know about.  If it's there and rendering, but you're still seeing 
  that behavior, I may need to tweak the z-index calculations.  Please let 
  me know, as I don't have time at the moment to test it 
  myself.-Matt


Re: RE : inputSuggest : some others improvement to do

2005-08-24 Thread Matt Blum
Oh, I know that other browsers don't like the iframe fix, and of course
it's unnecessary extra code for browsers other than IE anyway.  My
_javascript_ code *should* as I say detect that you're using IE (it
checks navigator.appVersion, and even makes sure you're not using Opera
masquerading as IE), but of course there could very well be a bug I
didn't find in my testing.

-MattOn 8/24/05, Werner Punz <[EMAIL PROTECTED]> wrote:
Matt Blum wrote:>>> On 8/24/05, *Werner Punz* <[EMAIL PROTECTED] [EMAIL PROTECTED]>> wrote:>> Clément Maignien wrote:
>  > 1- I have a small JSF page with an s:inputSuggest component> and an>  > t:inputDate component under it.>  >
When clicking inside the inputSuggest a dropdown box open and>  > displays firsts suggests. The problem is that under IE (not> Firefox)>  >
the dropdown-box is displayed behind the inputDate, hiding some>  > suggests.>  >> That is a bug in the IE, the fix is to plug an iframe under the> panel...> has to be fixed on the _javascript_ side.
>>> Hm.  Curious.  Are you using the latest version of the component?  Sean> committed a fix that I implemented for this a while ago, though it's> possible it's still buggy.  The _javascript_ code *should* detect that
> you're using IE and, if so, render an iframe in between the panel and> anything under it.>Ahem given the hard experiences I had with the jsf-comp _javascript_s, Imight say, you even have to detect the ie for the iframe fix, the
problem is that gecko goes haywire if you apply the fix to several geckoengines, it simply refuses to scroll some parts of the page, althoughthe iframe did have a size of zero on location 0,0.Those weird inconsistencies did cost me almost a man day of trying...



Re: RE : inputSuggest : some others improvement to do

2005-08-24 Thread Werner Punz

Matt Blum wrote:



On 8/24/05, *Werner Punz* <[EMAIL PROTECTED] > wrote:

Clément Maignien wrote:
 > 1- I have a small JSF page with an s:inputSuggest component
and an
 > t:inputDate component under it.
 > When clicking inside the inputSuggest a dropdown box open and
 > displays firsts suggests. The problem is that under IE (not
Firefox)
 > the dropdown-box is displayed behind the inputDate, hiding some
 > suggests.
 >
That is a bug in the IE, the fix is to plug an iframe under the
panel...
has to be fixed on the javascript side.


Hm.  Curious.  Are you using the latest version of the component?  Sean 
committed a fix that I implemented for this a while ago, though it's 
possible it's still buggy.  The Javascript code *should* detect that 
you're using IE and, if so, render an iframe in between the panel and 
anything under it.




Ahem given the hard experiences I had with the jsf-comp javascripts, I 
might say, you even have to detect the ie for the iframe fix, the 
problem is that gecko goes haywire if you apply the fix to several gecko 
engines, it simply refuses to scroll some parts of the page, although 
the iframe did have a size of zero on location 0,0.


Those weird inconsistencies did cost me almost a man day of trying...



Re: RE : RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Werner Punz

Since I do not know the code from the official inputsuggest, but can
revert bug #1 definitely to a known issue with the IE engine
(fixed that one myself on the ajax jsf-comp input suggest which had the 
same issue)


I would say you file an official jira bugreport, and add
the note, that #1 is the ie div over selectbox bug as note to it
and that the fix is to put an iframe under the div via the z-order...

werner

Clément Maignien wrote:

This #2 behaviour happends with Firefox but not with IE ... True. But it is 
quite strange that the 2 pages do not render the same way.

inputSuggest component + browsers issue ???





Re: RE : RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Matt Blum
That's very odd.  I can understand there being a stylesheet bug,
but I can't see why the two pages wouldn't have the same bug on
them.  I'll look into it when I get a chance, but I'm really busy
at work and at home right now, and may not be able to until the weekend.

-MattOn 8/24/05, Clément Maignien <[EMAIL PROTECTED]> wrote:
This
#2 behaviour happends with Firefox but not with IE ... True. But it is
quite strange that the 2 pages do not render the same way.inputSuggest component + browsers issue ???-Message d'origine-De : Clément MaignienEnvoyé : mercredi 24 août 2005 14:19À : MyFaces Discussion; 
[EMAIL PROTECTED]Objet : RE : RE : inputSuggest : some others improvement to doBack
to the #2 problem : not sure it is a browser issue because I have the
same inputSuggest component in 2 of my webapp pages, filled the same
way (same number of items into), and the "white space" appears only in
1 of them ... Very wierd behaviour.Clément-Message d'origine-De : Werner Punz [mailto:[EMAIL PROTECTED]]Envoyé : mercredi 24 août 2005 12:21À : 
users@myfaces.apache.orgObjet : Re: RE : inputSuggest : some others improvement to doClément Maignien wrote:> Hummm, sorry, the #2 issue is a mistake : I have another page with an> inputSuggest with many items into and  the white space isn't there. So
> I'm asking why it is displayed on my other page and disappier when I> don't add the inputSuggest in the page ... wierd ...>Probably an issue within the browser, see below> Bye,
> Clément.>> -Message d'origine-> *De :* Clément Maignien> *Envoyé :* mercredi 24 août 2005 10:37> *À :* MyFaces Discussion> *Objet :* s:inputSuggest : some others improvement to do
>> I've noticed some more improvements to make on this sandbox component.> I don't know if they really comes from the component itself but I> here they are :>> 1- I have a small JSF page with an s:inputSuggest component and an
> t:inputDate component under it.> When clicking inside the inputSuggest a dropdown box open and> displays firsts suggests. The problem is that under IE (not Firefox)> the dropdown-box is displayed behind the inputDate, hiding some
> suggests.>That is a bug in the IE, the fix is to plug an iframe under the panel... has to be fixed on the _javascript_ side.> 2- It also seems that under Firefox (not IE), the page vertical
> lenght is increased depending on the number of items in the> inputSuggest. A white space is displayed under the last element of> the page. In my case I try to avoid the use of the page scroller in
> my webapp pages, and now there is a scroller displayed because of> this big white space.>> Are those problems come from the browsers or the component> implementation ?
>both problems are browser specific and have to be targetted at the_javascript_ level.


Re: RE : inputSuggest : some others improvement to do

2005-08-24 Thread Matt Blum
On 8/24/05, Werner Punz <[EMAIL PROTECTED]> wrote:
Clément Maignien wrote:> 1- I have a small JSF page with an s:inputSuggest component and an> t:inputDate component under it.> When clicking inside the inputSuggest a dropdown box open and
> displays firsts suggests. The problem is that under IE (not Firefox)> the dropdown-box is displayed behind the inputDate, hiding some> suggests.>That is a bug in the IE, the fix is to plug an iframe under the panel...
has to be fixed on the _javascript_ side.

Hm.  Curious.  Are you using the latest version of the
component?  Sean committed a fix that I implemented for this a
while ago, though it's possible it's still buggy.  The _javascript_
code *should* detect that you're using IE and, if so, render an iframe
in between the panel and anything under it.

Can you do a View Source on the rendered page, and look for _javascript_
code that looks like it should generate an iframe with an id ending in
the string "Shim"?  If it's there, could you check the z-index of
the rendered inputDate component?  If the iframe's not there, or
is there but not rendering, you're either using an old version of the
code, or there's a bug I don't know about.  If it's there and
rendering, but you're still seeing that behavior, I may need to tweak
the z-index calculations.  Please let me know, as I don't have
time at the moment to test it myself.

-Matt



selectManyCheckBox - remark

2005-08-24 Thread Maxence Dewil








Hi,

 

I noticed something with the selectManyCheckbox
(nightly build)

 

the model for my selectManyCheckbox: 

List educations;

List selectedEducations;

 

I made a mistake in my backing bean: I put an Integer
object in the SelectItem.value field instead of a String.

My selections were never applied and without any
exception thrown. 

But with the selectManyListbox, a converter exception
is thrown..

 

Max.








Re: AW: problem with JSCookMenu

2005-08-24 Thread Helmut Juskewycz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

yes that means you didnt install jscookmenu correct.

i told you before that you can define it in the head and so on but when
you install the jscookmenu correctly then all works fine.

Here again how i did it (i hope i make no mistakes)

first: look at your web.xml (take the web.xml from the simple example)
second: get the nightly build because of the submenu bug.

and jscookmenu is ready =)

again no declaration in the head, except you want to make your personal
themes then you must declar them.


@stefan just look at your web.xml and faces-config if all is ok and
remove the javascript from the head.

@henri thx for help

Stefan Gesigora wrote:
> Hi!
> 
> After downloading the nightly build my submenus were shown! 
> It seems to be an big bug in myfaces 1.0.9!
> 
> BUT in my submenus before and after each entry an broken image (x) were 
> shown. How can I disable this attitude?
> 
> Greetings 
> Stefan Gesigora
> 
> -Ursprüngliche Nachricht-
> Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 24. August 2005 14:06
> An: MyFaces Discussion
> Betreff: Re: problem with JSCookMenu
> 
> Henri,
> 
> maybe you could help me with my link problem. why my links open a new
> browser? i wrote the problem in the thread "JSCookMenu Problems with
> Themes and with Action".
> 
> thx
> 
> Delbrouck, Henri-Philippe wrote:
> 
>>>Your code seems ok.
>>>
>>>In my code, I directly work with array. Perhaps you should try.
>>>
>>>My backing bean is defined like this:
>>>
>>>public class MyMenu{
>>> private NavigationMenuItem[] navItems;
>>>
>>> public MyMenu{
>>> NavigationMenuItem[] subItems1 = new NavigationMenuItem[3];
>>>
>>> NavigationMenuItem fileMenu = new
>>>NavigationMenuItem(this,"File","",false,true,"action",null,false);
>>>
>>> subItems1[0] = new
>>>NavigationMenuItem(this,"test1","test1",false,true,"action1",null,false);
>>> subItems1[1] = new
>>>NavigationMenuItem(this,"test2","test2",false,true,"action2",null,false);
>>> subItems1[2] = new
>>>NavigationMenuItem(this,"test3","test3",false,true,"action3",null,false);
>>>
>>> 
>>> fileMenu.setNavigationMenuItems(subItems1);
>>>
>>> }
>>>
>>> public NavigationMenuItem[] getNavItems(){
>>> return navItems;
>>> }
>>> 
>>> public void setNavItems(NavigationMenuItem[] navItems){
>>> this.navItems = navItems;
>>> }
>>>}
>>>
>>>Hope this help
>>>
>>>Henri-Philippe
>>>
>>>-Original Message-
>>>From: Stefan Gesigora [mailto:[EMAIL PROTECTED] 
>>>Sent: mercredi 24 août 2005 13:07
>>>To: MyFaces Discussion
>>>Subject: AW: problem with JSCookMenu
>>>
>>>
>>>
>>>Hi!
>>>
>>>Thanks for the hints!!
>>>
>>>I tried like Helmut told me. Now I can see the first level of the menu but
>>>the submenus weren't shown...
>>>Here's my code.
>>>Any ideas?
>>>
>>>Thanks Stefan Gesigora
>>>
>>>public List getMenu() {
>>>
>>>List menu = new ArrayList(); 
>>>NavigationMenuItem incident = new NavigationMenuItem("Incident", "action1",
>>>null,false);
>>>NavigationMenuItem phases = new NavigationMenuItem("Phases", "action2",
>>>null,false);
>>>NavigationMenuItem factories = new NavigationMenuItem("Factories ",
>>>"action3", null,false);
>>>
>>>List testSub = new ArrayList();
>>>testSub.add(new NavigationMenuItem("Development",
>>>"action10", null, false));
>>>testSub.add(new NavigationMenuItem("Consultancy",
>>>"action11", null, false));
>>>testSub.add(new NavigationMenuItem("Services",
>>>"action12", null, false));
>>>
>>>NavigationMenuItem[] testSubArray =
>>>(NavigationMenuItem[])testSub.toArray(new NavigationMenuItem[0]);
>>>
>>>menu.add(incident);  
>>>menu.add(phases); 
>>>menu.add(factories);
>>>
>>>((NavigationMenuItem)menu.get(1)).setNavigationMenuItems(testSubArray);
>>>
>>>return menu;
>>>}
>>>
>>>
>>> 
>>>
>>>
>>>
>>>-Ursprüngliche Nachricht-
>>>Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
>>>Gesendet: Mittwoch, 24. August 2005 12:31
>>>An: MyFaces Discussion
>>>Betreff: Re: problem with JSCookMenu
>>>
>>>hi,
>>>
>>>i only see jscookmenu when i declare the script in the head otherwise i
>>>see nothing. also on http://myfaces.apache.org/tomahawk/jscookmenu.html
>>>it says that the declaration should stand in the head.
>>>
>>>i now use the t:tag but i see no difference.
>>>
>>>in my web.xml there are no extension filter, so it should be the default
>>> config?
>>>
>>>and by the way thanks for help =) maybe u could look also at my problem
>>>with the link (i wrote today and yesterday in the list).
>>>
>>>Delbrouck, Henri-Philippe wrote:
>>>
>>>
>Hello,
>
>If you use the JSCookMenu tag, and correctly configure the extension
>>>
>>>filter
>>>
>>>
>(default config) in the web.xml, you don't need to define any Javas

Re: problem with JSCookMenu

2005-08-24 Thread Helmut Juskewycz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

so now it works

it was the web.xml the extension filter. now all works correct, for
beginner jscookmenu is really not easy to understand

Delbrouck, Henri-Philippe wrote:
> Did you correctly define the action and the navigation in faces-config.xml ?
> 
> Let me see your source.
> 
> -Original Message-
> From: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
> Sent: mercredi 24 août 2005 14:06
> To: MyFaces Discussion
> Subject: Re: problem with JSCookMenu
> 
> 
> Henri,
> 
> maybe you could help me with my link problem. why my links open a new
> browser? i wrote the problem in the thread "JSCookMenu Problems with
> Themes and with Action".
> 
> thx
> 
> Delbrouck, Henri-Philippe wrote:
> 
>>>Your code seems ok.
>>>
>>>In my code, I directly work with array. Perhaps you should try.
>>>
>>>My backing bean is defined like this:
>>>
>>>public class MyMenu{
>>> private NavigationMenuItem[] navItems;
>>>
>>> public MyMenu{
>>> NavigationMenuItem[] subItems1 = new NavigationMenuItem[3];
>>>
>>> NavigationMenuItem fileMenu = new
>>>NavigationMenuItem(this,"File","",false,true,"action",null,false);
>>>
>>> subItems1[0] = new
>>>NavigationMenuItem(this,"test1","test1",false,true,"action1",null,false);
>>> subItems1[1] = new
>>>NavigationMenuItem(this,"test2","test2",false,true,"action2",null,false);
>>> subItems1[2] = new
>>>NavigationMenuItem(this,"test3","test3",false,true,"action3",null,false);
>>>
>>> 
>>> fileMenu.setNavigationMenuItems(subItems1);
>>>
>>> }
>>>
>>> public NavigationMenuItem[] getNavItems(){
>>> return navItems;
>>> }
>>> 
>>> public void setNavItems(NavigationMenuItem[] navItems){
>>> this.navItems = navItems;
>>> }
>>>}
>>>
>>>Hope this help
>>>
>>>Henri-Philippe
>>>
>>>-Original Message-
>>>From: Stefan Gesigora [mailto:[EMAIL PROTECTED] 
>>>Sent: mercredi 24 août 2005 13:07
>>>To: MyFaces Discussion
>>>Subject: AW: problem with JSCookMenu
>>>
>>>
>>>
>>>Hi!
>>>
>>>Thanks for the hints!!
>>>
>>>I tried like Helmut told me. Now I can see the first level of the menu but
>>>the submenus weren't shown...
>>>Here's my code.
>>>Any ideas?
>>>
>>>Thanks Stefan Gesigora
>>>
>>>public List getMenu() {
>>>
>>>List menu = new ArrayList(); 
>>>NavigationMenuItem incident = new NavigationMenuItem("Incident",
> 
> "action1",
> 
>>>null,false);
>>>NavigationMenuItem phases = new NavigationMenuItem("Phases", "action2",
>>>null,false);
>>>NavigationMenuItem factories = new NavigationMenuItem("Factories ",
>>>"action3", null,false);
>>>
>>>List testSub = new ArrayList();
>>>testSub.add(new NavigationMenuItem("Development",
>>>"action10", null, false));
>>>testSub.add(new NavigationMenuItem("Consultancy",
>>>"action11", null, false));
>>>testSub.add(new NavigationMenuItem("Services",
>>>"action12", null, false));
>>>
>>>NavigationMenuItem[] testSubArray =
>>>(NavigationMenuItem[])testSub.toArray(new NavigationMenuItem[0]);
>>>
>>>menu.add(incident);  
>>>menu.add(phases); 
>>>menu.add(factories);
>>>
>>>((NavigationMenuItem)menu.get(1)).setNavigationMenuItems(testSubArray);
>>>
>>>return menu;
>>>}
>>>
>>>
>>> 
>>>
>>>
>>>
>>>-Ursprüngliche Nachricht-
>>>Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
>>>Gesendet: Mittwoch, 24. August 2005 12:31
>>>An: MyFaces Discussion
>>>Betreff: Re: problem with JSCookMenu
>>>
>>>hi,
>>>
>>>i only see jscookmenu when i declare the script in the head otherwise i
>>>see nothing. also on http://myfaces.apache.org/tomahawk/jscookmenu.html
>>>it says that the declaration should stand in the head.
>>>
>>>i now use the t:tag but i see no difference.
>>>
>>>in my web.xml there are no extension filter, so it should be the default
>>> config?
>>>
>>>and by the way thanks for help =) maybe u could look also at my problem
>>>with the link (i wrote today and yesterday in the list).
>>>
>>>Delbrouck, Henri-Philippe wrote:
>>>
>>>
>Hello,
>
>If you use the JSCookMenu tag, and correctly configure the extension
>>>
>>>filter
>>>
>>>
>(default config) in the web.xml, you don't need to define any Javascript
>In your page. The corresponding file are automatically uploaded on the
>client and referenced in he page.
>As there is a bug in the 1.0.9 version, you have to download the latest
>nightly build where the bug is resolved.
>
>Have a look at the mail from Bruno Aranda (09 jun 2005). There is an
>>>
>>>exemple
>>>
>>>
>how to use the menu in a dynamic way. 
>
>If you download the latest nightly build, the extension are now in the
>tomahaw.jar. You should then use the prefix t.
>
>Hope this help.
>
>If still problem, please ask.
>
>Henri-Philippe Delbrouck
>
>-Orig

RE: problem with JSCookMenu

2005-08-24 Thread Delbrouck, Henri-Philippe
Did you correctly define the action and the navigation in faces-config.xml ?

Let me see your source.

-Original Message-
From: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
Sent: mercredi 24 août 2005 14:06
To: MyFaces Discussion
Subject: Re: problem with JSCookMenu


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Henri,

maybe you could help me with my link problem. why my links open a new
browser? i wrote the problem in the thread "JSCookMenu Problems with
Themes and with Action".

thx

Delbrouck, Henri-Philippe wrote:
> Your code seems ok.
> 
> In my code, I directly work with array. Perhaps you should try.
> 
> My backing bean is defined like this:
> 
> public class MyMenu{
>   private NavigationMenuItem[] navItems;
> 
>   public MyMenu{
>   NavigationMenuItem[] subItems1 = new NavigationMenuItem[3];
> 
>   NavigationMenuItem fileMenu = new
> NavigationMenuItem(this,"File","",false,true,"action",null,false);
> 
>   subItems1[0] = new
> NavigationMenuItem(this,"test1","test1",false,true,"action1",null,false);
>   subItems1[1] = new
> NavigationMenuItem(this,"test2","test2",false,true,"action2",null,false);
>   subItems1[2] = new
> NavigationMenuItem(this,"test3","test3",false,true,"action3",null,false);
> 
>   
>   fileMenu.setNavigationMenuItems(subItems1);
> 
>   }
> 
>   public NavigationMenuItem[] getNavItems(){
>   return navItems;
>   }
>   
>   public void setNavItems(NavigationMenuItem[] navItems){
>   this.navItems = navItems;
>   }
> }
> 
> Hope this help
> 
> Henri-Philippe
> 
> -Original Message-
> From: Stefan Gesigora [mailto:[EMAIL PROTECTED] 
> Sent: mercredi 24 août 2005 13:07
> To: MyFaces Discussion
> Subject: AW: problem with JSCookMenu
> 
> 
> 
> Hi!
> 
> Thanks for the hints!!
> 
> I tried like Helmut told me. Now I can see the first level of the menu but
> the submenus weren't shown...
> Here's my code.
> Any ideas?
> 
> Thanks Stefan Gesigora
> 
> public List getMenu() {
> 
> List menu = new ArrayList(); 
> NavigationMenuItem incident = new NavigationMenuItem("Incident",
"action1",
> null,false);
> NavigationMenuItem phases = new NavigationMenuItem("Phases", "action2",
> null,false);
> NavigationMenuItem factories = new NavigationMenuItem("Factories ",
> "action3", null,false);
> 
> List testSub = new ArrayList();
> testSub.add(new NavigationMenuItem("Development",
> "action10", null, false));
> testSub.add(new NavigationMenuItem("Consultancy",
> "action11", null, false));
> testSub.add(new NavigationMenuItem("Services",
> "action12", null, false));
> 
> NavigationMenuItem[] testSubArray =
> (NavigationMenuItem[])testSub.toArray(new NavigationMenuItem[0]);
> 
> menu.add(incident);  
> menu.add(phases); 
> menu.add(factories);
> 
> ((NavigationMenuItem)menu.get(1)).setNavigationMenuItems(testSubArray);
> 
> return menu;
> }
> 
> 
>   
> 
> 
> 
> -Ursprüngliche Nachricht-
> Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 24. August 2005 12:31
> An: MyFaces Discussion
> Betreff: Re: problem with JSCookMenu
> 
> hi,
> 
> i only see jscookmenu when i declare the script in the head otherwise i
> see nothing. also on http://myfaces.apache.org/tomahawk/jscookmenu.html
> it says that the declaration should stand in the head.
> 
> i now use the t:tag but i see no difference.
> 
> in my web.xml there are no extension filter, so it should be the default
>  config?
> 
> and by the way thanks for help =) maybe u could look also at my problem
> with the link (i wrote today and yesterday in the list).
> 
> Delbrouck, Henri-Philippe wrote:
> 
>>>Hello,
>>>
>>>If you use the JSCookMenu tag, and correctly configure the extension
> 
> filter
> 
>>>(default config) in the web.xml, you don't need to define any Javascript
>>>In your page. The corresponding file are automatically uploaded on the
>>>client and referenced in he page.
>>>As there is a bug in the 1.0.9 version, you have to download the latest
>>>nightly build where the bug is resolved.
>>>
>>>Have a look at the mail from Bruno Aranda (09 jun 2005). There is an
> 
> exemple
> 
>>>how to use the menu in a dynamic way. 
>>>
>>>If you download the latest nightly build, the extension are now in the
>>>tomahaw.jar. You should then use the prefix t.
>>>
>>>Hope this help.
>>>
>>>If still problem, please ask.
>>>
>>>Henri-Philippe Delbrouck
>>>
>>>-Original Message-
>>>From: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
>>>Sent: mercredi 24 août 2005 11:09
>>>To: MyFaces Discussion
>>>Subject: Re: problem with JSCookMenu
>>>
>>>
>>>hi,
>>>
>>>u must add the following to the header:
>>>
>>>  
>>>  >>type="text/javascript">
>>>  >>src="jscookmenu/ThemePanel/theme.js">
>>>  >>type="text/css">
>>>
>>>
>>>
>>>optional: Get the late

AW: problem with JSCookMenu

2005-08-24 Thread Stefan Gesigora
Hi!

After downloading the nightly build my submenus were shown! 
It seems to be an big bug in myfaces 1.0.9!

BUT in my submenus before and after each entry an broken image (x) were shown. 
How can I disable this attitude?

Greetings 
Stefan Gesigora

-Ursprüngliche Nachricht-
Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 24. August 2005 14:06
An: MyFaces Discussion
Betreff: Re: problem with JSCookMenu

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Henri,

maybe you could help me with my link problem. why my links open a new
browser? i wrote the problem in the thread "JSCookMenu Problems with
Themes and with Action".

thx

Delbrouck, Henri-Philippe wrote:
> Your code seems ok.
> 
> In my code, I directly work with array. Perhaps you should try.
> 
> My backing bean is defined like this:
> 
> public class MyMenu{
>   private NavigationMenuItem[] navItems;
> 
>   public MyMenu{
>   NavigationMenuItem[] subItems1 = new NavigationMenuItem[3];
> 
>   NavigationMenuItem fileMenu = new
> NavigationMenuItem(this,"File","",false,true,"action",null,false);
> 
>   subItems1[0] = new
> NavigationMenuItem(this,"test1","test1",false,true,"action1",null,false);
>   subItems1[1] = new
> NavigationMenuItem(this,"test2","test2",false,true,"action2",null,false);
>   subItems1[2] = new
> NavigationMenuItem(this,"test3","test3",false,true,"action3",null,false);
> 
>   
>   fileMenu.setNavigationMenuItems(subItems1);
> 
>   }
> 
>   public NavigationMenuItem[] getNavItems(){
>   return navItems;
>   }
>   
>   public void setNavItems(NavigationMenuItem[] navItems){
>   this.navItems = navItems;
>   }
> }
> 
> Hope this help
> 
> Henri-Philippe
> 
> -Original Message-
> From: Stefan Gesigora [mailto:[EMAIL PROTECTED] 
> Sent: mercredi 24 août 2005 13:07
> To: MyFaces Discussion
> Subject: AW: problem with JSCookMenu
> 
> 
> 
> Hi!
> 
> Thanks for the hints!!
> 
> I tried like Helmut told me. Now I can see the first level of the menu but
> the submenus weren't shown...
> Here's my code.
> Any ideas?
> 
> Thanks Stefan Gesigora
> 
> public List getMenu() {
> 
> List menu = new ArrayList(); 
> NavigationMenuItem incident = new NavigationMenuItem("Incident", "action1",
> null,false);
> NavigationMenuItem phases = new NavigationMenuItem("Phases", "action2",
> null,false);
> NavigationMenuItem factories = new NavigationMenuItem("Factories ",
> "action3", null,false);
> 
> List testSub = new ArrayList();
> testSub.add(new NavigationMenuItem("Development",
> "action10", null, false));
> testSub.add(new NavigationMenuItem("Consultancy",
> "action11", null, false));
> testSub.add(new NavigationMenuItem("Services",
> "action12", null, false));
> 
> NavigationMenuItem[] testSubArray =
> (NavigationMenuItem[])testSub.toArray(new NavigationMenuItem[0]);
> 
> menu.add(incident);  
> menu.add(phases); 
> menu.add(factories);
> 
> ((NavigationMenuItem)menu.get(1)).setNavigationMenuItems(testSubArray);
> 
> return menu;
> }
> 
> 
>   
> 
> 
> 
> -Ursprüngliche Nachricht-
> Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 24. August 2005 12:31
> An: MyFaces Discussion
> Betreff: Re: problem with JSCookMenu
> 
> hi,
> 
> i only see jscookmenu when i declare the script in the head otherwise i
> see nothing. also on http://myfaces.apache.org/tomahawk/jscookmenu.html
> it says that the declaration should stand in the head.
> 
> i now use the t:tag but i see no difference.
> 
> in my web.xml there are no extension filter, so it should be the default
>  config?
> 
> and by the way thanks for help =) maybe u could look also at my problem
> with the link (i wrote today and yesterday in the list).
> 
> Delbrouck, Henri-Philippe wrote:
> 
>>>Hello,
>>>
>>>If you use the JSCookMenu tag, and correctly configure the extension
> 
> filter
> 
>>>(default config) in the web.xml, you don't need to define any Javascript
>>>In your page. The corresponding file are automatically uploaded on the
>>>client and referenced in he page.
>>>As there is a bug in the 1.0.9 version, you have to download the latest
>>>nightly build where the bug is resolved.
>>>
>>>Have a look at the mail from Bruno Aranda (09 jun 2005). There is an
> 
> exemple
> 
>>>how to use the menu in a dynamic way. 
>>>
>>>If you download the latest nightly build, the extension are now in the
>>>tomahaw.jar. You should then use the prefix t.
>>>
>>>Hope this help.
>>>
>>>If still problem, please ask.
>>>
>>>Henri-Philippe Delbrouck
>>>
>>>-Original Message-
>>>From: Helmut Juskewycz [mailto:[EMAIL PROTECTED] 
>>>Sent: mercredi 24 août 2005 11:09
>>>To: MyFaces Discussion
>>>Subject: Re: problem with JSCookMenu
>>>
>>>
>>>hi,
>>>
>>>u must add the following

Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Sean Schofield
You could also use a facade pattern.  We have one in our Struts app
and we're planning on keeping the facade when we move to JSF.

Before you had ...

Facade::getInvoice
InvoiceForm::setInvoice, etc.
InvoiceAction::execute

Now you have ..

Facade::getInvoice
InvoiceBacker::getInvoice

If the DAO logic, etc. is hidden behind a facade its resuable as is. 
That's another approach.   I'd be curious to know if anyone else uses
this.

sean


On 8/23/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote:
>  
> Yes, but we've found that, for us anyway, that allows better mixing and
> matching.  For example, we have a session-scoped UserBean that is used by
> all Actions, and some other beans that are shared between certain action
> classes but not others.  That way, our beans and action classes are pretty
> lean, and it's easy from a maintenance perspective to determine which data
> elements are relevant to which actions. 
>   
> But, as Martin Mentioned, JSF allows one to roll everything up into one huge
> class, disperse them out, or do something in between. 
>   
> For example, the one time that we do combine actions and data is in using
> the TreeBacker in Tree2, because that's when we do lazy fetches of data as
> the user is expanding the tree.  So, in that case, the action methods and
> data are tightly coupled and special purpose. 
>   
> - Brendan 
>  
>  
> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 23, 2005 4:24 PM
> To: MyFaces Discussion
> Subject: Re: confusion on best practices in regard to a VO in BackingBean
> 
> 
> 
>  
> On 8/23/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: 
> > As another alternative, the practice we've been following is to have an
> > XyzAction class and a separate XyzBean class.  The Action class has a
> > managed reference to the Bean class and has all the logic in it.  The
> > Bean class is just a straight JavaBean and contains all the data needed
> > by the JSF page.
>  
> 
> 
> In the above case wouldn't you need to end up registering both XyzAction and
> XyzBean as managed beans? It would seem like you would have to. I guess not
> a big deal, but you'd end up with double the number of typical backing
> beans.
> 
> -- 
> Rick


RE : RE : RE : inputSuggest : some others improvement to do

2005-08-24 Thread Clément Maignien
This #2 behaviour happends with Firefox but not with IE ... True. But it is 
quite strange that the 2 pages do not render the same way.

inputSuggest component + browsers issue ???

-Message d'origine-
De : Clément Maignien 
Envoyé : mercredi 24 août 2005 14:19
À : MyFaces Discussion; [EMAIL PROTECTED]
Objet : RE : RE : inputSuggest : some others improvement to do


Back to the #2 problem : not sure it is a browser issue because I have the same 
inputSuggest component in 2 of my webapp pages, filled the same way (same 
number of items into), and the "white space" appears only in 1 of them ... Very 
wierd behaviour.

Clément


-Message d'origine-
De : Werner Punz [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 24 août 2005 12:21
À : users@myfaces.apache.org
Objet : Re: RE : inputSuggest : some others improvement to do


Clément Maignien wrote:
> Hummm, sorry, the #2 issue is a mistake : I have another page with an 
> inputSuggest with many items into and  the white space isn't there. So 
> I'm asking why it is displayed on my other page and disappier when I 
> don't add the inputSuggest in the page ... wierd ...
>  
Probably an issue within the browser, see below


> Bye,
> Clément.
> 
> -Message d'origine-
> *De :* Clément Maignien
> *Envoyé :* mercredi 24 août 2005 10:37
> *À :* MyFaces Discussion
> *Objet :* s:inputSuggest : some others improvement to do
> 
> I've noticed some more improvements to make on this sandbox component.
> I don't know if they really comes from the component itself but I
> here they are :
>  
> 1- I have a small JSF page with an s:inputSuggest component and an
> t:inputDate component under it. 
> When clicking inside the inputSuggest a dropdown box open and
> displays firsts suggests. The problem is that under IE (not Firefox)
> the dropdown-box is displayed behind the inputDate, hiding some
> suggests.
>  
That is a bug in the IE, the fix is to plug an iframe under the panel... has to 
be fixed on the javascript side.



> 2- It also seems that under Firefox (not IE), the page vertical
> lenght is increased depending on the number of items in the
> inputSuggest. A white space is displayed under the last element of
> the page. In my case I try to avoid the use of the page scroller in
> my webapp pages, and now there is a scroller displayed because of
> this big white space.
>  
> Are those problems come from the browsers or the component
> implementation ?
>  

both problems are browser specific and have to be targetted at the 
javascript level.



  1   2   >