Groups > IBM > Studio400 > Re: Is there any way to let calendar display only in webfacing application<br> ?




Is there any way to let calendar display only in webfacing

Is there any way to let calendar display only in webfacing
Thu, 12 Jul 2007 12:21:46 EDT
In webfacing application, sometime we add calendar websettings into DDS file to
display calendar. When click calendar icon, the calendar will pop up. After
select date, the chosen date will appear in the input field.

Is there any way to let calendar display only and not update the input field? 


Thanks 

Post Reply
Re: Is there any way to let calendar display only in webfacing application
Thu, 12 Jul 2007 12:48:02 -040
robin_gong@yahoo.com wrote:
> In webfacing application, sometime we add calendar websettings into DDS
file to display calendar. When click calendar icon, the calendar will pop up.
After select date, the chosen date will appear in the input field.
> 
> Is there any way to let calendar display only and not update the input
field? 
> 
> 
> Thanks 
> 
> Robin Gong

That would, it seems, depend upon the capabilities of the calendar that 
you are using.  It might make more sense just to not show the icon to 
open the calendar when you don't want the field updated.

Post Reply
Re: Is there any way to let calendar display only in webfacing
Thu, 12 Jul 2007 16:21:19 EDT
Thanks Mike.

We have this scenario that one field sometime is input capable and sometimes it
is not input capable. Right now calendar will update each of these cases.

Is there any way to control that when the field is input capable, update the
field; when the field is not input capable, do not update the field or disable
the calendar?


Post Reply
Re: Is there any way to let calendar display only in webfacing application<br>
Thu, 12 Jul 2007 16:40:31 -040
robin_gong@yahoo.com wrote:
> Thanks Mike.
> 
> We have this scenario that one field sometime is input capable and
sometimes it is not input capable. Right now calendar will update each of these
cases.
> 
> Is there any way to control that when the field is input capable, update
the field; when the field is not input capable, do not update the field or
disable the calendar?
> 
> 
> Robin 


I am sure that it is possible. I would use whatever condition is making 
the input field to be not input capable (protected?) to hide the 
appearance of the calendar control.  You would have to maybe look into 
the generated jsp to see what is going on for the field I guess and do a 
similar thing for the calendar.

Post Reply
Re: Is there any way to let calendar display only in webfacing application<br> ?
Fri, 13 Jul 2007 16:54:38 -040
Robin,

We had a similar situation here, except we did not want the calendar to 
display if they could not change the date.  We also used the onDblClick 
event to call the routine popUpCalendar(this,this,"YYYMMDD").  Here is
the 
start of the routine:

 function popUpCalendar(ctl, ctl2, format) {
  var leftpos=0
  var toppos=0
  var theday;

  if (ctl2.readOnly) {
     return;
  }

If the field is read-only, it exits and no calendar is displayed.  You can 
probably adapt that to prevent the field from updating.  As a side note, I 
am not sure you want to display an image to click for protected dates..  It 
might give users the impression that they can change the value.  Just a 
thought.

We also have a unique style (we call blueField) to indicate that the user 
can double click on the field for a calendar.  We did not want that style so 
we put the following in the override style field of the designer:

<%if (isProtected || BAD153R1.evaluateIndicatorExpression(" 78"))
{%>
    wf_rightJustify wf_pr wf_hi wf_borderOff wf_default wf_field
<% } else { %>
     blueField
<% } %>

I formatted it to make it more readable.  If isProtected is true or 
indicator 78 is on, the field is protected so use the default styles. 
BAD153R1 is the format.

Hope this helps

Rob

<robin_gong@yahoo.com> wrote in message 
news:139937223.1184271710054.JavaMail.wassrvr@ltsgwas010.sby.ibm.com...
> Thanks Mike.
>
> We have this scenario that one field sometime is input capable and 
> sometimes it is not input capable. Right now calendar will update each of 
> these cases.
>
> Is there any way to control that when the field is input capable, update 
> the field; when the field is not input capable, do not update the field or

> disable the calendar?
>
>
> Robin 

Post Reply
<< Previous 1 2 Next >>
( Page 1 of 2 )
about | contact