Author |
Message |
|
Hi,
Björn, you are exactly right.
Since it was OK for our project to show the user decimal seperators according to his or her language,
- format="bigdecimal" and
- formatmask="0.00"
do exactly the job and nothing needs to be done in the UI Code.
Thank you very much, this job is done now.
Regards,
Björn
|
|
|
Hi,
Björn, are you sure that german users see german formatting and english users see english formatting?
I would say, the user, whatever language he or she has chosen, sees the number formatting of the language in which the server JVM runs ...
Regards,
Björn
|
|
|
Hi,
using "0.00" works, but unfortunately, it depends on the JVM default locale to decide wheter . or , is used as a decimal separator.
Is there any way in CaptainCasa to do what looks in the code like this:
Code:
DecimalFormatSymbols dfs = new DecimalFormatSymbols();
dfs.setDecimalSeparator(',');
decimalFormat.setDecimalFormatSymbols(dfs);
System.out.println(decimalFormat.format(1202.22));
//Output: 1202,22
Regards,
Björn
|
|
|
Hi,
my produkt owner wants me to display a BigDecimal with two digits after a comma. This would be the right way to display amounts of money:
- 17,55
- 17,50
- 17,00
I have already done the following:
- format="bigdecimal"
- formatmask="dec2"
For the examples mentioned above, this should work.
Unfortunately, there now happens something like:
- 35.000,00
How can I make sure that a comma (,) will be always used between the Euros and the Cents and nowhere else anything else?
Regards,
Björn
|
|
|
Hi,
we got today into a discussion about the question if the user could expect behaviour of a rich client, which cannot be fulfilled by it.
Example: Search through a Grid by Scrolling slowly through it. An Excel-experienced user might expect this from a rich client, but if you have tried that in CaptainCasa, you'll notice that it is barely possible or at least no fun.
My opinion on this is that a rich client looks like a desktop application, so the user expects it to behave like that. But in fact, it works like a web application and will therefore behave occasionally in a way which is contradicting to the users expectations.
First Step in this discussion is to gather behaviour which one could expect but which cannot be offered to the user due to the nature of a rich client. With "search by scroll" I have mentioned the first, I think.
Happy Discussing!
Björn
|
|
|
Thanks. This does exactly what I want.
I should have known this ...
Björn
|
|
|
Hi,
unfortunately, this is the horizontal scroll position.
I need the vertical scroll position.
But yes, if there were something like get/setVerticalScrollPosition, that wourd be exactly what I need.
Cheers,
Björn
|
|
|
Hi,
I am using longpolling to Push updated data into a fixgrid in my frontend.
When updating Data in the fixgrid (either changing elements or adding/deleting some), I make sure that the item is sorted into the grid by simply calling
Code:
fixgridListBinding.resort()
Unfortunately, this causes two problems:
Focus is lost.
Selection is lost.
The loss of the selection is no problem, I just need to grab the selectedItems before the resort and then reselect these items.
More interesting is the loss of the Focus. I have meanwhile tried ensureItemToBeDisplayed, but that results on the item being always focussed as the top row of the displayed rows (so if I select a line in the middle then the item and the focus "jumps up").
Does there exist any way to preserve and restore the vertical scroll position of a fixgrid?
Cheers,
Björn
|
|
|
Hi,
we have a product line software with an eclipse project for the basic project, called "product" and so called "projects" for customer-specific adaptations.
Assum in the "product" contains a JSP plus a corresponding UI Bean which defines some complete reasonable behaviour. Now a customer demands some adapted behaviour for his "project".
Intuitively, we'd simply like to subclass the UI Bean and use the specialized "project" UI bean for that customer.
Is that possible? If you had two Classes with the same CCGenClass-Annotation, how can I persuade CaptainCasa to use the more special one?
Are my explainations understandable at all?
Regards,
Björn
PS: Of course, variable behaviour can be always put out of the UI Beans themselves into delegates. Spring would enable me to achieve this variability in behaviour by default- and special- implementations of the Delegate. So the question is more, if the DataBinding/CCGenClass-Thing allows that to be done at a different level. I can imagine, that this is not possible at all.
|
|
|
Hi,
just my 2 cents: I have recently worked on the coloring of my application (mainly coloring of fixgrids).
Some can be defined as a client param and on the fixgrid:
- selectioncolor1/2
Some can only be defined on the fixgrid themselves:
- drawoddevenbackgroundodd/even
- bordercolor
- cellselectionbgpaint
And one can only be defined as a client param:
- rollovercolor1/2
Imho this is quite heterogenious. Though I can live with it well, I find the wish for anything as a client param understandable. It would make the whole thing more elegant.
Björn, you might want to think about making rollovercolor adaptable per fixgrid. That makes sense, because one sometimes uses fixgrids where it isn't a real table (see combofield examples in the demo project).
Please see this forum entry not as a request but more as a source of inspiration ;-)
Cheers,
Björn
|
|
|
Hi,
I also have done something like this quite recently, my UI Bean Code looks like this:
Code:
private EintragsTyp eintragsTyp = EintragsTyp.KEINE_AKTION;
/**
* @param eintragsTypAsString
* Die String-Repräsentation des Enum-Wertes, so dass er via {@link EintragsTyp#getEnum(String)} wiederhergestellt werden kann.
*/
public void setEintragsTyp(String eintragsTypAsString) {
this.eintragsTyp = EintragsTyp.getEnum(eintragsTypAsString);
}
/**
* @return the selection
*/
public String getEintragsTyp() {
String eintragsTypAsString = this.eintragsTyp.getName();
return eintragsTypAsString;
}
Additionally to this, which is all that is necessary for the JSP Binding, I have an additional Getter for the use in the normal Java Code:
Code:
public EintragsTyp getEintragsTypEnum() {
return this.eintragsTyp;
}
I have even written a few lines of code which make sure that the mapping from the enum to the String and vice versa works well.
Cheers,
Björn
|
|
|
Hi,
I have nothing to say here, but still support this feature request.
Not being able to do something as requested just seems awkward.
It would be nice if this kind of thing were possible.
Regards,
Björn
|
|
|
Hi,
in my scenario I used something like this:
Code:
<t:gridcol id="g_13" sortreference=".{sortInformation}" text="..." >
<t:pane id="g_14" padding="left:0;right:0;top:0;bottom:0" >
<t:row id="g_15" >
<t:label id="g_16" font=".{font}" text=".{information}" />
<t:label id="g_17" font="weight:bold" text=".{additionalInformation}" />
</t:row>
</t:pane>
</t:gridcol>
The sortreference attribute allows me to define how this multi-cell-column can be sorted.
Unfortunately, searching on this column is not possible.
My workaround now is (thanks to Björn Müllers hints) to go back to something like this:
Code:
<t:gridcol id="g_13" sortreference=".{sortInformation}" text="..." >
<t:label id="g_16" font=".{font}" text="<html>.{information} <b>.{additionalInformation}</b></html>" />
</t:gridcol>
Something like means that the putting together of the String with the html-Tags happens in the code and is exposed via Getter to the JSP.
Now everything works alright, but I still don't like it. It just doesn't look clean to me (I needed to put html tags and String concatenation into the Java code to make this work). Does the definition of the font-attribute even work if the content of the text-attribute is html?
If we had something like searchreference, data and presentation could be separated more clearly if we could let be this html stuff.
If that feature were in CaptainCasa, that would be great.
Thanks,
Björn
|
|
|
Hi,
to display A Date value in a fixgrid I use a label with format=datetime. It is displayed as expected, but if I use
Code:
#{d.SearchBarUI.grid.textSearcher.onNext}
... to search for any value which is just displayed (e.g. 26-Oct-2012 10:35:22) no results are found.
The problem seems to be that not the formatted Date is used for searching, but the Java-Date.
If that Bug could be solved, that would be great.
Thanks,
Björn
|
|
|
Hi,
thanks Björn for your support, the current version of
Code:
findSortComparatorForColumnValue
is exactly what I needed.
Thanks,
Björn
|
|
|