Disabled inputText Value

2006-05-04 Thread Uri Kalish








Use case:

A user fills a
value in an inputText field, checks a radio button that causes the field to
become disabled, and submits the form.

After the user
submits, the value received is null, no matter what the field displays on the
UI



Is there a way
to retrieve that value although the field is disabled, or must I use an extra hidden
field and update it by _javascript_.





__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__





RE: Disabled inputText Value

2006-05-04 Thread Uri Kalish
Thanks dude. I found the problem. It's an HTML form thing - A form submitting 
will not post disabled fields.
Because in the case of error I want to re-display the page exactly as it was 
when the user submitted (I don't want fields changed by the user to jump to 
default values just because he clicked a radio that made them disabled)...
No choice but to use an extra hidden field and update it by java script when 
the regular field changes.
Very low-tech I'm afraid...



From: Le Van [mailto:[EMAIL PROTECTED]
Sent: Fri 05-May-06 04:18
To: MyFaces Discussion
Subject: Re: Disabled inputText Value



Uri Kalish wrote:

 Use case:

 A user fills a value in an inputText field, checks a radio button that
 causes the field to become disabled, and submits the form.

 After the user submits, the value received is null, no matter what the
 field displays on the UI...

 Is there a way to retrieve that value although the field is disabled,
 or must I use an extra hidden field and update it by java script.


 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email
 __

As I know you can't retrieve value from input field that is disabled. I
try it by using java script



__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__winmail.dat

Who called my bean?

2006-05-01 Thread Uri Kalish








Navigation rules:
page1  page2 and page2  page2

On the
constructor of bean2 - how can I know who navigated to my bean (page1 or page2)?

I prefer (if
possible) not to send parameter on the request from bean1.









__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__





RE: Who called my bean?

2006-05-01 Thread Uri Kalish








Thanks, will
try that.

















From: Cagatay Civici
[mailto:[EMAIL PROTECTED] 
Sent: Monday, May 01, 2006 11:49
AM
To: MyFaces Discussion
Subject: Re: Who called my bean?





Hi,

Using the built-in headerValues variable may solve the problem. It is a map
containing the key called referrer.

Regards,

Cagatay



On 5/1/06, Uri
Kalish [EMAIL PROTECTED]
wrote:





Navigation rules: page1  page2 and page2  page2

On the constructor of bean2 - how can I
know who navigated to my bean (page1 or page2)?

I prefer (if possible) not to send
parameter on the request from bean1.








__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__











__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__





ManagedBean Existence Check?

2006-04-30 Thread Uri Kalish








Is there a
function to check for existence of a managed bean?

The createValueBinding
function is no good because it always returns a managed bean (creates one if it
doesnt exist).









__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__





f:param and commandButton

2006-04-27 Thread Uri Kalish








When I send a parameter
from a commandButton I get a string containing the word null from
the parameters map.

If I use a
commandLink instead - it works.

Any ideas?





h:commandButton

id=addNewLoadTestReservationButton

 action="">

 value=#{msgs.addNewLoadTestReservationButton}

 styleClass=button_action 

  f:param name=reservation
value=0/

/h:commandButton

h:commandLink

id=addNewLoadTestReservationLink

 action=""


  h:outputText value=#{msgs.addNewLoadTestReservationButton}/

 f:param name=reservation
value=0/

/h:commandLink













__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__





RE: f:param and commandButton

2006-04-27 Thread Uri Kalish










This is not good for me.

I navigate to another page and need this value on the second bean (not
the first bean connected to the page sending the parameter).

The parameter is accessible to the second bean also.









From: Murat Hazer
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006
4:09 PM
To: MyFaces Discussion
Subject: Re: f:param and
commandButton





You can use t:updateActionListener with command
button, also you can read http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters
for additional info.


regards



On 4/27/06, Uri
Kalish [EMAIL PROTECTED]
wrote:





When I send a parameter from a
commandButton I get a string containing the word null from the
parameters map.

If I use a commandLink instead - it
works.

Any ideas?





h:commandButton

id=addNewLoadTestReservationButton


action="">


value=#{msgs.addNewLoadTestReservationButton}

 styleClass=button_action



 f:param name=reservation
value=0/

/h:commandButton

h:commandLink

id=addNewLoadTestReservationLink


action=""



 h:outputText value=#{msgs.addNewLoadTestReservationButton}/


f:param name=reservation value=0/

/h:commandLink












__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__








-- 
Murat HAZER
Elektrik-Elektronik Mühendisi - Electrical-Electronics Engineer
Tel - Phone: +90 222 335 05 80 - 1395
Cep Tel - Mobile Phone: +90 532 472 00 63 
Blog URL: http://www.projedunyasi.org
Yahoo Group: http://groups.yahoo.com/group/malatyafenlisesi/






__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__





Know who called my managed bean

2006-04-27 Thread Uri Kalish








The navigation
rules are:

bean1  bean2

bean2  bean2 (on error)



I want to differentiate
between these two cases on the constructor of bean2.











__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__





RE: ManagedBean Get and Set Values on Constructor

2006-04-26 Thread Uri Kalish
Thanks for the solution, but...
If I understand correctly these are all solutions just to make the
passing of the selected employee id parameter from the table on the
employees list page to the employees list bean more elegant without
using java script and hidden field.

Still...
Case 1. The employee details bean (second bean) will have to get the id
from the  employees list bean (first bean).
Case 2. Sometimes we submit the details bean and will arrive to the same
page again (some error).
So the details bean will have to set its values (load the details from
the database) by the id. Sometimes it will come from another bean (case
1) and sometimes from the same bean (case 2).

If it will try to set the values on its constructor, this can be done
for case 1 by the facesContext/createValueBinding trick, but for case 2
- we are in trouble because at constructor it's too early (its setters
hasn't been called yet).

Does this mean that we are forced to set the id on the constructor on
case 1 and load details ON EACH OF THE DETAILS BEAN GETTERS (i.e. Check
if we already loaded the employee object from the database, if not -
load, set the property value by the object value, return the value)???






-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Matthias Wessendorf
Sent: Tuesday, April 25, 2006 7:29 PM
To: MyFaces Discussion
Subject: Re: ManagedBean Get and Set Values on Constructor

You also should take a look on UISaveState [2]

[2] http://wiki.apache.org/myfaces/SaveState

On 4/25/06, Matthias Wessendorf [EMAIL PROTECTED] wrote:
 Hi Uri,

 you can do all the *ugly* parameter handling, but you should go ahead
and use
  t:updateActionListener/.


 For instance you have a grid like
 h:dataTable var=analysemappe
 value=#{analysisFolderMaster.analysisfolders}...

 /h:dataTable

 You could do something like

 h:commandButton
   value=Details
   styleClass=stdButton
   action=details

 t:updateActionListener
property=#{analysisFolderDetail.analysisFolder}
   value=#{analysemappe} /
 /h:commandButton



 This commandButton will navigate you to a *detail* page and passes the
 current grid object (#{analysemappe}) to analysisFolder-property of
 the backing bean analysisFolderDetail.


 On the detail page you can do stuff like

 h:outputText value=#{analysisFolderDetail.analysisFolder.name}/

 See also [1] for more. Also you could uses Shale's ViewController.

 -Matthias

 [1]
http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters


 On 4/25/06, Uri Kalish [EMAIL PROTECTED] wrote:
 
 
 
  We have a page displaying a list of objects.
 
  When a user clicks on an object we want to display and edit the
object
  details on another page.
 
 
 
  So...
 
  A user clicks on an object on page1.
 
  We save the object id (by java script) to a hidden field on page1
(bound to
  a field on ManagedBean1) and submit page1.
 
  On ManagedBean1 code we navigate to page2.
 
  ManagedBean2 gets the id from the field on ManagedBean1 (by
facesContext and
  createValueBinding) and saves it to a field (bound to a hidden field
on
  page2).
 
  It happen ON THE CONSTRUCTOR of ManagedBean2 because it needs the
object id
  in order to initialize its fields from the database.
 
 
 
  Now...
 
  If we now want to refresh page2 (e.g. due to some error)... we can't
get the
  id on time (because getting the id is done on the ManagedBean2
constructor
  before it restores its values from the page).
 
 
 
  Any ideas regarding best practice for this issue?
 
 
 
 
 
 
 
__
   This email has been scanned by the MessageLabs Email Security
System.
   For more information please visit
  http://www.messagelabs.com/email
 
__
 


 --
 Matthias Wessendorf
 Aechterhoek 18
 48282 Emsdetten
 http://jroller.com/page/mwessendorf
 mwessendorf-at-gmail-dot-com



--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
http://jroller.com/page/mwessendorf
mwessendorf-at-gmail-dot-com

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


RE: ManagedBean Get and Set Values on Constructor

2006-04-26 Thread Uri Kalish
But only to the first bean connected to the page. We need this data on
the second bean.

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Matthias Wessendorf
Sent: Wednesday, April 26, 2006 12:43 PM
To: MyFaces Discussion
Subject: Re: ManagedBean Get and Set Values on Constructor

well, t:updateActionListener allows you to pass objects,
that's what I have done with it.

ids are possible at all

-Matthias

On 4/26/06, Uri Kalish [EMAIL PROTECTED] wrote:
 Thanks for the solution, but...
 If I understand correctly these are all solutions just to make the
 passing of the selected employee id parameter from the table on the
 employees list page to the employees list bean more elegant without
 using java script and hidden field.

 Still...
 Case 1. The employee details bean (second bean) will have to get the
id
 from the  employees list bean (first bean).
 Case 2. Sometimes we submit the details bean and will arrive to the
same
 page again (some error).
 So the details bean will have to set its values (load the details from
 the database) by the id. Sometimes it will come from another bean
(case
 1) and sometimes from the same bean (case 2).

 If it will try to set the values on its constructor, this can be done
 for case 1 by the facesContext/createValueBinding trick, but for case
2
 - we are in trouble because at constructor it's too early (its setters
 hasn't been called yet).

 Does this mean that we are forced to set the id on the constructor on
 case 1 and load details ON EACH OF THE DETAILS BEAN GETTERS (i.e.
Check
 if we already loaded the employee object from the database, if not -
 load, set the property value by the object value, return the value)???






 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of
 Matthias Wessendorf
 Sent: Tuesday, April 25, 2006 7:29 PM
 To: MyFaces Discussion
 Subject: Re: ManagedBean Get and Set Values on Constructor

 You also should take a look on UISaveState [2]

 [2] http://wiki.apache.org/myfaces/SaveState

 On 4/25/06, Matthias Wessendorf [EMAIL PROTECTED] wrote:
  Hi Uri,
 
  you can do all the *ugly* parameter handling, but you should go
ahead
 and use
   t:updateActionListener/.
 
 
  For instance you have a grid like
  h:dataTable var=analysemappe
  value=#{analysisFolderMaster.analysisfolders}...
 
  /h:dataTable
 
  You could do something like
 
  h:commandButton
value=Details
styleClass=stdButton
action=details
 
  t:updateActionListener
 property=#{analysisFolderDetail.analysisFolder}
value=#{analysemappe} /
  /h:commandButton
 
 
 
  This commandButton will navigate you to a *detail* page and passes
the
  current grid object (#{analysemappe}) to analysisFolder-property
of
  the backing bean analysisFolderDetail.
 
 
  On the detail page you can do stuff like
 
  h:outputText value=#{analysisFolderDetail.analysisFolder.name}/
 
  See also [1] for more. Also you could uses Shale's ViewController.
 
  -Matthias
 
  [1]

http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters
 
 
  On 4/25/06, Uri Kalish [EMAIL PROTECTED] wrote:
  
  
  
   We have a page displaying a list of objects.
  
   When a user clicks on an object we want to display and edit the
 object
   details on another page.
  
  
  
   So...
  
   A user clicks on an object on page1.
  
   We save the object id (by java script) to a hidden field on page1
 (bound to
   a field on ManagedBean1) and submit page1.
  
   On ManagedBean1 code we navigate to page2.
  
   ManagedBean2 gets the id from the field on ManagedBean1 (by
 facesContext and
   createValueBinding) and saves it to a field (bound to a hidden
field
 on
   page2).
  
   It happen ON THE CONSTRUCTOR of ManagedBean2 because it needs the
 object id
   in order to initialize its fields from the database.
  
  
  
   Now...
  
   If we now want to refresh page2 (e.g. due to some error)... we
can't
 get the
   id on time (because getting the id is done on the ManagedBean2
 constructor
   before it restores its values from the page).
  
  
  
   Any ideas regarding best practice for this issue?
  
  
  
  
  
  
  
 __
This email has been scanned by the MessageLabs Email Security
 System.
For more information please visit
   http://www.messagelabs.com/email
  
 __
  
 
 
  --
  Matthias Wessendorf
  Aechterhoek 18
  48282 Emsdetten
  http://jroller.com/page/mwessendorf
  mwessendorf-at-gmail-dot-com
 


 --
 Matthias Wessendorf
 Aechterhoek 18
 48282 Emsdetten
 http://jroller.com/page/mwessendorf
 mwessendorf-at-gmail-dot-com

 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email

RE: ManagedBean Get and Set Values on Constructor

2006-04-26 Thread Uri Kalish
If you use save state to save the whole object it will require you to
serialize your whole object which we don't like.

If you use save state to save just the object id you still have a
problem because you don't know when to load the object from the database
on the second bean (employee details).

So I guess there are only 2 solutions left for me:

1. Use session scope second bean (employee details) and initialize it
from the first bean (employees list).

Or 

2. From the first bean - send the object id as a parameter on the
request.
On the second bean - Load the object on the constructor if the parameter
exists on the request. If not do nothing.

I'm afraid I can't think of any other solutions :-(



 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Matthias Wessendorf
Sent: Wednesday, April 26, 2006 2:21 PM
To: MyFaces Discussion
Subject: Re: ManagedBean Get and Set Values on Constructor

have you used t:saveState/
or did I just get you wrong ?



On 4/26/06, Uri Kalish [EMAIL PROTECTED] wrote:
 But only to the first bean connected to the page. We need this data on
 the second bean.



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of
 Matthias Wessendorf
 Sent: Wednesday, April 26, 2006 12:43 PM
 To: MyFaces Discussion
 Subject: Re: ManagedBean Get and Set Values on Constructor

 well, t:updateActionListener allows you to pass objects,
 that's what I have done with it.

 ids are possible at all

 -Matthias

 On 4/26/06, Uri Kalish [EMAIL PROTECTED] wrote:
  Thanks for the solution, but...
  If I understand correctly these are all solutions just to make the
  passing of the selected employee id parameter from the table on the
  employees list page to the employees list bean more elegant without
  using java script and hidden field.
 
  Still...
  Case 1. The employee details bean (second bean) will have to get the
 id
  from the  employees list bean (first bean).
  Case 2. Sometimes we submit the details bean and will arrive to the
 same
  page again (some error).
  So the details bean will have to set its values (load the details
from
  the database) by the id. Sometimes it will come from another bean
 (case
  1) and sometimes from the same bean (case 2).
 
  If it will try to set the values on its constructor, this can be
done
  for case 1 by the facesContext/createValueBinding trick, but for
case
 2
  - we are in trouble because at constructor it's too early (its
setters
  hasn't been called yet).
 
  Does this mean that we are forced to set the id on the constructor
on
  case 1 and load details ON EACH OF THE DETAILS BEAN GETTERS (i.e.
 Check
  if we already loaded the employee object from the database, if not -
  load, set the property value by the object value, return the
value)???
 
 
 
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of
  Matthias Wessendorf
  Sent: Tuesday, April 25, 2006 7:29 PM
  To: MyFaces Discussion
  Subject: Re: ManagedBean Get and Set Values on Constructor
 
  You also should take a look on UISaveState [2]
 
  [2] http://wiki.apache.org/myfaces/SaveState
 
  On 4/25/06, Matthias Wessendorf [EMAIL PROTECTED] wrote:
   Hi Uri,
  
   you can do all the *ugly* parameter handling, but you should go
 ahead
  and use
t:updateActionListener/.
  
  
   For instance you have a grid like
   h:dataTable var=analysemappe
   value=#{analysisFolderMaster.analysisfolders}...
  
   /h:dataTable
  
   You could do something like
  
   h:commandButton
 value=Details
 styleClass=stdButton
 action=details
  
   t:updateActionListener
  property=#{analysisFolderDetail.analysisFolder}
 value=#{analysemappe} /
   /h:commandButton
  
  
  
   This commandButton will navigate you to a *detail* page and passes
 the
   current grid object (#{analysemappe}) to analysisFolder-property
 of
   the backing bean analysisFolderDetail.
  
  
   On the detail page you can do stuff like
  
   h:outputText
value=#{analysisFolderDetail.analysisFolder.name}/
  
   See also [1] for more. Also you could uses Shale's ViewController.
  
   -Matthias
  
   [1]
 

http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters
  
  
   On 4/25/06, Uri Kalish [EMAIL PROTECTED] wrote:
   
   
   
We have a page displaying a list of objects.
   
When a user clicks on an object we want to display and edit the
  object
details on another page.
   
   
   
So...
   
A user clicks on an object on page1.
   
We save the object id (by java script) to a hidden field on
page1
  (bound to
a field on ManagedBean1) and submit page1.
   
On ManagedBean1 code we navigate to page2.
   
ManagedBean2 gets the id from the field on ManagedBean1 (by
  facesContext and
createValueBinding) and saves it to a field (bound to a hidden
 field
  on
page2).
   
It happen ON THE CONSTRUCTOR of ManagedBean2 because it needs
the
  object

ManagedBean Get and Set Values on Constructor

2006-04-25 Thread Uri Kalish








We have a page
displaying a list of objects.

When a user
clicks on an object we want to display and edit the object details on another
page.



So

A user clicks on
an object on page1.

We save the
object id (by _javascript_) to a hidden field on page1 (bound to a field on
ManagedBean1) and submit page1. 

On ManagedBean1
code we navigate to page2.

ManagedBean2 gets
the id from the field on ManagedBean1 (by facesContext and createValueBinding) and
saves it to a field (bound to a hidden field on page2).

It happen ON
THE CONSTRUCTOR of ManagedBean2 because it needs the object id in order to
initialize its fields from the database.



Now

If we now want
to refresh page2 (e.g. due to some error) we cant get the id on
time (because getting the id is done on the ManagedBean2 constructor before it restores
its values from the page).



Any ideas
regarding best practice for this issue?











__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__





selectOneRadio inner components

2006-02-13 Thread Uri Kalish
Hi,
Motivation:
I use selectOneRadio and try to 'associate' components to radio buttons so
they can be enabled/disabled through the radio check/uncheck (attached
screenshot).
Problem:
I can't insert any components 'between' the radio buttons. I can only
display the radios as a vertical or horizontal line.

Any solution to this problem?



__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__attachment: radios.JPG


RE: selectOneRadio inner components

2006-02-13 Thread Uri Kalish
Thanks Volker and Martin.
I'll give it a try...


 

-Original Message-
From: Volker Weber [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 13, 2006 5:10 PM
To: MyFaces Discussion
Subject: Re: selectOneRadio inner components

Hi,

maybe you can use layout=spread and t:radio see:

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

Regards,
  Volker

Uri Kalish wrote:
 Hi,
 Motivation:
 I use selectOneRadio and try to 'associate' components to radio buttons so
 they can be enabled/disabled through the radio check/uncheck (attached
 screenshot).
 Problem:
 I can't insert any components 'between' the radio buttons. I can only
 display the radios as a vertical or horizontal line.
 
 Any solution to this problem?
 
 
 
 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email 
 __
 
 
 
 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


RE: Architecture question

2006-02-09 Thread Uri Kalish








In our application, a typical model object
is a slightly enhanced DTO containing the obvious primitives, other domain
objects, getters and setters, but also methods that can be fully completed just
by using data on the object itself (e.g. validate object fields, cloning the
object...).

Every other functionality like using
the object in some use case flow or saving the object to persistency is done
elsewhere (the object is passed as a parameter to other objects that do all the
required work with this object).

This way the object can travel safely
between tiers without the risk of exposing a method on the wrong tier (e.g. call
to save to persistency on the presentation tier).



Hope that helps...

Uri.







On 2/9/06, Nicklas Karlsson [EMAIL PROTECTED]
wrote:

 A related architechture question I sometimes wonder about
is:



 Should the model POJO:s be kept as clean DTO:s or
should they have member

 functions for operations also, and

 if there are operations, how complex should they be
allowed to be before I

 should break them into e.g. static calls in

 a business logic class? If they are not separated, the
model and the

 businessl logic melts into a mess.







--

Alexandre Poitras

Québec, Canada





__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__






Sandbox Schedule Component to Tomahawk?

2006-02-05 Thread Uri Kalish








- When will the Sandbox Schedule component
become a part of Tomahawk?







__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__






Schedule component

2006-01-10 Thread Uri Kalish








Hi,

I'm looking for a view similar to the Outlook Calendar.

I saw the Schedule component but it's currently on the
Sandbox project. 

Does anybody know when will it become an 'official'
Tomahawk component?

Who can I contact for more details about this component?







__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__