Customizing the Cells in the DatePicker in GWT - gwt

I was looking to customize the cells in the GWT DatePicker widget. By that I mean instead of showing only the date such as: "1" for the first day of the month, I want to display "1 (My Birthday)" or any other information in the parentheses. (I want the info to be rendered dynamically).
I tried creating my own CalendarView to do so but that was extremely complicated. Is there any other way that you know to do so?
Thanks!

So I didn't receive a response for a while and assumed that there is no other way to do so. In order to implement what I needed, I created my own custom CalendarView that closely resembled the DefaulCalendarView class. After doing so I added functionality to it and can now display anything on the cells.

Related

ngx-bootstrap: date input with modal datepicker

I'm trying to implement an input for date that has the datepicker in a modal.
The docs cover datepicker and modal - but not the combination.
I am sort of following this, but do I need to create a whole component for the modal? I'm not really sure how to build this.
An example would be very helpful.
As far as I can determine, while it is certainly a very popular request, it is currently not possible.
https://github.com/valor-software/ngx-bootstrap/issues/273

Auto-refresh a ListView within a ViewPager?

I'm having a bit of trouble approaching an auto-refresh design I want to implement.
Currently I have a TitlePageIndicator that sets its view pager with a PagerAdapter.
Each page in the view pager is a listview that is constructed based on a list of date strings.
In my instantiateItem() method, I call an AsyncTask to load data based on the date. This works well, and loads the way I want.
I recently changed all my listviews to PullToRefresh list views, in order to make sure a user could update the data on a date they wished to have the most up-to-date info on. (This also works the way I desire).
However now I want to somehow refresh a certain date in the view pager (Current date for instance) - every 60 seconds. So I'm not refreshing all the listivews in the viewpager, i'm just refreshing the one I want.
I started making a timer thread based on this :
Update TextView within custom ListView
But soon got very stumped and I'm not sure what to do next..
Can someone point me in the right direction?

Dynamic number of buttons on GWT UI

I have a MVP type application where I will have a view that contains one or more buttons. The number of buttons is not known till run time and may vary each time the page is rendered. What is the best way to approach this apart from a simple loop that will just display 1 - n number of buttons that are passed to the view?
My suggestion: Add all the buttons on creation and use CSS to hide or show them dynamically. I think this will yield less DOM manipulations and still works the same, also it might produce a simpler code. I currently do it that way using SmartGwt.

Alternatives for picker in iphone/iOS app?

I am showing a form the user fills in my iPhone app. One of the fields is a set of 2 or 3 dates from which the user has to pick one. Putting a picker, or bringing up a table view just for this takes up too much space, leaving no room for the other fields. Is there any simpler way to do this?
To do this you can put two or three arrowed label with text like "Select Date" upon click of it you can show one view that allow user to select the date; once selected you can back to the original view. You can do this for all three (or two) dates and get those date on form view.
I am giving you idea of how you can design apps; if you want code i can assist that too but from your question it seems you want design ideas.
You can go for your custom drop down/combo box, but their is no inbuilt functionality present for this.
Also following is mentioned in apple HIG guideline, you need to consider those as well-
(http://developer.apple.com/library/IOs/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html)
Guidelines
Use a picker to make it easy for people to choose from a set of values. It’s often best to use a picker when people are familiar with the entire set of values. This is because many, if not most, of the values are hidden when the wheel is stationary. If you need to provide a large set of choices that aren’t well known to your users, a picker might not be the appropriate control.
Consider using a table view, instead of a picker, if you need to display a very large number of values. This is because the greater height of a table view makes scrolling faster.
Use the translucent selection bar to display contextual information, such as a unit of measurement. Do not display such labels above the picker or on the wheel itself.
On iPad, present a picker only within a popover. A picker is not suitable for the main screen.

GWT implementing-- Sophistication of CellTable behavior, flexibility of CellList look

With a GWT CellTable its possible to add different columns that handle the click event in different ways.
For example lets say we have 3 columns:
an Avatar Image (ImageCell),
a name (TextCell),
checkbox (Checkbox
cell).
Then image adding these events:
When the ImageCell is clicked we can open a popup.
When the checkbox is clicked select the row.
When the name is clicked open the users profile.
With a CellTable it's straight forward to accomplish this.
However what if we wanted a view that doesn't look like a table. The CellTable is tied to a HTML Table for its implementation. Why not allow for a general HTML implementation of the CellTable (behavioral) API.
Using a CellList we can accomplish any view. But the API isn't as sophisticated as the CellTable. It would be cool if we could add something analogs to CellTable 'Columns' to a CellList.
Is there anyway to accomplish this with the current Cell Widgets? I might have over looked something.
Thanks!
I think there are two solutions:
Use a CellTable and style it so that it looks like a CellList. This should be quite straightforward and possible. However you would have to play with the CSS styles a little bit. Best approach would be to use Firebug to change the styles on the fly and see the results instantly
Use a CellList and create a custom cell which renders and handles events for your use case (Avatar, Name and Checkbox). This is more involved but there is a tutorial on the GWT page.
I would probably try to go with solution 2 because it also teaches you how to create custom Cells which might come in handy later on.
Update:
As Thomas suggested in the comments you can use a CompositeCell which wraps 3 different cells. That's probably the easiest way to implement it.