Done! It is now in the SVN (next nightly build). The new attribute for
inputCalendar is called @renderButtonAsImage and, if true, renders a
default calendar. We should allow in the future the possibility to
choose an alternative image.
Tomorrow I will add the attribute to the docs...

Regards,

Bruno

2005/8/4, Bruno Aranda <[EMAIL PROTECTED]>:
> IMHO, I prefer true/false to enumerations are they are easier to remember! :-)
> 
> I've already implemented this. Now I am going to have dinner, but
> later tonight I will test the code and submit the changes if
> everything is ok!
> 
> Bruno
> 
> 2005/8/4, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]>:
> > Sounds good.  Another way of specifying the way the popup button is to
> > be displayed would be something like:
> >
> > popupLauncher="image|button"
> >
> > I was looking at the standard JSF tags to see if there is a precedence
> > for which way to specify this (i.e., either as enumerated values or as a
> > boolean on one of the enumerations).  It appears that both ways of
> > specifying this type of thing are used.  For example,
> > <h:selectManyCheckbox> and <h:selectOneRadio> have a layout parameter:
> >
> > layout="lineDirection|pageDirection"
> >
> > and <f:convertDateTime> has a type parameter:
> >
> > type="time|date|both"
> >
> > and dateStyle:
> >
> > dateStyle="default|short|medium|long|full"
> >
> > Other paramters, however, use the true/false approach.  So I guess you
> > have your choice!
> >
> > - Brendan
> >
> >
> >
> > -----Original Message-----
> > From: Bruno Aranda [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 04, 2005 12:59 PM
> > To: MyFaces Discussion
> > Subject: Re: inputCalendar Component Questions
> >
> >
> > Don't worry, I will do it myself. The attribute name is going to be
> > 'popupButtonAsImage'. Somebody disagrees or has a better name?
> >
> > Bruno
> >
> > P.S. I sent my last answer to this thread to Warren only by mistake.
> > Here it is: ;-)
> >
> > 2005/8/4, Bruno Aranda <[EMAIL PROTECTED]>:
> > > Thanks Warren. Yesterday I changed that part of the code (it uses the
> > > writer directly now). You will have to adjust a little your code to
> > > render the image, and it would be nicer to allow the possibility to
> > > choose between the button (default) and the image using a component
> > > attribute ('renderButtonAsImage'). Feel free to submit a patch, if you
> > > want :-)
> > >
> > > Regards,
> > >
> > > Bruno
> > >
> > > 2005/8/4, Zhai, Warren [IT] <[EMAIL PROTECTED]>:
> > > > I have successfully converted the button to an image.  It's not that
> > hard, you just have to go to the source code and modify here and there.
> > > >
> > > > I have attached the source changes I made.
> > > >
> > > >         private String getScriptBtnText(String clientId, String
> > dateFormat, String popupButtonString) {
> > > >                 StringBuffer script = new StringBuffer();
> > > >
> > > >                 script.append(
> > > >                         "<img src='"
> > > >                                 +
> > AddResource.getResourceMappedPath("/images/controls/calendar/date.gif",
> > pageContext)
> > > >                                 + "' onclick='"
> > > >                                 + "jscalendarPopUpCalendar(this,
> > document."
> > > >                                 + getFormName()
> > > >                                 + "."
> > > >                                 + property
> > > >                                 + ",\"");
> > > >                 script.append(dateFormat);
> > > >                 script.append("\" , \"" + getTodayInyyyyMMdd());
> > > >                 script.append("\")' ");
> > > >
> > > >
> > script.append("onmouseover=\"this.style.cursor='hand';\" ");
> > > >
> > script.append("onmouseout=\"this.style.cursor='default';\" ");
> > > >                 script.append("/>");
> > > >
> > > >                 return script.toString();
> > > >         }
> > > >
> > > > There are a few other places where changes are necessary, but it's
> > really not that hard to do it yourself.
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Bruno Aranda [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, August 03, 2005 7:02 PM
> > > > To: MyFaces Discussion
> > > > Subject: Re: inputCalendar Component Questions
> > > >
> > > >
> > > > Hi Brendan
> > > >
> > > > I've submitted a fix for #1 now and it should be available in the
> > svn
> > > > and in the next nighlty. Please, if you can test it to see if this
> > is
> > > > what you need....
> > > >
> > > > #2 is a popular demand. I think we could allow the possibility to
> > > > render the button or an image using a new attribute
> > > > ('renderButtonAsImage'?) We could have a standard default image,
> > that
> > > > could be overriden by another image provided using an
> > > > 'imageButtonUrl'? attribute). This might be easy to do and
> > > > straight-forward.
> > > >
> > > > #3 You can use the styleClasses attributes provided in the
> > component:
> > > > monthYearRowClass, weekRowClass, dayCellClass, currentDayCellClass.
> > It
> > > > isn't enough for you? :-)
> > > >
> > > > Best regards,
> > > >
> > > > Bruno
> > > >
> > > > 2005/8/1, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]>:
> > > > > I have some questions about the "popup" version of the
> > inputCalendar
> > > > > component:
> > > > >
> > > > > 1. If I specify a styleClass for inputCalendar that specifies a
> > new
> > > > > font-size, and if that font size is smaller than the default
> > font-size,
> > > > > the text box containing the textual representation of the date
> > becomes
> > > > > shorter (as expected), but the button beside it remains the same
> > height,
> > > > > giving the component an awkward look.  Is there a way to address
> > this so
> > > > > that both controls are the same height if a new font-size is
> > specified?
> > > > >
> > > > > 2. Is there a way to specify an image link, rather than a button,
> > to
> > > > > launch the pop-up calendar
> > > > >
> > > > > 3. Is there a way to increase the font-size in the pop-up window?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > - Brendan
> > > > >
> > > >
> > >
> >
>

Reply via email to