Re: Tomahawk and ajax4jsf - t:datascroller and sortheaders don't work

2006-10-25 Thread Aneesha Govil
Hi Yee,Thanks for trying to help. I asked the question on the ajax4jsf mailing list as well but did not get a response. I am a little short on time right now. I will let you know if/when I am able to try the approach and it works.
Thanks again.Regards,AneeshaOn 10/25/06, Yee CN <[EMAIL PROTECTED]> wrote:

***
Your mail has been scanned by InterScan MSS.
***



















I think you would have better chance of
getting an answer by asking in the ajax4jsf column. 

 

Maybe you can try the following –
enclose the dataTable and the dataScroller under a panelGroup, and have the ajax refresh the
panelGroup, so that both the dataTable and the dataScroller got refreshed
together.

 

Please let me know how you go with this. I
am in the process of evaluating a4j myself.

 

Best regards,

Yee

 









From: Aneesha Govil
[mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 25, 2006
1:02 PM
To: MyFaces
 Discussion
Subject: Re: Tomahawk and ajax4jsf
- t:datascroller and sortheaders don't work



 

Nope, I have dumped
ajax4jsf because I could not resolve this problem and couldn't get any help on
it. I am going to write my own ajax
wherever required.

Let me know if you find any resolutions though. 

Regards, 
Aneesha



On 10/25/06, ndnguy
<[EMAIL PROTECTED]>
wrote:


Were you able to figure out the issue? I am getting into a similar situation
with Ajax4Jsf and datascrollers.

Thanks,
Praveen.
--
View this message in context: 
http://www.nabble.com/Tomahawk-and-ajax4jsf---t%3Adatascroller-and-sortheaders-don%27t-work-tf2414555.html#a6982861
Sent from the MyFaces - Users mailing list archive at Nabble.com.



 










Re: Use MyFaces for file download

2006-10-25 Thread Matthias Wessendorf

yeah,

I suggest finishing that tutorial first, before doing a productive app.
The myfaces wiki has also good resources or links to them

jsfcentral.com might be interesting as well

Try to buy "The complete reference JavaServer Faces"
by Ed Burns (member of the guys that *create* JSF).

-M

On 10/25/06, ying lcs <[EMAIL PROTECTED]> wrote:

Should I do something like this:



describe in here:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFPage11.html


On 10/25/06, ying lcs <[EMAIL PROTECTED]> wrote:
> Matthias,
>
> Thanks for your link.
> Can you please help me understand what it means by 'You have to bind
> an action in the JSP to a method in your backing bean.'?
>
> Is there an example for that?
>
> Thanks again.
>
>
> On 10/25/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> > the myfaces wiki is a great source of already answered questions :)
> >
> > http://wiki.apache.org/myfaces/Sending_Files
> >
> >
> >
> > On 10/25/06, ying lcs <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I am trying to write a Java web app using JSF.
> > > I have a page which takes some info from user and it has a submit button.
> > > If the validation of the info entered by user is correct, the web app
> > > will send down a file.
> > >
> > > All the example I look at has navigation rule while navigate from one
> > > jsp to another. How can I send down a file instead of loading another
> > > jsp?
> > >
> > > Thank you.
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>




--
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com


Re: Use MyFaces for file download

2006-10-25 Thread Matthias Wessendorf

ying,

yes it means 

in java:

public String action()
{
...
}


On 10/25/06, ying lcs <[EMAIL PROTECTED]> wrote:

Matthias,

Thanks for your link.
Can you please help me understand what it means by 'You have to bind
an action in the JSP to a method in your backing bean.'?

Is there an example for that?

Thanks again.


On 10/25/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> the myfaces wiki is a great source of already answered questions :)
>
> http://wiki.apache.org/myfaces/Sending_Files
>
>
>
> On 10/25/06, ying lcs <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am trying to write a Java web app using JSF.
> > I have a page which takes some info from user and it has a submit button.
> > If the validation of the info entered by user is correct, the web app
> > will send down a file.
> >
> > All the example I look at has navigation rule while navigate from one
> > jsp to another. How can I send down a file instead of loading another
> > jsp?
> >
> > Thank you.
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>




--
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com


Re: Use MyFaces for file download

2006-10-25 Thread ying lcs

Should I do something like this:



describe in here:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFPage11.html


On 10/25/06, ying lcs <[EMAIL PROTECTED]> wrote:

Matthias,

Thanks for your link.
Can you please help me understand what it means by 'You have to bind
an action in the JSP to a method in your backing bean.'?

Is there an example for that?

Thanks again.


On 10/25/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> the myfaces wiki is a great source of already answered questions :)
>
> http://wiki.apache.org/myfaces/Sending_Files
>
>
>
> On 10/25/06, ying lcs <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am trying to write a Java web app using JSF.
> > I have a page which takes some info from user and it has a submit button.
> > If the validation of the info entered by user is correct, the web app
> > will send down a file.
> >
> > All the example I look at has navigation rule while navigate from one
> > jsp to another. How can I send down a file instead of loading another
> > jsp?
> >
> > Thank you.
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>



Re: Use MyFaces for file download

2006-10-25 Thread ying lcs

Matthias,

Thanks for your link.
Can you please help me understand what it means by 'You have to bind
an action in the JSP to a method in your backing bean.'?

Is there an example for that?

Thanks again.


On 10/25/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:

the myfaces wiki is a great source of already answered questions :)

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



On 10/25/06, ying lcs <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to write a Java web app using JSF.
> I have a page which takes some info from user and it has a submit button.
> If the validation of the info entered by user is correct, the web app
> will send down a file.
>
> All the example I look at has navigation rule while navigate from one
> jsp to another. How can I send down a file instead of loading another
> jsp?
>
> Thank you.
>


--
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com



Re: Use MyFaces for file download

2006-10-25 Thread Matthias Wessendorf

the myfaces wiki is a great source of already answered questions :)

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



On 10/25/06, ying lcs <[EMAIL PROTECTED]> wrote:

Hi,

I am trying to write a Java web app using JSF.
I have a page which takes some info from user and it has a submit button.
If the validation of the info entered by user is correct, the web app
will send down a file.

All the example I look at has navigation rule while navigate from one
jsp to another. How can I send down a file instead of loading another
jsp?

Thank you.




--
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com


Use MyFaces for file download

2006-10-25 Thread ying lcs

Hi,

I am trying to write a Java web app using JSF.
I have a page which takes some info from user and it has a submit button.
If the validation of the info entered by user is correct, the web app
will send down a file.

All the example I look at has navigation rule while navigate from one
jsp to another. How can I send down a file instead of loading another
jsp?

Thank you.


Re: calling authors

2006-10-25 Thread Matthias Wessendorf

I am writing one on Trinidad for the German Java Magazine,
maybe we can translate it later (deadline is december 20th or so)

(I know I need to send you the portlet article too :) )

-M

On 10/25/06, Kito D. Mann <[EMAIL PROTECTED]> wrote:

Hello,

I'm currently looking for people who are interested in writing great
articles for JSF Central about MyFaces, Tomahawk, Tobago, Trinidad, or
Shale. If you're interested, please reply!

~~~
Kito D. Mann ([EMAIL PROTECTED])
Author, JavaServer Faces in Action
http://www.virtua.com   - JSF/Java EE consulting,
training, and mentoring
http://www.JSFCentral.com   - JavaServer Faces
FAQ, news, and info








--
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com


calling authors

2006-10-25 Thread Kito D. Mann



Hello,
 
I'm currently 
looking for people who are interested in writing great articles for JSF Central 
about MyFaces, Tomahawk, Tobago, Trinidad, or Shale. If you're interested, 
please reply!
~~~Kito 
D. Mann ([EMAIL PROTECTED])Author, JavaServer Faces in Actionhttp://www.virtua.com - JSF/Java EE 
consulting, training, and mentoringhttp://www.JSFCentral.com - JavaServer 
Faces FAQ, news, and info
 


Re: nightly download page

2006-10-25 Thread Simon Kitching

Wendy Smoak wrote:

On 10/25/06, fudster <[EMAIL PROTECTED]> wrote:

Hi, I've been trying to download a snapshot of the sandbox 
components, from

http://people.apache.org/builds/myfaces/nightly/

The download page has been down for days, and there is no notice on the
myfaces download page as to why.


The server that hosts the nightly builds was part of some
infrastructure work that started last Saturday.  It's unfortunately
taking longer than expected, but will be back as soon as possible.

Yep, there's a big move of Apache infrastructure from one data-centre to 
another on at the moment. The SVN servers, however, are not affected so 
you can always download the source and build it yourself; it's 
*very*simple to do so.


Re: AW: Best Practice - Converting raw property values of Beans

2006-10-25 Thread Jonathan Harley

Bieringer Dominik wrote:

Hey cool... thx very much... I didn't knew about the possibility to access
the message from the bundle via 




That makes life easier.


It does, but you still have to declare the message bundle for "msg".
There's a technique I like that simplifies things even further, which
is to use an EL function to do the bundle lookup - then you don't even
have to declare the resource bundle, just the function namespace, which
is the same on every page. That makes it easy to reorganise and rename
message bundles without having to change every page.


-Ursprüngliche Nachricht-
Von: Andrew Robinson [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 25. Oktober 2006 22:30

An: MyFaces Discussion
Betreff: Re: Best Practice - Converting raw property values of Beans

I "cheated" and made an interface for enum types:


(Why is this cheating?)


public interfaces EnumDescribed
{
  public String getBundleKey();
}

public enum TestEnum
  implements EnumDescribed
{
  A("test.a"),
  B("test.b");
  private final String bundleKey;
  private TestEnum(String bundleKey)
  {
this.bundleKey = bundleKey;
  }
  public String getBundleKey()
  {
return this.bundleKey;
  }
}

public class ExampleBean
{
  private TestEnum testEnum;
  public TestEnum getTestEnum() { return this.testEnum; }
}



-Andrew


I've been using a similar technique, but it seems to me that there's
no reason to invent those "test.a" strings and store them in your Enum.
Why should the Enum have to know about the structure of resource
bundles, which may be authored by different folks to the Java
developers? So I use the Enum's name (A and B in the example above)
with a method like this:

public String getBundleKey() {
  return name();
}

Or you could use the class name + enum name if you're worried about
name clashes. Then the Enum doesn't need to know anything about the
view layer.


Jonathan
--
.
  Dr Jonathan Harley   .
   .   Email: [EMAIL PROTECTED]
   Zac Parkplatz Ltd   .   Office Telephone: 024 7633 1375
   www.parkplatz.net   .   Mobile: 079 4116 0423


Re: Velocity and JSF

2006-10-25 Thread Matthias Wessendorf

I wrote a small article...

http://people.apache.org/~matzew/jsfvelocity.html

but people.apache.org is still down.

-M

On 10/25/06, Rogerio Pereira <[EMAIL PROTECTED]> wrote:

Hi guys!

I would like know if somebody wrote something related with Velocity
renderers for JSF components. If yes, is there a url of this stuff?

Thanks in advance.

--
Yours truly (Atenciosamente),

Rogério (_rogerio_)
http://faces.eti.br



--
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com


AW: Best Practice - Converting raw property values of Beans

2006-10-25 Thread Bieringer Dominik
Thx. Very much... I will read the docs tomorrow I think. It sounds really
promising ;)

-Ursprüngliche Nachricht-
Von: Gert Vanthienen [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 25. Oktober 2006 22:29
An: MyFaces Discussion
Betreff: Re: Best Practice - Converting raw property values of Beans

Dominik,

The best way to do this will be by using a custom Converter. This way, 
your custom Converter class can contain the logic to 'translate' between 
e.g. the categoryId and the Category description. Your managed bean can 
remain unchanged and unaware of presentation layer issues.

A good example of how to build such a custom Converter can be found at 
[1] under the heading Custom Converters. The example shown there uses 
, but exactly the same thing also works for 
 as you're trying to do. Just implement your Converter's 
getAsString() to return the correct full description for the categoryId 
and you should be fine...

Regards,

Gert Vanthienen
[EMAIL PROTECTED]

[1] http://www-128.ibm.com/developerworks/java/library/j-jsf3/

Bieringer Dominik wrote:
>
> Hi all,
>
> today I’ve wondered again about how to convert property values of 
> Beans to locale specific strings in the presentation layer. To make it 
> clear what I want to do, I will show you a small example (This code is 
> not compileable… It’s just for demonstration purpose):
>
> Consider a class MyBean:
>
> public class MyBean {
>
> public String getCategoryId(); // Can get values ‘CatA’, ‘CatB’, ‘CatC’
>
> }
>
> Now consider having JSF code like this:
>
> 
>
> 
>
> 
>
> This would produce output like this on my webpage:
>
> ‘CatA’ or ‘CatB’ or ‘CatC’
>
> The problem is that I don’t want to display these raw values of the 
> JavaBean, instead I want to display specific strings stored somewhere 
> in the presentation layer, for example in a message.properties file, 
> which I can use in the JSP file. But how to do that efficiently and 
> what”s the best practice for doing so? I frequently have this problem, 
> not only with String types, but also with Java 1.5 Enum types….
>
> At the moment I am solving the problem the following way: I am using a 
> message.property file for JSF… which looks like the following:
>
> Category_A=Category A
>
> Category_B=Category B
>
> Category_C=Category C
>
> Next I am rewriting the JavaBean class, so that it look’s like the 
> following:
>
> public class MyBean {
>
> public String getCategoryId(); // Can get values ‘CatA’, ‘CatB’, ‘CatC’
>
> public boolean getIsCategoryA() {
>
> return (this.getCategoryId().equals(“CatA”));
>
> }
>
> …
>
> }
>
> Then I can change my JSF code to look like the following:
>
> 
>
> 
>
> 
>
> 
>
> 
>
> I accepted this method at first, but as I’ve already said, I’m having 
> this problem very often and I don’t feel comfortable about doing it 
> that way.. that’s not really beautiful and get’s really cumbersome if 
> there are more than 3 different possibilities….
>
> I know that there must be a mapping of the Java bean values and the 
> message.properties file, but I don’t think that it’s a good idea to 
> change the JavaBean class to reflect my need… For me the bean is not 
> part of the presentation layer any more….
>
> I am looking forward to get some feedback and to hear about how you 
> are solving this problem.
>
> Thx in advance,
>
> Dominik
>
> 
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.428 / Virus Database: 268.13.11/496 - Release Date:
24/10/2006 22:10
>   



commandLink issue in datatable

2006-10-25 Thread ndnguy

Hi,
I am trying to implement Master/Detail kind of application. If not exact I
used a similar approach explained on Myfaces Wiki
(http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters).
When I click on the link nothing happens, method is never called. My
listBean is in session scope as required. 

I also get some java script errors in my browser which say that
"clear__5Fid1()" is not defined and when i declared dummy function, I got
another error saying "document.forms._id1.elements._id1:_link_hidden_" is
null or not an object. Are we supposed to declare the clear__5Fid1()
function? I am not sure if this related to the commandLink issue. Any help
is appreciated. 

Thanks,
Praveen.
-- 
View this message in context: 
http://www.nabble.com/commandLink-issue-in-datatable-tf2510021.html#a640
Sent from the MyFaces - Users mailing list archive at Nabble.com.



AW: Best Practice - Converting raw property values of Beans

2006-10-25 Thread Bieringer Dominik
Hey cool... thx very much... I didn't knew about the possibility to access
the message from the bundle via 



That makes life easier.
Thx

-Ursprüngliche Nachricht-
Von: Andrew Robinson [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 25. Oktober 2006 22:30
An: MyFaces Discussion
Betreff: Re: Best Practice - Converting raw property values of Beans

I "cheated" and made an interface for enum types:

public interfaces EnumDescribed
{
  public String getBundleKey();
}

public enum TestEnum
  implements EnumDescribed
{
  A("test.a"),
  B("test.b");
  private final String bundleKey;
  private TestEnum(String bundleKey)
  {
this.bundleKey = bundleKey;
  }
  public String getBundleKey()
  {
return this.bundleKey;
  }
}

public class ExampleBean
{
  private TestEnum testEnum;
  public TestEnum getTestEnum() { return this.testEnum; }
}



-Andrew

On 10/25/06, Bieringer Dominik <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi all,
>
>
>
> today I've wondered again about how to convert property values of Beans to
> locale specific strings in the presentation layer. To make it clear what I
> want to do, I will show you a small example (This code is not compileable…
> It's just for demonstration purpose):
>
>
>
> Consider a class MyBean:
>
>
>
> public class MyBean {
>
> public String getCategoryId();  // Can get values 'CatA',
> 'CatB', 'CatC'
>
> }
>
>
>
> Now consider having JSF code like this:
>
>
>
> 
>
> 
>
> 
>
>
>
> This would produce output like this on my webpage:
>
>
>
> 'CatA' or 'CatB' or 'CatC'
>
>
>
> The problem is that I don't want to display these raw values of the
> JavaBean, instead I want to display specific strings stored somewhere in
the
> presentation layer, for example in a message.properties file, which I can
> use in the JSP file. But how to do that efficiently and what"s the best
> practice for doing so? I frequently have this problem, not only with
String
> types, but also with Java 1.5 Enum types….
>
>
>
> At the moment I am solving the problem the following way: I am using a
> message.property file for JSF… which looks like the following:
>
>
>
> Category_A=Category A
>
> Category_B=Category B
>
> Category_C=Category C
>
>
>
> Next I am rewriting the JavaBean class, so that it look's like the
> following:
>
>
>
> public class MyBean {
>
> public String getCategoryId();  // Can get values 'CatA',
> 'CatB', 'CatC'
>
>
>
> public boolean getIsCategoryA() {
>
> return (this.getCategoryId().equals("CatA"));
>
> }
>
>
>
> …
>
> }
>
>
>
> Then I can change my JSF code to look like the following:
>
>
>
> 
>
>  rendered="#{myBean.isCategoryA}"/>
>
>  rendered="#{myBean.isCategoryB}"/>
>
>  rendered="#{myBean.isCategoryC}"/>
>
> 
>
>
>
> I accepted this method at first, but as I've already said, I'm having this
> problem very often and I don't feel comfortable about doing it that way..
> that's not really beautiful and get's really cumbersome if there are more
> than 3 different possibilities….
>
>
>
> I know that there must be a mapping of the Java bean values and the
> message.properties file, but I don't think that it's a good idea to change
> the JavaBean class to reflect my need… For me the bean is not part of the
> presentation layer any more….
>
>
>
> I am looking forward to get some feedback and to hear about how you are
> solving this problem.
>
>
>
> Thx in advance,
>
> Dominik



Velocity and JSF

2006-10-25 Thread Rogerio Pereira
Hi guys!I would like know if somebody wrote something related with Velocity renderers for JSF components. If yes, is there a url of this stuff?Thanks in advance.-- Yours truly (Atenciosamente),
Rogério (_rogerio_)http://faces.eti.br


Re: Best Practice - Converting raw property values of Beans

2006-10-25 Thread Andrew Robinson

I "cheated" and made an interface for enum types:

public interfaces EnumDescribed
{
 public String getBundleKey();
}

public enum TestEnum
 implements EnumDescribed
{
 A("test.a"),
 B("test.b");
 private final String bundleKey;
 private TestEnum(String bundleKey)
 {
   this.bundleKey = bundleKey;
 }
 public String getBundleKey()
 {
   return this.bundleKey;
 }
}

public class ExampleBean
{
 private TestEnum testEnum;
 public TestEnum getTestEnum() { return this.testEnum; }
}



-Andrew

On 10/25/06, Bieringer Dominik <[EMAIL PROTECTED]> wrote:





Hi all,



today I've wondered again about how to convert property values of Beans to
locale specific strings in the presentation layer. To make it clear what I
want to do, I will show you a small example (This code is not compileable…
It's just for demonstration purpose):



Consider a class MyBean:



public class MyBean {

public String getCategoryId();  // Can get values 'CatA',
'CatB', 'CatC'

}



Now consider having JSF code like this:











This would produce output like this on my webpage:



'CatA' or 'CatB' or 'CatC'



The problem is that I don't want to display these raw values of the
JavaBean, instead I want to display specific strings stored somewhere in the
presentation layer, for example in a message.properties file, which I can
use in the JSP file. But how to do that efficiently and what"s the best
practice for doing so? I frequently have this problem, not only with String
types, but also with Java 1.5 Enum types….



At the moment I am solving the problem the following way: I am using a
message.property file for JSF… which looks like the following:



Category_A=Category A

Category_B=Category B

Category_C=Category C



Next I am rewriting the JavaBean class, so that it look's like the
following:



public class MyBean {

public String getCategoryId();  // Can get values 'CatA',
'CatB', 'CatC'



public boolean getIsCategoryA() {

return (this.getCategoryId().equals("CatA"));

}



…

}



Then I can change my JSF code to look like the following:















I accepted this method at first, but as I've already said, I'm having this
problem very often and I don't feel comfortable about doing it that way..
that's not really beautiful and get's really cumbersome if there are more
than 3 different possibilities….



I know that there must be a mapping of the Java bean values and the
message.properties file, but I don't think that it's a good idea to change
the JavaBean class to reflect my need… For me the bean is not part of the
presentation layer any more….



I am looking forward to get some feedback and to hear about how you are
solving this problem.



Thx in advance,

Dominik


Re: Best Practice - Converting raw property values of Beans

2006-10-25 Thread Gilles Demarty

read the section 'Multilanguage Support' from
http://wiki.apache.org/myfaces/Create_and_Display_Messages

It may do the trick.


2006/10/25, Bieringer Dominik <[EMAIL PROTECTED]>:





Hi all,



today I've wondered again about how to convert property values of Beans to
locale specific strings in the presentation layer. To make it clear what I
want to do, I will show you a small example (This code is not compileable…
It's just for demonstration purpose):



Consider a class MyBean:



public class MyBean {

public String getCategoryId();  // Can get values 'CatA',
'CatB', 'CatC'

}



Now consider having JSF code like this:











This would produce output like this on my webpage:



'CatA' or 'CatB' or 'CatC'



The problem is that I don't want to display these raw values of the
JavaBean, instead I want to display specific strings stored somewhere in the
presentation layer, for example in a message.properties file, which I can
use in the JSP file. But how to do that efficiently and what"s the best
practice for doing so? I frequently have this problem, not only with String
types, but also with Java 1.5 Enum types….



At the moment I am solving the problem the following way: I am using a
message.property file for JSF… which looks like the following:



Category_A=Category A

Category_B=Category B

Category_C=Category C



Next I am rewriting the JavaBean class, so that it look's like the
following:



public class MyBean {

public String getCategoryId();  // Can get values 'CatA',
'CatB', 'CatC'



public boolean getIsCategoryA() {

return (this.getCategoryId().equals("CatA"));

}



…

}



Then I can change my JSF code to look like the following:















I accepted this method at first, but as I've already said, I'm having this
problem very often and I don't feel comfortable about doing it that way..
that's not really beautiful and get's really cumbersome if there are more
than 3 different possibilities….



I know that there must be a mapping of the Java bean values and the
message.properties file, but I don't think that it's a good idea to change
the JavaBean class to reflect my need… For me the bean is not part of the
presentation layer any more….



I am looking forward to get some feedback and to hear about how you are
solving this problem.



Thx in advance,

Dominik


Re: Best Practice - Converting raw property values of Beans

2006-10-25 Thread Gert Vanthienen

Dominik,

The best way to do this will be by using a custom Converter. This way, 
your custom Converter class can contain the logic to 'translate' between 
e.g. the categoryId and the Category description. Your managed bean can 
remain unchanged and unaware of presentation layer issues.


A good example of how to build such a custom Converter can be found at 
[1] under the heading Custom Converters. The example shown there uses 
, but exactly the same thing also works for 
 as you're trying to do. Just implement your Converter's 
getAsString() to return the correct full description for the categoryId 
and you should be fine...


Regards,

Gert Vanthienen
[EMAIL PROTECTED]

[1] http://www-128.ibm.com/developerworks/java/library/j-jsf3/

Bieringer Dominik wrote:


Hi all,

today I’ve wondered again about how to convert property values of 
Beans to locale specific strings in the presentation layer. To make it 
clear what I want to do, I will show you a small example (This code is 
not compileable… It’s just for demonstration purpose):


Consider a class MyBean:

public class MyBean {

public String getCategoryId(); // Can get values ‘CatA’, ‘CatB’, ‘CatC’

}

Now consider having JSF code like this:







This would produce output like this on my webpage:

‘CatA’ or ‘CatB’ or ‘CatC’

The problem is that I don’t want to display these raw values of the 
JavaBean, instead I want to display specific strings stored somewhere 
in the presentation layer, for example in a message.properties file, 
which I can use in the JSP file. But how to do that efficiently and 
what”s the best practice for doing so? I frequently have this problem, 
not only with String types, but also with Java 1.5 Enum types….


At the moment I am solving the problem the following way: I am using a 
message.property file for JSF… which looks like the following:


Category_A=Category A

Category_B=Category B

Category_C=Category C

Next I am rewriting the JavaBean class, so that it look’s like the 
following:


public class MyBean {

public String getCategoryId(); // Can get values ‘CatA’, ‘CatB’, ‘CatC’

public boolean getIsCategoryA() {

return (this.getCategoryId().equals(“CatA”));

}

…

}

Then I can change my JSF code to look like the following:











I accepted this method at first, but as I’ve already said, I’m having 
this problem very often and I don’t feel comfortable about doing it 
that way.. that’s not really beautiful and get’s really cumbersome if 
there are more than 3 different possibilities….


I know that there must be a mapping of the Java bean values and the 
message.properties file, but I don’t think that it’s a good idea to 
change the JavaBean class to reflect my need… For me the bean is not 
part of the presentation layer any more….


I am looking forward to get some feedback and to hear about how you 
are solving this problem.


Thx in advance,

Dominik



No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.428 / Virus Database: 268.13.11/496 - Release Date: 24/10/2006 
22:10
  




Best Practice - Converting raw property values of Beans

2006-10-25 Thread Bieringer Dominik








Hi all,

 

today I’ve wondered again about how to convert
property values of Beans to locale specific strings in the presentation layer. To
make it clear what I want to do, I will show you a small example (This code is
not compileable… It’s just for demonstration purpose):

 

Consider a class MyBean:

 

public class MyBean {

    public
String getCategoryId();  // Can get values ‘CatA’, ‘CatB’,
‘CatC’

}

 

Now consider having JSF code like this:

 



    



 

This would produce output like this on my webpage:

 

‘CatA’ or ‘CatB’
or ‘CatC’

 

The problem is that I don’t want to display
these raw values of the JavaBean, instead I want to display specific strings
stored somewhere in the presentation layer, for example in a message.properties
file, which I can use in the JSP file. But how to do that efficiently and what”s
the best practice for doing so? I frequently have this problem, not only with
String types, but also with Java 1.5 Enum types…. 

 

At the moment I am solving the problem the following
way: I am using a message.property file for JSF… which looks like the
following:

 

Category_A=Category A

Category_B=Category B

Category_C=Category C

 

Next I am rewriting the JavaBean class, so that it
look’s like the following:

 

public class MyBean {

    public
String getCategoryId();  // Can get values ‘CatA’, ‘CatB’,
‘CatC’

 

    public
boolean getIsCategoryA() {

    return
(this.getCategoryId().equals(“CatA”));

    }

 

    …

}

 

Then I can change my JSF code to look like the
following:

 



    

    

    



 

I accepted this method at first, but as I’ve
already said, I’m having this problem very often and I don’t feel
comfortable about doing it that way.. that’s not really beautiful and get’s
really cumbersome if there are more than 3 different possibilities….

 

I know that there must be a mapping of the Java bean
values and the message.properties file, but I don’t think that it’s
a good idea to change the JavaBean class to reflect my need… For me the
bean is not part of the presentation layer any more…. 

 

I am looking forward to get some feedback and to hear
about how you are solving this problem.

 

Thx in advance,

Dominik








Re: nightly download page

2006-10-25 Thread Wendy Smoak

On 10/25/06, fudster <[EMAIL PROTECTED]> wrote:


So, I'll switch over to some other work for a bit.  If you become aware that
the page will be delayed much longer, could you kindly let me know via
reply?  Or, better yet - have a notice posted on the myfaces download page?


Just keep checking -- the same server that hosts the downloads is the
one we use to push website changes, so right now it is not possible to
update the website.

--
Wendy


Re: nightly download page

2006-10-25 Thread fudster

Thanks Wendy and Simon...

Happy to hear that, it'll definitely be better for me to wait till those
servers are available again rather than building the jar from source - it
sounds like we can expect it to be back "any time now"...

So, I'll switch over to some other work for a bit.  If you become aware that
the page will be delayed much longer, could you kindly let me know via
reply?  Or, better yet - have a notice posted on the myfaces download page?

Meawhile I'll check the link every couple hours.  Thanks again.



Simon Lessard wrote:
> 
> Hello,
> 
> A "non trivial" amount of Apache servers were moved last weekend, the
> setup
> and DNS refresh is not finished I guess. Hopefully it will be done soon.
> 
> 
> Regards,
> 
> ~ Simon
> 
> On 10/25/06, fudster <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi, I've been trying to download a snapshot of the sandbox components,
>> from
>> http://people.apache.org/builds/myfaces/nightly/
>>
>> The download page has been down for days, and there is no notice on the
>> myfaces download page as to why.
>>
>> I don't need a up-to-date today copy, just something recent.  In
>> particular
>> I want to use the sandbox's  component.  Can someone
>> direct
>> me to an alternate download location?  Or, can someone post a recent copy
>> for me somewhere?
>>
>> Thanks in advance.  I checked the Nabble archives for information on
>> this,
>> and I checked the #faces IRC channel, but I can't see any posts
>> addressing
>> this.
>> --
>> View this message in context:
>> http://www.nabble.com/nightly-download-page-tf2508957.html#a6996421
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/nightly-download-page-tf2508957.html#a6997484
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: Conversation Component with Facelets

2006-10-25 Thread Tom Innes
Hi Mario,

I have added the issue to Other in Tomahawk as I did not see the Component
nor a Sandbox Category.

https://issues.apache.org/jira/browse/TOMAHAWK-753

The Issue has both the final code attached and svn diffs.

Tom

-Original Message-
From: Mario Ivankovits [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 25, 2006 12:52 PM
To: Tom Innes
Cc: 'MyFaces Discussion'
Subject: Re: Conversation Component with Facelets

Hi Tom!
>
> I am attaching all three changed classes in the hopes that you would
> consider this change for the component.
>
Could you please send a "svn diff" format, or even better, attach it to
a jira ticket at http://issues.apache.org/jira

I'll have a look at it then, though, as I know myself ;-) I'll add yet
another "factory" like stuff so that you can plugin your own class which
can deal with this problem then.

Thanks!
Ciao,
Mario



Re: nightly download page

2006-10-25 Thread Wendy Smoak

On 10/25/06, fudster <[EMAIL PROTECTED]> wrote:


Hi, I've been trying to download a snapshot of the sandbox components, from
http://people.apache.org/builds/myfaces/nightly/

The download page has been down for days, and there is no notice on the
myfaces download page as to why.


The server that hosts the nightly builds was part of some
infrastructure work that started last Saturday.  It's unfortunately
taking longer than expected, but will be back as soon as possible.

--
Wendy


Re: nightly download page

2006-10-25 Thread Simon Lessard
Hello,A "non trivial" amount of Apache servers were moved last weekend, the setup and DNS refresh is not finished I guess. Hopefully it will be done soon.Regards,~ Simon
On 10/25/06, fudster <[EMAIL PROTECTED]> wrote:
Hi, I've been trying to download a snapshot of the sandbox components, fromhttp://people.apache.org/builds/myfaces/nightly/The download page has been down for days, and there is no notice on the
myfaces download page as to why.I don't need a up-to-date today copy, just something recent.  In particularI want to use the sandbox's  component.  Can someone directme to an alternate download location?  Or, can someone post a recent copy
for me somewhere?Thanks in advance.  I checked the Nabble archives for information on this,and I checked the #faces IRC channel, but I can't see any posts addressingthis.--View this message in context: 
http://www.nabble.com/nightly-download-page-tf2508957.html#a6996421Sent from the MyFaces - Users mailing list archive at 
Nabble.com.


nightly download page

2006-10-25 Thread fudster

Hi, I've been trying to download a snapshot of the sandbox components, from
http://people.apache.org/builds/myfaces/nightly/ 

The download page has been down for days, and there is no notice on the
myfaces download page as to why.

I don't need a up-to-date today copy, just something recent.  In particular
I want to use the sandbox's  component.  Can someone direct
me to an alternate download location?  Or, can someone post a recent copy
for me somewhere?

Thanks in advance.  I checked the Nabble archives for information on this,
and I checked the #faces IRC channel, but I can't see any posts addressing
this.
-- 
View this message in context: 
http://www.nabble.com/nightly-download-page-tf2508957.html#a6996421
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: Conversation Component with Facelets

2006-10-25 Thread Mario Ivankovits
Hi Tom!
>
> I am attaching all three changed classes in the hopes that you would
> consider this change for the component.
>
Could you please send a "svn diff" format, or even better, attach it to
a jira ticket at http://issues.apache.org/jira

I'll have a look at it then, though, as I know myself ;-) I'll add yet
another "factory" like stuff so that you can plugin your own class which
can deal with this problem then.

Thanks!
Ciao,
Mario



Conversation Component with Facelets

2006-10-25 Thread Tom Innes








 

Mario,

 

I am having some difficulty in implementing the Conversation
Component into my application when using Facelets and I have a suggestion for a
small coding change.  Specifically my issue is with how the managed bean
name is determined.

 

In my application I have a combination of Facelets Templates
and composition components where I often pass the managed bean as a parameter

 

For instance a parameter called theController ="#{countryQBEController}"

 

And I use it as follows

  

 

The problem is that in ConversationUtils the following method
returns

 

 
public static String extractBeanName(ValueBinding vb)

 
{

   
String valueBinding = vb.getExpressionString();

   
return valueBinding.substring(2, valueBinding.length()-1);

 
}

 

theController and not
countryQBEController which is the managed Beans Name as defined in
FacesConfig.xml.

 

Thus in the Conversation
Class 

 

public
void putBean(FacesContext context, ValueBinding vb) Method

 

 
What gets stored in the TreeMap is 

 
theController, Pointer to countryQBEController 

 

 

I have locally made a small
Change to ConversationUtils, Conversation and UIConversation which fixes my problem. 
The basis of the change is a new method in ConversationUtils which determines
the managed bean name based on the bean instantiated and what is defined in the
ServletRequest.

 

   
public static String getManagedBeanName(FacesContext context, Object myBean)
throws ClassNotFoundException {

   
String managedBeanName = null;

   
HttpServletRequest request = (HttpServletRequest)
context.getExternalContext().getRequest();

   


   
// lookup bean in request scope

   
Enumeration requestAttributeNames = request.getAttributeNames();

   
while (requestAttributeNames.hasMoreElements()) {

   
String requestAttribute = (String) requestAttributeNames.nextElement();

   
Object object = request.getAttribute(requestAttribute);

   
if ( Class.forName(myBean.getClass().getName()).isInstance(object) ) {

   
managedBeanName = requestAttribute;

   
break;

   
}

   
}

 

   
return managedBeanName;

   
}    

 

Locally I have only
implemented this for request scoped beans.  I did notice that the
Conversation component seems to support Session Scoped Beans and that could be
easily added if necessary.  I have tested this locally and have not found
any issues so far.

 

I am attaching all three
changed classes in the hopes that you would consider this change for the
component.

 

Tom

 

 

 


 








UIConversation.java
Description: Binary data


Conversation.java
Description: Binary data


ConversationUtils.java
Description: Binary data


Re: So let me get this straight....

2006-10-25 Thread Mike Kienenberger

There's a JSF 1.2 branch for MyFaces, but I don't know the current
status -- check the MyFaces issue tracker for JSR-252 issues.

On 10/25/06, monkeyden <[EMAIL PROTECTED]> wrote:


Sweet!  I assume, based on your comment, that MyFaces currently supports JSF
1.1.  I checked the MyFaces manifest file but didnt see any reference to
supported version.  Is there an ETA on 1.2 support?


Mike Kienenberger wrote:
>
> You're allowed to create your own custom message bundle file that will
> override the default one.
>
> If you really need it, you can use the instructions on the 2nd half of
> the following link to create a custom required validator.   However,
> there's a performance hit for doing it this way.
>
> http://wiki.apache.org/myfaces/OptionalValidationFramework
>
> In JSF 1.2, you can use the "requiredMessage" attribute to set this
> directly.
>
>
>
> On 10/25/06, monkeyden <[EMAIL PROTECTED]> wrote:
>>
>> Ok, so there is some flexibility.  My spec, however, says that the
>> message
>> for a required field should appear as such:
>> {0} is a required field.
>>
>> which, for the "First Name" field, would result in:
>> First Name is a required field
>>
>> To my knowledge, there is no facility to pass in a user friendly label
>> for
>> the field...just the id of the component.  Is this accurate?
>>
>>
>>
>> Gilles DEMARTY wrote:
>> >
>> >> I have indeed looked at that.  Is there a way to customize the
>> resulting
>> >> error message?
>> > yes, you can load a message bundle and redefine the default error
>> messages
>> >
>> >
>> 
http://jsffaq.com/Wiki.jsp?ptitle=How+can+I+override+the+default+validation+messages%3F&page=HowCanIOverrideTheDefaultValidationMessages
>> >
>> >
>> > 2006/10/25, monkeyden <[EMAIL PROTECTED]>:
>> >>
>> >>
>> >> Dennis Byrne wrote:
>> >> >
>> >> > Hello monkeyden,
>> >> >
>> >> > You may want to look at the 'required' attribute for the JSF tag you
>> >> are
>> >> > using.
>> >> >
>> >> > Dennis Byrne
>> >> >
>> >> >>-Original Message-
>> >> >>From: monkeyden [mailto:[EMAIL PROTECTED]
>> >> >>Sent: Wednesday, October 25, 2006 10:23 AM
>> >> >>To: users@myfaces.apache.org
>> >> >>Subject: So let me get this straight
>> >> >>
>> >> >>
>> >> >>Based on what I've read on this forum, which happens to be a very
>> >> valuable
>> >> >>resource of mine, I find this to be true (corerect me if I'm wrong
>> and
>> >> >>please excuse my fledgling knowledge of JSF):
>> >> >>
>> >> >>You cannot use a validator to do null value validation on a field,
>> >> because
>> >> >>JSF doesn't call the validator if there is no value to validate.  As
>> a
>> >> >>result, you cannot print custom error messages on the client, unless
>> of
>> >> >>course you validate in the backing bean.
>> >> >>--
>> >> >>View this message in context:
>> >>
>> http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993052
>> >> >>Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993410
>> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6994195
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>

--
View this message in context: 
http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6994948
Sent from the MyFaces - Users mailing list archive at Nabble.com.




fileupload makes tomcat 5.5 unresponsive for other users

2006-10-25 Thread Richard Koch








I am using the commons fileupload 1.1.1 along with the
JSP/JSF tag  tag.  Out application server is Tomcat
5.5.

 

When a user uploads a file, tomcat becomes completely
unresponsive to any other requests until the upload is complete—this is
the case no matter what the file size is 8K to 40MB…

 

Watching garbage collection logging details, I see that the
file upload component always seems to take at least 32MB or 42MB, and then it
is quickly collected when the upload is completed, and the tomcat server is then
available to everyone…

 

I used the input stream from the org.apache.myfaces.custom.fileupload.UploadedFile.getInputStream() call, and
then write it out using the below method.

 

Any ideas what would be causing tomcat to be non-responsive
to any other request until the upload is finished?  Are there any
configuration tweeks that can made to help.  I have scanned the mail
archives, wiki, and documentation without luck.  Perhaps I have missed something?

 

Thanks.

 

Rich K.

---

 

  /**

   * Write the given input stream to the given file identified by the targetFilePath string.

   * @param inputStream

   * @param targetFilePath

   * @throws IOException

   */

  public static void writeInputStreamToFile(InputStream
inputStream, String targetFilePath) throws IOException {

    InputStream in = 

        new BufferedInputStream(inputStream);

    OutputStream out = 

        new FileOutputStream(targetFilePath);

    try {

   
byte[] buffer = new byte[64 * 1024];

    int count;

   
while ((count =
in.read(buffer)) > 0) {

   
  out.write(buffer, 0, count);

   
}

    } finally {

   
in.close();

   
out.close();

    }

  }








Re: So let me get this straight....

2006-10-25 Thread Reind
You can use the MyFaces Tomahawk components with Sun's 1.2 Implimentation instead of the MyFaces 1.1.X implimentation.On 10/25/06, monkeyden <
[EMAIL PROTECTED]> wrote:Sweet!  I assume, based on your comment, that MyFaces currently supports JSF
1.1.  I checked the MyFaces manifest file but didnt see any reference tosupported version.  Is there an ETA on 1.2 support?Mike Kienenberger wrote:>> You're allowed to create your own custom message bundle file that will
> override the default one.>> If you really need it, you can use the instructions on the 2nd half of> the following link to create a custom required validator.   However,> there's a performance hit for doing it this way.
>> http://wiki.apache.org/myfaces/OptionalValidationFramework>> In JSF 1.2, you can use the "requiredMessage" attribute to set this
> directly. On 10/25/06, monkeyden <[EMAIL PROTECTED]> wrote: Ok, so there is some flexibility.  My spec, however, says that the
>> message>> for a required field should appear as such:>> {0} is a required field. which, for the "First Name" field, would result in:>> First Name is a required field
 To my knowledge, there is no facility to pass in a user friendly label>> for>> the field...just the id of the component.  Is this accurate?>>
>> Gilles DEMARTY wrote:>> >>> >> I have indeed looked at that.  Is there a way to customize the>> resulting>> >> error message?>> > yes, you can load a message bundle and redefine the default error
>> messages>> >>> >>> http://jsffaq.com/Wiki.jsp?ptitle=How+can+I+override+the+default+validation+messages%3F&page=HowCanIOverrideTheDefaultValidationMessages
>> >>> >>> > 2006/10/25, monkeyden <[EMAIL PROTECTED]>:>>   >> Dennis Byrne wrote:
>> >> >>> >> > Hello monkeyden,>> >> >>> >> > You may want to look at the 'required' attribute for the JSF tag you>> >> are>> >> > using.
>> >> >>> >> > Dennis Byrne>> >> >>> >> >>-Original Message->> >> >>From: monkeyden [mailto:
[EMAIL PROTECTED]]>> >> >>Sent: Wednesday, October 25, 2006 10:23 AM>> >> >>To: users@myfaces.apache.org>> >> >>Subject: So let me get this straight
>> >>  >>  >> >>Based on what I've read on this forum, which happens to be a very>> >> valuable>> >> >>resource of mine, I find this to be true (corerect me if I'm wrong
>> and>> >> >>please excuse my fledgling knowledge of JSF):>> >>  >> >>You cannot use a validator to do null value validation on a field,
>> >> because>> >> >>JSF doesn't call the validator if there is no value to validate.  As>> a>> >> >>result, you cannot print custom error messages on the client, unless
>> of>> >> >>course you validate in the backing bean.>> >> >>-->> >> >>View this message in context:>>  
http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993052>> >> >>Sent from the MyFaces - Users mailing list archive at Nabble.com.>> >> >>
>> >>  >> >>> >> >>> >> >>> >> >>>  >> -->> >> View this message in context:
>>  http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993410>> >> Sent from the MyFaces - Users mailing list archive at 
Nabble.com.>>   >>> > -->> View this message in context:>> 
http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6994195>> Sent from the MyFaces - Users mailing list archive at Nabble.com.>
>--View this message in context: http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6994948
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: So let me get this straight....

2006-10-25 Thread monkeyden

Sweet!  I assume, based on your comment, that MyFaces currently supports JSF
1.1.  I checked the MyFaces manifest file but didnt see any reference to
supported version.  Is there an ETA on 1.2 support?


Mike Kienenberger wrote:
> 
> You're allowed to create your own custom message bundle file that will
> override the default one.
> 
> If you really need it, you can use the instructions on the 2nd half of
> the following link to create a custom required validator.   However,
> there's a performance hit for doing it this way.
> 
> http://wiki.apache.org/myfaces/OptionalValidationFramework
> 
> In JSF 1.2, you can use the "requiredMessage" attribute to set this
> directly.
> 
> 
> 
> On 10/25/06, monkeyden <[EMAIL PROTECTED]> wrote:
>>
>> Ok, so there is some flexibility.  My spec, however, says that the
>> message
>> for a required field should appear as such:
>> {0} is a required field.
>>
>> which, for the "First Name" field, would result in:
>> First Name is a required field
>>
>> To my knowledge, there is no facility to pass in a user friendly label
>> for
>> the field...just the id of the component.  Is this accurate?
>>
>>
>>
>> Gilles DEMARTY wrote:
>> >
>> >> I have indeed looked at that.  Is there a way to customize the
>> resulting
>> >> error message?
>> > yes, you can load a message bundle and redefine the default error
>> messages
>> >
>> >
>> http://jsffaq.com/Wiki.jsp?ptitle=How+can+I+override+the+default+validation+messages%3F&page=HowCanIOverrideTheDefaultValidationMessages
>> >
>> >
>> > 2006/10/25, monkeyden <[EMAIL PROTECTED]>:
>> >>
>> >>
>> >> Dennis Byrne wrote:
>> >> >
>> >> > Hello monkeyden,
>> >> >
>> >> > You may want to look at the 'required' attribute for the JSF tag you
>> >> are
>> >> > using.
>> >> >
>> >> > Dennis Byrne
>> >> >
>> >> >>-Original Message-
>> >> >>From: monkeyden [mailto:[EMAIL PROTECTED]
>> >> >>Sent: Wednesday, October 25, 2006 10:23 AM
>> >> >>To: users@myfaces.apache.org
>> >> >>Subject: So let me get this straight
>> >> >>
>> >> >>
>> >> >>Based on what I've read on this forum, which happens to be a very
>> >> valuable
>> >> >>resource of mine, I find this to be true (corerect me if I'm wrong
>> and
>> >> >>please excuse my fledgling knowledge of JSF):
>> >> >>
>> >> >>You cannot use a validator to do null value validation on a field,
>> >> because
>> >> >>JSF doesn't call the validator if there is no value to validate.  As
>> a
>> >> >>result, you cannot print custom error messages on the client, unless
>> of
>> >> >>course you validate in the backing bean.
>> >> >>--
>> >> >>View this message in context:
>> >>
>> http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993052
>> >> >>Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993410
>> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6994195
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6994948
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: So let me get this straight....

2006-10-25 Thread Mike Kienenberger

You're allowed to create your own custom message bundle file that will
override the default one.

If you really need it, you can use the instructions on the 2nd half of
the following link to create a custom required validator.   However,
there's a performance hit for doing it this way.

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

In JSF 1.2, you can use the "requiredMessage" attribute to set this directly.



On 10/25/06, monkeyden <[EMAIL PROTECTED]> wrote:


Ok, so there is some flexibility.  My spec, however, says that the message
for a required field should appear as such:
{0} is a required field.

which, for the "First Name" field, would result in:
First Name is a required field

To my knowledge, there is no facility to pass in a user friendly label for
the field...just the id of the component.  Is this accurate?



Gilles DEMARTY wrote:
>
>> I have indeed looked at that.  Is there a way to customize the resulting
>> error message?
> yes, you can load a message bundle and redefine the default error messages
>
> 
http://jsffaq.com/Wiki.jsp?ptitle=How+can+I+override+the+default+validation+messages%3F&page=HowCanIOverrideTheDefaultValidationMessages
>
>
> 2006/10/25, monkeyden <[EMAIL PROTECTED]>:
>>
>>
>> Dennis Byrne wrote:
>> >
>> > Hello monkeyden,
>> >
>> > You may want to look at the 'required' attribute for the JSF tag you
>> are
>> > using.
>> >
>> > Dennis Byrne
>> >
>> >>-Original Message-
>> >>From: monkeyden [mailto:[EMAIL PROTECTED]
>> >>Sent: Wednesday, October 25, 2006 10:23 AM
>> >>To: users@myfaces.apache.org
>> >>Subject: So let me get this straight
>> >>
>> >>
>> >>Based on what I've read on this forum, which happens to be a very
>> valuable
>> >>resource of mine, I find this to be true (corerect me if I'm wrong and
>> >>please excuse my fledgling knowledge of JSF):
>> >>
>> >>You cannot use a validator to do null value validation on a field,
>> because
>> >>JSF doesn't call the validator if there is no value to validate.  As a
>> >>result, you cannot print custom error messages on the client, unless of
>> >>course you validate in the backing bean.
>> >>--
>> >>View this message in context:
>> http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993052
>> >>Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993410
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>

--
View this message in context: 
http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6994195
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: So let me get this straight....

2006-10-25 Thread monkeyden

Ok, so there is some flexibility.  My spec, however, says that the message
for a required field should appear as such:
{0} is a required field.

which, for the "First Name" field, would result in:
First Name is a required field

To my knowledge, there is no facility to pass in a user friendly label for
the field...just the id of the component.  Is this accurate?



Gilles DEMARTY wrote:
> 
>> I have indeed looked at that.  Is there a way to customize the resulting
>> error message?
> yes, you can load a message bundle and redefine the default error messages
> 
> http://jsffaq.com/Wiki.jsp?ptitle=How+can+I+override+the+default+validation+messages%3F&page=HowCanIOverrideTheDefaultValidationMessages
> 
> 
> 2006/10/25, monkeyden <[EMAIL PROTECTED]>:
>>
>>
>> Dennis Byrne wrote:
>> >
>> > Hello monkeyden,
>> >
>> > You may want to look at the 'required' attribute for the JSF tag you
>> are
>> > using.
>> >
>> > Dennis Byrne
>> >
>> >>-Original Message-
>> >>From: monkeyden [mailto:[EMAIL PROTECTED]
>> >>Sent: Wednesday, October 25, 2006 10:23 AM
>> >>To: users@myfaces.apache.org
>> >>Subject: So let me get this straight
>> >>
>> >>
>> >>Based on what I've read on this forum, which happens to be a very
>> valuable
>> >>resource of mine, I find this to be true (corerect me if I'm wrong and
>> >>please excuse my fledgling knowledge of JSF):
>> >>
>> >>You cannot use a validator to do null value validation on a field,
>> because
>> >>JSF doesn't call the validator if there is no value to validate.  As a
>> >>result, you cannot print custom error messages on the client, unless of
>> >>course you validate in the backing bean.
>> >>--
>> >>View this message in context:
>> http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993052
>> >>Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993410
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6994195
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: Tomahawk and ajax4jsf - t:datascroller and sortheaders don't work

2006-10-25 Thread Yee CN

***
Your mail has been scanned by InterScan MSS.
***










I think you would have better chance of
getting an answer by asking in the ajax4jsf column. 

 

Maybe you can try the following –
enclose the dataTable and the dataScroller under a panelGroup, and have the ajax refresh the
panelGroup, so that both the dataTable and the dataScroller got refreshed
together.

 

Please let me know how you go with this. I
am in the process of evaluating a4j myself.

 

Best regards,

Yee

 









From: Aneesha Govil
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 25, 2006
1:02 PM
To: MyFaces
 Discussion
Subject: Re: Tomahawk and ajax4jsf
- t:datascroller and sortheaders don't work



 

Nope, I have dumped
ajax4jsf because I could not resolve this problem and couldn't get any help on
it. I am going to write my own ajax
wherever required.

Let me know if you find any resolutions though. 

Regards, 
Aneesha



On 10/25/06, ndnguy
<[EMAIL PROTECTED]>
wrote:


Were you able to figure out the issue? I am getting into a similar situation
with Ajax4Jsf and datascrollers.

Thanks,
Praveen.
--
View this message in context: http://www.nabble.com/Tomahawk-and-ajax4jsf---t%3Adatascroller-and-sortheaders-don%27t-work-tf2414555.html#a6982861
Sent from the MyFaces - Users mailing list archive at Nabble.com.



 








Re: So let me get this straight....

2006-10-25 Thread Gilles Demarty

I have indeed looked at that.  Is there a way to customize the resulting
error message?

yes, you can load a message bundle and redefine the default error messages

http://jsffaq.com/Wiki.jsp?ptitle=How+can+I+override+the+default+validation+messages%3F&page=HowCanIOverrideTheDefaultValidationMessages


2006/10/25, monkeyden <[EMAIL PROTECTED]>:



Dennis Byrne wrote:
>
> Hello monkeyden,
>
> You may want to look at the 'required' attribute for the JSF tag you are
> using.
>
> Dennis Byrne
>
>>-Original Message-
>>From: monkeyden [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, October 25, 2006 10:23 AM
>>To: users@myfaces.apache.org
>>Subject: So let me get this straight
>>
>>
>>Based on what I've read on this forum, which happens to be a very valuable
>>resource of mine, I find this to be true (corerect me if I'm wrong and
>>please excuse my fledgling knowledge of JSF):
>>
>>You cannot use a validator to do null value validation on a field, because
>>JSF doesn't call the validator if there is no value to validate.  As a
>>result, you cannot print custom error messages on the client, unless of
>>course you validate in the backing bean.
>>--
>>View this message in context:
http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993052
>>Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
>

--
View this message in context: 
http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993410
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: So let me get this straight....

2006-10-25 Thread monkeyden

I have indeed looked at that.  Is there a way to customize the resulting
error message?

Dennis Byrne wrote:
> 
> Hello monkeyden,
> 
> You may want to look at the 'required' attribute for the JSF tag you are
> using.
> 
> Dennis Byrne
> 
>>-Original Message-
>>From: monkeyden [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, October 25, 2006 10:23 AM
>>To: users@myfaces.apache.org
>>Subject: So let me get this straight
>>
>>
>>Based on what I've read on this forum, which happens to be a very valuable
>>resource of mine, I find this to be true (corerect me if I'm wrong and
>>please excuse my fledgling knowledge of JSF):
>>
>>You cannot use a validator to do null value validation on a field, because
>>JSF doesn't call the validator if there is no value to validate.  As a
>>result, you cannot print custom error messages on the client, unless of
>>course you validate in the backing bean.
>>-- 
>>View this message in context:
http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993052
>>Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993410
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: So let me get this straight....

2006-10-25 Thread Dennis Byrne
Hello monkeyden,

You may want to look at the 'required' attribute for the JSF tag you are using.

Dennis Byrne

>-Original Message-
>From: monkeyden [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 25, 2006 10:23 AM
>To: users@myfaces.apache.org
>Subject: So let me get this straight
>
>
>Based on what I've read on this forum, which happens to be a very valuable
>resource of mine, I find this to be true (corerect me if I'm wrong and
>please excuse my fledgling knowledge of JSF):
>
>You cannot use a validator to do null value validation on a field, because
>JSF doesn't call the validator if there is no value to validate.  As a
>result, you cannot print custom error messages on the client, unless of
>course you validate in the backing bean.
>-- 
>View this message in context: 
>http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993052
>Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>




So let me get this straight....

2006-10-25 Thread monkeyden

Based on what I've read on this forum, which happens to be a very valuable
resource of mine, I find this to be true (corerect me if I'm wrong and
please excuse my fledgling knowledge of JSF):

You cannot use a validator to do null value validation on a field, because
JSF doesn't call the validator if there is no value to validate.  As a
result, you cannot print custom error messages on the client, unless of
course you validate in the backing bean.
-- 
View this message in context: 
http://www.nabble.com/So-let-me-get-this-straight-tf2507926.html#a6993052
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: AUTO_SCROLL de-/activation

2006-10-25 Thread Veit Guna
Hm, looks like a working workaround - but not for me :).
I would like to keep AUTO_SCROLL deactivated per default and only activated 
when needed...

regards,
Veit

 Original-Nachricht 
Datum: Wed, 25 Oct 2006 09:23:43 -0400
Von: Jeff Bischoff <[EMAIL PROTECTED]>
An: MyFaces Discussion 
Betreff: Re: AUTO_SCROLL de-/activation

> Veit,
> 
> I know of a *hack* or two that will disable AUTO_SCROLL on the page level.
> 
> For example, if you put the following somewhere on your page:
> 
> 
> 
> It will *break* the autoscroll feature, due to duplicate autoscroll 
> input boxes. I found out about this because it is the probable cause of 
> TOMAHAWK-713. There are also probably ways to break it (for a single 
> page) using javascript.
> 
> I don't know of anything in the framework yet to configure autoscroll 
> beyond simply "on" or "off".
> 
> [1] https://issues.apache.org/jira/browse/TOMAHAWK-713
> 
> Regards,
> 
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
> 
> Veit Guna wrote:
> > Hi.
> > 
> > It would be great if it would be possible to de-/activate the
> > AUTO_SCROLL behavior programmatically. As far as I read the mailing
> > list, actually there's no way to accomplish that.
> > 
> > On pages where validation errors occur and the submit button is on the
> > bottom of the page (after scrolling down), AUTO_SCROLL is a no-go,
> > because the user wouldn't see the message on top of the page. On the
> > other hand when scrolling a table through a pager for example it's
> > annoying that everytime the page pops to the top.
> > 
> > So, changing this behavior on page level would be nice.
> > 
> > Any ideas?
> > 
> > regards,
> > Veit
> > 
> > 
> > 
> 

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


Re: AUTO_SCROLL de-/activation

2006-10-25 Thread Jeff Bischoff

Veit,

I know of a *hack* or two that will disable AUTO_SCROLL on the page level.

For example, if you put the following somewhere on your page:



It will *break* the autoscroll feature, due to duplicate autoscroll 
input boxes. I found out about this because it is the probable cause of 
TOMAHAWK-713. There are also probably ways to break it (for a single 
page) using javascript.


I don't know of anything in the framework yet to configure autoscroll 
beyond simply "on" or "off".


[1] https://issues.apache.org/jira/browse/TOMAHAWK-713

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Veit Guna wrote:

Hi.

It would be great if it would be possible to de-/activate the
AUTO_SCROLL behavior programmatically. As far as I read the mailing
list, actually there's no way to accomplish that.

On pages where validation errors occur and the submit button is on the
bottom of the page (after scrolling down), AUTO_SCROLL is a no-go,
because the user wouldn't see the message on top of the page. On the
other hand when scrolling a table through a pager for example it's
annoying that everytime the page pops to the top.

So, changing this behavior on page level would be nice.

Any ideas?

regards,
Veit








Re: Help! Date-pattern for

2006-10-25 Thread Cagatay Civici
Hi,There's a JIRA issue for that which I've assigned to me, I just couldn't find the time to work on it.CagatayOn 10/25/06, davy.mailing
 <[EMAIL PROTECTED]> wrote:




 
Dear all
 
    i am using tomahawk now and I want to know how to change 
the Date-pattern for 
 
    thank a lot!



davy.mailing
2006-10-25




SNAPSHOT of Tomahawk

2006-10-25 Thread Scandelli Francesco








Hi,

 

I would need one the latest SNAPSHOT of Tomahawk but
the Apache services (nightly build) are down at the moment, could anyone send
me this jar?

 

Thanks

Francesco








Re: submitting forms with panelNavigation2

2006-10-25 Thread R. Müller
maybe no one has tested this special case, but from theoretical point of 
view should it work or not ?


R. Müller wrote:

hi group,

i'm wondering that it seems not possible to submit a form with a 
panelNavigation2-Item. I'm using a snapshot of tomahawk 1.1.4 :


this is my test-case :








  




  



the action-method is called and navigation works, but the setter-method 
'setYourText(String)' is never called.

if i use a simple commandButton instead everything works fine.

can someone confirm or comment this behaviour ?

regards

ronald