Re: Backing Bean Constructor

2006-10-02 Thread Craig McClanahan
On 10/2/06, Baker,Jonathan <[EMAIL PROTECTED]> wrote:
Troy,You may be interested in looking at Shale. (http://shale.apache.org/)The shale view controller is an interface that gives you some extraplug-in points in the JSF lifecycle.  One of these points is an init
call, which is guaranteed to run after your managed bean has beenconstructed and had all of its dependencies injected.In addition to the advantage you cite above, there's actually another ... if your code is buggy and throws an exception, it tends to be much easier to understand the stack trace when you use the init() method. 
For your list boxes you could also use the init method, or if you areusing the  tag to populate your pulldowns, you could use
any method you wanted to populate the pulldowns as long as that methodwas bound to the selectItems tag.  This method will get called everytimeyou render though, so you would probably only want to do that if your
lists were changing every request.If you are using Shale for the init() method on backing beans, it's also feasible to use the same concept on session scoped and application scoped managed beans, if they extend AbstractSessionBean/AbstractApplicationBean.  I tend to build my dropdown lists in the init() methods of one of these beans, in application scope (if the options are the same for all users) or in session scope (if they are user specific).
Example ... assume you have a list of product types that is to fill a dropdown, and the list is the same for everyone.  You could have an application scoped managed bean like this (under managed bean name "lists"):
    public class SelectItemLists extends AbstractApplicationBean {    public void init() {    ... populate the productTypes property ...    }    private SelectItem[] productTypes;
    public SelectItem[] productTypes() {    return productTypes;    }    ...    }Now, you can reference this in your component:    
        and, as a side effect of evaluating the binding _expression_, the first time this bean is accessed it will populate the lists and make them available.
JBCraig 


Re: Changing the label for f:selectItem

2006-10-02 Thread Gerald Müllan

Hi,

f:selectItems with binding the value to a corresponding getter (where
changing the item labels) after doing a submit should do the thing.

You can accomplish the submit by fireing an onchange event on client
side like this (component`s attribute):

onchange="this.form.submit()"

regards,

Gerald

On 10/2/06, a k <[EMAIL PROTECTED]> wrote:

Hi,

I am using f:selectItem to display the options for a radio button field. But
I have a requirement where I need to change the label of one of the options
dynamically. I am trying to accomplish this using client-side javascript w/o
making a round-trip to the server. Is this possible with f:selectItem? Are
there any components that give me the functionality that I am looking for?

Thanks!





--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: Date component

2006-10-02 Thread Gerald Müllan

When does the exception takes place?

I guess before coming into the actionListener method; Try to remove
the "throws exception" declaration, and move the prepared statement to
another place in code.

In general, you should do the data layer access separately from the
managed beans in another class.

regards,

Gerald

On 10/2/06, danielitob <[EMAIL PROTECTED]> wrote:


this is my managed bean user,i've declared it in session scope.
I've posted you only important code..i hope you help me,thanks.


public class User extends Visit {
private Date dataReg;
public void setDataReg(Date dataReg) {
this.dataReg = dataReg;
}

/**
 * @return Returns the teamname.
 * @uml.property name="teamname"
 */
public Date getDataReg() {
return dataReg;
}

public void AddNewUser(ActionEvent e) throws Exception {
pst = conn.prepareStatement("INSERT INTO
utente(username,password,nomegruppo,tipo,nome,cognome,citta,dataReg) VALUES
(?,?,?,?,?,?,?,?)");

pst.setString(1, login);

pst.setString(2, password);

pst.setString(3, teamname);

pst.setString(4, role);

pst.setString(5, firstName);

pst.setString(6, lastName);

pst.setString(7, city);

pst.setDate(8, dataReg);


pst.executeUpdate();
}


danielitob wrote:
>
> Hi guys,
> i was surprising to note how difficult is using an inputDate of
> Tomahawk...
> i've read many examples but i need a simplest solution...
> i've used in my jsf page
>
> 
> 
>
> 
>
> and i've a date columns in a mysql table.
> I've to read this value entered in my page and putting it into database...
> i do it in this manner
>
> pst.setDate(12, dataReg);
>
> (i've 12 fields in my table).
> When i do it i've
>
> java.lang.IllegalArgumentException: argument type mismatch
>
> How can i solve it?
> I need a converter?
> Please help me with code..thanks very much
>

--
View this message in context: 
http://www.nabble.com/Date-component-tf2369054.html#a6605484
Sent from the MyFaces - Users mailing list archive at Nabble.com.





--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


How To Workaround dynamic ID for datatable's etc...

2006-10-02 Thread Wesley Hales
So not having dynamic ID's will prevent cross site scripting attacks... So how must one workaround the issue of multiple components with the same id on one page? My issue is that I have multiple datatables on one page with the same id (I have a list of lists... after datatable loops throught the first list, a new datatable loops through the sub-list and uses the same id for each one) 
a.k.a nested tables in the detailStamp. All of the tables sort when I only want one of them to sort. Any help is greatly appreciated,Wesley Hales


Subform or ValueChangeNotifier with facelets?

2006-10-02 Thread nigelm

Hi people.

I use facelets. I have a fairly run-of-the-mill form that has a
selectOneListBox that shows entities that can be modified, and a heap of
controls that contain the values of the entity that has been selected in
that listbox.

I know I can't just sink the onchange javascript submit stuff because of the
lifecycle, and I know 2 solutions are to use the sandbox
valueChangeNotifier, or the sandbox subform stuff. Both look good.

However, neither is a simple drop-in for facelets - indeed, I can't see any
taghandler for using subforms at all.

So - should I go ahead with valueChangeNotifier? Is there a way to use
subforms? Is there a 'better' solution out there that I haven't found (the
fact that they're both sandbox items makes me wonder if I'm using the right
tools) ?

Cheers,
Nigel

-- 
View this message in context: 
http://www.nabble.com/Subform-or-ValueChangeNotifier-with-facelets--tf2372176.html#a6608811
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: Backing Bean Constructor

2006-10-02 Thread Baker,Jonathan
Troy,

You may be interested in looking at Shale. (http://shale.apache.org/)
The shale view controller is an interface that gives you some extra
plug-in points in the JSF lifecycle.  One of these points is an init
call, which is guaranteed to run after your managed bean has been
constructed and had all of its dependencies injected.

For your list boxes you could also use the init method, or if you are
using the  tag to populate your pulldowns, you could use
any method you wanted to populate the pulldowns as long as that method
was bound to the selectItems tag.  This method will get called everytime
you render though, so you would probably only want to do that if your
lists were changing every request.


JB

-Original Message-
From: Jeff Bischoff [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 02, 2006 3:18 PM
To: MyFaces Discussion
Subject: Re: Backing Bean Constructor

Troy,

Yes, you can use the constructor for these tasks, if it suits you. I
would be cautious though, what I put in a managed-bean constructor. Keep
in mind that the class will be automatically instantiated by the
framework any time it is looked up or otherwise referenced. I've gotten
myself into trouble by over-using the constructors.

In our project, we do still use the contstructors to load any drop-down
lists that are rather static. For loading live data or dynamic
drop-downs, however, we steer clear and go in favor of a load() method
which is explicitly called as a result of the business logic set in
motion by the command action.

Our pattern is far from perfect - we're just adapting as we go. I'd
suggest you play around with it a bit, and see what works best. Don't
rule out the use of the constructor, but don't abuse it either! ;)

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Troy Bull wrote:
> Greetings
> 
> I have a faces page that allows the user to edit a table in the 
> database.  What I want to do is in the constructor of the backing bean

> load up some data from the database so that it can be displayed and 
> edited on the faces page.  Is this considered bad form?  Also just off

> the top of my head is this a place I can also load collections that 
> will be used for drop down list boxes?
> 
> Please help, I don't want to do things the wrong way...
> 
> Troy
> 
> 
> 




Re: Backing Bean Constructor

2006-10-02 Thread Jeff Bischoff

Troy,

Yes, you can use the constructor for these tasks, if it suits you. I 
would be cautious though, what I put in a managed-bean constructor. Keep 
in mind that the class will be automatically instantiated by the 
framework any time it is looked up or otherwise referenced. I've gotten 
myself into trouble by over-using the constructors.


In our project, we do still use the contstructors to load any drop-down 
lists that are rather static. For loading live data or dynamic 
drop-downs, however, we steer clear and go in favor of a load() method 
which is explicitly called as a result of the business logic set in 
motion by the command action.


Our pattern is far from perfect - we're just adapting as we go. I'd 
suggest you play around with it a bit, and see what works best. Don't 
rule out the use of the constructor, but don't abuse it either! ;)


Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Troy Bull wrote:

Greetings

I have a faces page that allows the user to edit a table in the 
database.  What I want to do is in the constructor of the backing bean 
load up some data from the database so that it can be displayed and 
edited on the faces page.  Is this considered bad form?  Also just off 
the top of my head is this a place I can also load collections that will 
be used for drop down list boxes?


Please help, I don't want to do things the wrong way...

Troy








To tree2 gurus: How keep tree2 nodes closed?

2006-10-02 Thread Rogerio Pereira
Hi guys!I tried clientSideToggle="true" and preserveToggle="false" but when i open each node and click in a commandLink that just reload the view the tree nodes remains opened, why?Yours truly (Atenciosamente),
Rogério (_rogerio_)http://faces.eti.br


Re: Date component

2006-10-02 Thread Jeff Bischoff

daniel,

Is it a java.util.Date, java.sql.Date, or some other Date?
You haven't shown us your imports...

danielitob wrote:

this is my managed bean user,i've declared it in session scope.
I've posted you only important code..i hope you help me,thanks.


public class User extends Visit {
private Date dataReg;
public void setDataReg(Date dataReg) {
this.dataReg = dataReg;
}

/**
 * @return Returns the teamname.
 * @uml.property name="teamname"
 */
public Date getDataReg() {
return dataReg;
}

public void AddNewUser(ActionEvent e) throws Exception {
pst = conn.prepareStatement("INSERT INTO
utente(username,password,nomegruppo,tipo,nome,cognome,citta,dataReg) VALUES
(?,?,?,?,?,?,?,?)");

pst.setString(1, login);

pst.setString(2, password);

pst.setString(3, teamname);

pst.setString(4, role);

pst.setString(5, firstName);

pst.setString(6, lastName);

pst.setString(7, city);

pst.setDate(8, dataReg);


pst.executeUpdate();
}   


danielitob wrote:

Hi guys,
i was surprising to note how difficult is using an inputDate of
Tomahawk...
i've read many examples but i need a simplest solution...
i've used in my jsf page






and i've a date columns in a mysql table.
I've to read this value entered in my page and putting it into database...
i do it in this manner

pst.setDate(12, dataReg);

(i've 12 fields in my table).
When i do it i've

java.lang.IllegalArgumentException: argument type mismatch 


How can i solve it?
I need a converter?
Please help me with code..thanks very much








Backing Bean Constructor

2006-10-02 Thread Troy Bull

Greetings

I have a faces page that allows the user to edit a table in the 
database.  What I want to do is in the constructor of the backing bean 
load up some data from the database so that it can be displayed and 
edited on the faces page.  Is this considered bad form?  Also just off 
the top of my head is this a place I can also load collections that will 
be used for drop down list boxes?


Please help, I don't want to do things the wrong way...

Troy


Facelets and JSP editors/Bea Studio tool

2006-10-02 Thread Kevin Galligan

If anybody uses a JSP editor for their JSF development but wants to
use Facelets for the view technology, I've coded something that
*might* be useful.

I personally use Bea's (formerly M7's) JSP/JSF editor eclipse plugin.
Love it.  It doesn't support Facelets.  Since Facelets is so close to
JSP syntax, having a process convert the files during the build
process seemed like a reasonable approach.

http://www.bigheadco.com/jsptofacelets

It includes a maven plugin for converting the files during the build,
as well as an eclipse plugin that will convert files when saved.  If
you're an ant user, you can get the source from sourceforge and add an
ant target.  Better yet, I can set you up on the sourceforge project
and you can contribute.

In order to get the eclipse plugin to work, I added a more general
maven war builder eclipse plugin.  It essentially copies war project
output to the exploded directory when saved in eclipse (as opposed to
running the maven war plugin on each edit).

http://www.bigheadco.com/warplugineclipsebuilder

This should work with other JSP editors.  I've personally only used
the Bea one.  Well, and Exadel, but exadel has support for Facelets
built in, so its kind of pointless, right?

Comments welcome.

-Kevin


generated URLs and MyFaces

2006-10-02 Thread Marco Pöhler

Hi,

I want to build an archive for mails and this archive must be accessable 
by search engine robots, so javascript is not permitted and the URLs 
must be look like static one. I want to use JSF/MyFaces one the pages to 
build the search forms and present the search results. The only possible 
way I found is to create the links with a selfcreated linklist component 
to create the static-look-a-like links and route this to a servlet which 
populates the backing beans and forward to the jsf view.


This looks a little bit dirty to me, so if you have a suggestion

thanks in advance

Marco Pöhler
---
http://www.perfume-price-comparison.com
http://www.lenses-price-comparison.com




Master-Details and dataScroller

2006-10-02 Thread Ingo Düppe

Hi,

did I something wrong or is it a know issue. I have a master detail page 
containing to tables that each have its own dataScroller.  Now I have 
the following issue:

- First select a dataset within my master table
- This dataset has two pages of details
- Select the second page of the detail table
- Select another master dataset that contains less detail pages as the 
previous one.


The problem is that the dataScroller still displays the previous page 
but this is an empty table now.


Any suggestions?

Ingo


Re: Sandbox build on current svn module is broken

2006-10-02 Thread Mike Kienenberger

Hey Rogerio,

That'd be a Java 1.5-ism that snuck into the code.
It needs to be replaced with java 1.4 code.   There's probably
something in commons.lang.StringUtils that will do the same thing.
Please open a JIRA issue for this and attach a patch.


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

I'm getting this message:

C:\Rogerio\projetos\java\myfaces\tomahawk\sandbox\core\src\main\java\org\apache\
myfaces\custom\toggle\ToggleOutputLinkRenderer.java:[145,56]
replace(char,char)
in java.lang.String cannot be applied to (
java.lang.String,java.lang.String)

2006/10/2, Gerald Müllan <[EMAIL PROTECTED]>:
> Hi Rogerio,
>
> to me current sandbox head works fine; I let ran maven over the stuff,
> and all seems to work to me.
>
> What is the exactly problem? Which component?
>
> cheers,
>
> Gerald
>
> On 10/2/06, Rogerio Pereira < [EMAIL PROTECTED]> wrote:
> > Hi guys!
> >
> > I'm having problems compiling sandbox stuff, the reason is a bug in a
newer
> > component. Any ideas about how solve this?
> >
> > --
> > Yours truly (Atenciosamente),
> >
> > Rogério (_rogerio_)
> >  http://faces.eti.br
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>



--

Yours truly (Atenciosamente),

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


Re: Sandbox build on current svn module is broken

2006-10-02 Thread Rogerio Pereira
I'm getting this message:C:\Rogerio\projetos\java\myfaces\tomahawk\sandbox\core\src\main\java\org\apache\myfaces\custom\toggle\ToggleOutputLinkRenderer.java:[145,56] replace(char,char)in java.lang.String cannot be applied to (
java.lang.String,java.lang.String)2006/10/2, Gerald Müllan <[EMAIL PROTECTED]>:
Hi Rogerio,to me current sandbox head works fine; I let ran maven over the stuff,and all seems to work to me.What is the exactly problem? Which component?cheers,GeraldOn 10/2/06, Rogerio Pereira <
[EMAIL PROTECTED]> wrote:> Hi guys!>> I'm having problems compiling sandbox stuff, the reason is a bug in a newer> component. Any ideas about how solve this?
>> --> Yours truly (Atenciosamente),>> Rogério (_rogerio_)>  http://faces.eti.br--http://www.irian.at
Your JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces-- Yours truly (Atenciosamente),
Rogério (_rogerio_)http://faces.eti.br


Changing the label for f:selectItem

2006-10-02 Thread a k
Hi,I am using f:selectItem to display the options for a radio button field. But I have a requirement where I need to change the label of one of the options dynamically. I am trying to accomplish this using client-side _javascript_ w/o making a round-trip to the server. Is this possible with f:selectItem? Are there any components that give me the functionality that I am looking for?
Thanks!


Re: Sandbox build on current svn module is broken

2006-10-02 Thread Gerald Müllan

Hi Rogerio,

to me current sandbox head works fine; I let ran maven over the stuff,
and all seems to work to me.

What is the exactly problem? Which component?

cheers,

Gerald

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

Hi guys!

I'm having problems compiling sandbox stuff, the reason is a bug in a newer
component. Any ideas about how solve this?

--
Yours truly (Atenciosamente),

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



--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: Date component

2006-10-02 Thread danielitob

this is my managed bean user,i've declared it in session scope.
I've posted you only important code..i hope you help me,thanks.


public class User extends Visit {
private Date dataReg;
public void setDataReg(Date dataReg) {
this.dataReg = dataReg;
}

/**
 * @return Returns the teamname.
 * @uml.property name="teamname"
 */
public Date getDataReg() {
return dataReg;
}

public void AddNewUser(ActionEvent e) throws Exception {
pst = conn.prepareStatement("INSERT INTO
utente(username,password,nomegruppo,tipo,nome,cognome,citta,dataReg) VALUES
(?,?,?,?,?,?,?,?)");

pst.setString(1, login);

pst.setString(2, password);

pst.setString(3, teamname);

pst.setString(4, role);

pst.setString(5, firstName);

pst.setString(6, lastName);

pst.setString(7, city);

pst.setDate(8, dataReg);


pst.executeUpdate();
}   


danielitob wrote:
> 
> Hi guys,
> i was surprising to note how difficult is using an inputDate of
> Tomahawk...
> i've read many examples but i need a simplest solution...
> i've used in my jsf page
> 
> 
> 
>   
> 
> 
> and i've a date columns in a mysql table.
> I've to read this value entered in my page and putting it into database...
> i do it in this manner
> 
> pst.setDate(12, dataReg);
> 
> (i've 12 fields in my table).
> When i do it i've
> 
> java.lang.IllegalArgumentException: argument type mismatch 
> 
> How can i solve it?
> I need a converter?
> Please help me with code..thanks very much
> 

-- 
View this message in context: 
http://www.nabble.com/Date-component-tf2369054.html#a6605484
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: Date component

2006-10-02 Thread Gerald Müllan

Can you post a snippet of your managed bean here?

On 10/2/06, danielitob <[EMAIL PROTECTED]> wrote:


thanks,
i've tried with type value set to date but i've the same expection...
can someone help me?
I'vent understood where can be my problem..




Gerald M?llan wrote:
>
> Hi,
>
> normally you should not need a converter for just the simplest example.
>
> The "value" attribute of inputDate has only to be bound to a Date type
> in the backend, in your case is this dataReg. Maybe you also have to
> set the "type" attribute, e.g. to "date".
>
> Just have a look at our examples date page:
>
> http://www.irian.at/myfaces/date.jsf
>
> cheers,
>
> Gerald
>
> On 10/2/06, danielitob <[EMAIL PROTECTED]> wrote:
>>
>> Hi guys,
>> i was surprising to note how difficult is using an inputDate of
>> Tomahawk...
>> i've read many examples but i need a simplest solution...
>> i've used in my jsf page
>>
>> 
>> 
>>
>> 
>>
>> and i've a date columns in a mysql table.
>> I've to read this value entered in my page and putting it into
>> database...
>> i do it in this manner
>>
>> pst.setDate(12, dataReg);
>>
>> (i've 12 fields in my table).
>> When i do it i've
>>
>> java.lang.IllegalArgumentException: argument type mismatch
>>
>> How can i solve it?
>> I need a converter?
>> Please help me with code..thanks very much
>> --
>> View this message in context:
>> http://www.nabble.com/Date-component-tf2369054.html#a6599625
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>

--
View this message in context: 
http://www.nabble.com/Date-component-tf2369054.html#a6602958
Sent from the MyFaces - Users mailing list archive at Nabble.com.





--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Sandbox build on current svn module is broken

2006-10-02 Thread Rogerio Pereira
Hi guys!I'm having problems compiling sandbox stuff, the reason is a bug in a newer component. Any ideas about how solve this?-- Yours truly (Atenciosamente),Rogério (_rogerio_)
http://faces.eti.br


Re: Date component

2006-10-02 Thread danielitob

thanks,
i've tried with type value set to date but i've the same expection...
can someone help me?
I'vent understood where can be my problem..




Gerald M?llan wrote:
> 
> Hi,
> 
> normally you should not need a converter for just the simplest example.
> 
> The "value" attribute of inputDate has only to be bound to a Date type
> in the backend, in your case is this dataReg. Maybe you also have to
> set the "type" attribute, e.g. to "date".
> 
> Just have a look at our examples date page:
> 
> http://www.irian.at/myfaces/date.jsf
> 
> cheers,
> 
> Gerald
> 
> On 10/2/06, danielitob <[EMAIL PROTECTED]> wrote:
>>
>> Hi guys,
>> i was surprising to note how difficult is using an inputDate of
>> Tomahawk...
>> i've read many examples but i need a simplest solution...
>> i've used in my jsf page
>>
>> 
>> 
>>
>> 
>>
>> and i've a date columns in a mysql table.
>> I've to read this value entered in my page and putting it into
>> database...
>> i do it in this manner
>>
>> pst.setDate(12, dataReg);
>>
>> (i've 12 fields in my table).
>> When i do it i've
>>
>> java.lang.IllegalArgumentException: argument type mismatch
>>
>> How can i solve it?
>> I need a converter?
>> Please help me with code..thanks very much
>> --
>> View this message in context:
>> http://www.nabble.com/Date-component-tf2369054.html#a6599625
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://www.irian.at
> 
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Date-component-tf2369054.html#a6602958
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Disable flushing for Tomahawk?

2006-10-02 Thread Jan Peter Stotz
Hi,

at the moment I am trying to use the Tomahawk inputCalendar component
within a  environment. Th result is the following exception:

javax.servlet.ServletException: javax.servlet.jsp.JspException:
Illegal to flush within a custom tag

I found some similar cases for other tag-libraries which solved this
problem by disabling flushing for the specific library. I tried to do
this with Tomahawk as well but I did not find any clue how to do this.

Therefor my question is:
How can I configure the Tomahawk library to disable flushing?

Best Regards, Jan


Re: Date component

2006-10-02 Thread Gerald Müllan

Hi,

normally you should not need a converter for just the simplest example.

The "value" attribute of inputDate has only to be bound to a Date type
in the backend, in your case is this dataReg. Maybe you also have to
set the "type" attribute, e.g. to "date".

Just have a look at our examples date page:

http://www.irian.at/myfaces/date.jsf

cheers,

Gerald

On 10/2/06, danielitob <[EMAIL PROTECTED]> wrote:


Hi guys,
i was surprising to note how difficult is using an inputDate of Tomahawk...
i've read many examples but i need a simplest solution...
i've used in my jsf page






and i've a date columns in a mysql table.
I've to read this value entered in my page and putting it into database...
i do it in this manner

pst.setDate(12, dataReg);

(i've 12 fields in my table).
When i do it i've

java.lang.IllegalArgumentException: argument type mismatch

How can i solve it?
I need a converter?
Please help me with code..thanks very much
--
View this message in context: 
http://www.nabble.com/Date-component-tf2369054.html#a6599625
Sent from the MyFaces - Users mailing list archive at Nabble.com.





--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Date component

2006-10-02 Thread danielitob

Hi guys,
i was surprising to note how difficult is using an inputDate of Tomahawk...
i've read many examples but i need a simplest solution...
i've used in my jsf page






and i've a date columns in a mysql table.
I've to read this value entered in my page and putting it into database...
i do it in this manner

pst.setDate(12, dataReg);

(i've 12 fields in my table).
When i do it i've

java.lang.IllegalArgumentException: argument type mismatch 

How can i solve it?
I need a converter?
Please help me with code..thanks very much
-- 
View this message in context: 
http://www.nabble.com/Date-component-tf2369054.html#a6599625
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Portlet problem WSRP/Oracle

2006-10-02 Thread Martin Fekete
hi, im using Oracle portal 10.1.2.x, i got working enviroment for deploying 
JSR-168 portlets (succesfully deployed and tested sample portlets).
i got problem with deploying JSF-based portlet 
(org.apache.myfaces.portlet.MyFacesGenericPortlet). This portlet works in 
Jetspeed 2, application works in Oc4J, portlet & app is succesfully started, 
but when i want to display portlet i got this exception


06/10/02 09:59:08 BOF_JSF_PORTAL: An internal error has occurred in method 
getMarkup()

javax.faces.FacesException: javax.portlet.PortletException
at 
org.apache.myfaces.context.portlet.PortletExternalContextImpl.dispatch(PortletExternalContextImpl.java:175)
at 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:195)

at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:322)
at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:297)
at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:379)
at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:265)

at javax.portlet.GenericPortlet.doDispatch(Unknown Source)
at javax.portlet.GenericPortlet.render(Unknown Source)
at oracle.webdb.wsrp.server.Server.getMarkup(Unknown Source)
at 
oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.invoke_getMarkup(WSRP_v1_Markup_PortType_Tie.java:224)
at 
oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.processingHook(WSRP_v1_Markup_PortType_Tie.java:499)

at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:230)
at 
com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:153)

at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)

at oracle.webdb.wsrp.server.ContextFilter.doFilter(Unknown Source)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)

at java.lang.Thread.run(Thread.java:534)
Caused by: javax.portlet.PortletException
at oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source)
at 
org.apache.myfaces.context.portlet.PortletExternalContextImpl.dispatch(PortletExternalContextImpl.java:164)

... 25 more
Caused by: javax.servlet.ServletException: Invalid URL 
"wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-mode=wsrp%3Aview&wsrp-windowState=wsrp%3Anormal&wsrp-secureURL=false&wsrp-interactionState=org.apache.myfaces.portlet.MyFacesGenericPortlet.VIEW_ID%3D%252Findex.jsp/wsrp_rewrite"
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:595)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:537)

at _index._jspService(_index.java:202)
at com.orionserver[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)

at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121)

... 27 more
06/10/02 09:59:08 BOF_JSF_PORTAL: An internal error has occurred in method 
getMarkup()

javax.faces.FacesException: javax.portlet.PortletException
at 
org.apache.myfa

Re: selectOneRadio

2006-10-02 Thread Bruno Aranda

You can disable a SelectItem by using its method setDisabled(boolean),
so the user select it. Cheers,

Bruno

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

Thanks a lot. I found my error. I did not have the correct value in my
Motive4.

Just another question as well: is it possible to disable a selectOneMenu but
let the user see what there is in the list? I do not want the user to change
his selection but I want him to be able to see all items of the list...

Thanks
Sophie

-Message d'origine-
De: Gerald Müllan [mailto:[EMAIL PROTECTED]
Envoyé: lundi 2 octobre 2006 09:10
Ŕ: MyFaces Discussion; [EMAIL PROTECTED]
Objet: Re: selectOneRadio

Hi,

if this still doesn`t work, just post the managed bean code here.

cheers,

Gerald

On 10/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I am using a selectOneRadio list displayed on my jsp page but I would like
> only to display this list with a default selected value. For example I
would
> like to display the following list:
>
>   Motive1
>   Motive2
>   Motive3
> X Motive4
>   Motive5
>
> And I want Motive4 to be selected and not be able to change this
selection.
> I was thinking to give the value Motive4 to Myclass.absenceMotive but then
> nothing is selected in my page, what can I do to do that?
>
>  disabled="true"
> 
> 
>
> Thanks
>
>


--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces




RE: selectOneRadio

2006-10-02 Thread sjarlier
Thanks a lot. I found my error. I did not have the correct value in my
Motive4. 

Just another question as well: is it possible to disable a selectOneMenu but
let the user see what there is in the list? I do not want the user to change
his selection but I want him to be able to see all items of the list...

Thanks
Sophie

-Message d'origine-
De : Gerald Müllan [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 2 octobre 2006 09:10
À : MyFaces Discussion; [EMAIL PROTECTED]
Objet : Re: selectOneRadio

Hi,

if this still doesn`t work, just post the managed bean code here.

cheers,

Gerald

On 10/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I am using a selectOneRadio list displayed on my jsp page but I would like
> only to display this list with a default selected value. For example I
would
> like to display the following list:
>
>   Motive1
>   Motive2
>   Motive3
> X Motive4
>   Motive5
>
> And I want Motive4 to be selected and not be able to change this
selection.
> I was thinking to give the value Motive4 to Myclass.absenceMotive but then
> nothing is selected in my page, what can I do to do that?
>
>  disabled="true"
> 
> 
>
> Thanks
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



Portlet problem WSRP/Oracle

2006-10-02 Thread Martin Fekete



hi, im using 
Oracle portal 10.1.2.x, i got working enviroment for deploying JSR-168 
portlets (succesfully deployed and tested sample portlets).i got problem 
with deploying JSF-based portlet 
(org.apache.myfaces.portlet.MyFacesGenericPortlet). This portlet works in 
Jetspeed 2, application works in Oc4J, portlet & app is succesfully 
started, but when i want to display portlet i got this 
exception06/10/02 09:59:08 BOF_JSF_PORTAL: An internal error has 
occurred in method getMarkup()javax.faces.FacesException: 
javax.portlet.PortletExceptionat 
org.apache.myfaces.context.portlet.PortletExternalContextImpl.dispatch(PortletExternalContextImpl.java:175)at 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:195)at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:322)at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:297)at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:379)at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:265)at 
javax.portlet.GenericPortlet.doDispatch(Unknown Source)at 
javax.portlet.GenericPortlet.render(Unknown Source)at 
oracle.webdb.wsrp.server.Server.getMarkup(Unknown Source)at 
oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.invoke_getMarkup(WSRP_v1_Markup_PortType_Tie.java:224)at 
oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.processingHook(WSRP_v1_Markup_PortType_Tie.java:499)at 
com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:230)at 
com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:153)at 
com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at 
com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)at 
oracle.webdb.wsrp.server.ContextFilter.doFilter(Unknown Source)at 
com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)at 
com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)at 
com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)at 
com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)at 
com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)at 
com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)at 
java.lang.Thread.run(Thread.java:534)Caused by: 
javax.portlet.PortletExceptionat 
oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source)at 
org.apache.myfaces.context.portlet.PortletExternalContextImpl.dispatch(PortletExternalContextImpl.java:164)... 
25 moreCaused by: javax.servlet.ServletException: Invalid URL 
"wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-mode=wsrp%3Aview&wsrp-windowState=wsrp%3Anormal&wsrp-secureURL=false&wsrp-interactionState=org.apache.myfaces.portlet.MyFacesGenericPortlet.VIEW_ID%3D%252Findex.jsp/wsrp_rewrite"at 
com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:595)at 
com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:537)at 
_index._jspService(_index.java:202)at com.orionserver[Oracle Application 
Server Containers for J2EE 10g 
(10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)at 
oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)at 
oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)at 
oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at 
com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)at 
com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121)... 
27 more06/10/02 09:59:08 BOF_JSF_PORTAL: An internal error has occurred in 
method getMarkup()javax.faces.FacesException: 
javax.portlet.PortletExceptionat 
org.apache.myfaces.context.portlet.Por

Re: commandLink

2006-10-02 Thread Marco Pöhler

Moin Udo,

The commandLink syntax looks good to me, but the HtmlCommandLink alwalys 
uses JavaScript, so be sure that your target browser can handle it.


hope that helps

Marco

---
http://www.kontaktlinsen-preisvergleich.de
http://www.lenses-price-comparison.com

[EMAIL PROTECTED] schrieb:

Hi,

i don't understand why my commandLink will not work!
My Configuration:
All MyFaces 1.1.3 libraries with facelets.
I use this source in my view:








The navigation is in the faces-config.xml:

success
/home.xhtml



Well, the commandButton works fine, the commandLink will NOT WORK!
(I also tried MyFaces 1.1.4 with no success...)
WHY???
Can somebody help me?!?!

Thanx in advance.

Udo






  





Re: panelNavigation2

2006-10-02 Thread NABA


Hi Jeff
What JAR versions are you using? 

Sun RI 1.2
Tomahawk 1.1.3


Otherwise, it depends on the version you are using. Does it work if 
you use NavigationMenuItems instead of commandNavigation2?

The NavigationMenuItems doesn't  work!!
Error:

/org.apache.jasper.JasperException: Parent was not null, but this component not 
related

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)/

.
What can I do??
Is the Navigation Rules in the faces-config.xml related to the 
panelNavigation??

What I want is to expand and the menu!!
thanks for help


[1] 
http://www.nabble.com/MyFaces-1377-min-fix-versions--tf2306196.html#a6513844 



Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

NABA wrote:

Hi...
I would like use the PanelNavigation2.
I copy from the myfaces-example all what i need (code, bean, bundle).
It dos not working.
I click on the PanelNavigation but the commandNavigation dos not expand.
There is not any error message.
On the same jsp the tree2 component works well.
A part of a jsp:
/


itemClass="mypage"

activeItemClass="selected" openItemClass="selected">

action="#{navigationMenu.getAction1}"

actionListener="#{navigationMenu.actionListener}">

› 
value="#{navigation_messages['panelnav_serach1']}" />



actionListener="#{navigationMenu.actionListener}">

› 
value="#{navigation_messages['panelnav_serach_acc1']}" />

/
 ..

I attach the web.xml to this mail.
can anyone see, where is the error?
or what I didnt attend??

thanks for any help





http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

Test


javax.faces.STATE_SAVING_METHOD
server


org.apache.myfaces.ALLOW_JAVASCRIPT
true


org.apache.myfaces.PRETTY_HTML
true


org.apache.myfaces.DETECT_JAVASCRIPT
false


org.apache.myfaces.AUTO_SCROLL
true




MyFacesExtensionsFilter

org.apache.myfaces.webapp.filter.ExtensionsFilter


maxFileSize
20 MB


uploadThresholdSize
100k



MyFacesExtensionsFilter


Faces Servlet




MyFacesExtensionsFilter
/faces/myFacesExtensionResource/*



Faces Servlet
javax.faces.webapp.FacesServlet
1


Faces Servlet
*.jsf


SourceCodeServlet


org.apache.myfaces.shared_tomahawk.util.servlet.SourceCodeServlet




SourceCodeServlet
*.source


BASIC










Re: selectOneRadio

2006-10-02 Thread Gerald Müllan

Hi,

if this still doesn`t work, just post the managed bean code here.

cheers,

Gerald

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

Hi!

I am using a selectOneRadio list displayed on my jsp page but I would like
only to display this list with a default selected value. For example I would
like to display the following list:

  Motive1
  Motive2
  Motive3
X Motive4
  Motive5

And I want Motive4 to be selected and not be able to change this selection.
I was thinking to give the value Motive4 to Myclass.absenceMotive but then
nothing is selected in my page, what can I do to do that?




Thanks





--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces