[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: fmueller  XML
Profile for fmueller -> Messages posted by fmueller [16] Go to Page: 1, 2 Next 
Author Message
sounds like people being too lazy to extend their expressions with a simple "|.{0}", making the "if" you mentioned unnecessary, resulting in:

used pattern: <[a-z]{1}|.{0}>
<null> => false
<> => true
<a> => true
<ab> => false

but i think i have to live with it...
Dear Mr. Casa,

i would like to validate text-inputs against a given regex. unfortunately your function seems to return "true" even if the input is null or empty, which is wrong. e.g. an empty string doesn't match "[a-z]+", where you need at least one character.

the following function would do exactly what i would expect:
Code:
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 public class Test {
 
     private static boolean matches(String pattern, String input){
 	if(input == null) return false;
 	
 	Pattern p = Pattern.compile(pattern);
 	Matcher m = p.matcher(input);
 	
 	return m.matches();
     }
     
     public static void main(String[] args) {
 	String pattern = "[a-z]{1}";
 	
 	String input0 = null;
 	String input1 = "";
 	String input2 = "a";
 	String input3 = "ab";
 	
 	System.out.println("used pattern: <" + pattern + ">");
 	System.out.println("<" + input0 + "> => " + Test.matches(pattern, input0));
 	System.out.println("<" + input1 + "> => " + Test.matches(pattern, input1));
 	System.out.println("<" + input2 + "> => " + Test.matches(pattern, input2));
 	System.out.println("<" + input3 + "> => " + Test.matches(pattern, input3));
     }
 
 }
 


Result:
used pattern: <[a-z]{1}>
<null> => false
<> => false
<a> => true
<ab> => false
Same as the horizontal one, just vertical...
It would be nice if the spinner could select all text within the spinner when the user puts the focus into the control.
...something similar: it would be great to also define the flushing on a certain pane/container level...
...we manage in our tabs to sometimes have the wrong tab page visible, which does not fit to the current selection.

1. select second tab by user
2. select first tab by program
3. select second tab by user ==> tab index it still on first tab
the feature "focusable" that is now available on button/icon...: it would be nice to have this on all components that are focusable (including folablepane..)
we have a couple of hot key definitions e.g. on page level, so the popup menu gets quite large - so that the user does not find the most relevant ones. It would be nice to have an attribute "hotkeyonly" on menu item level, so that the menu item is not rendered, but is only working as hotkey reactor.
it would be nice to get a flush event (similar to flush event on componentl levelt) but now on row item level - whenever any content changed within the row...

...same with last row of a grid
a) It would be nice to better visualize if a grid owns the focus. E.g. by painting a border...

a1) currently you need to press cursor down twice in orer to select the first item

b) It would be nice to select a row from server side and set the focus into the first focusable component of the row. For the application it is not really possible to know which component is first because the user might have changed the column sequence.
Currently hotkeys with buttons/... are defined as global hotkeys, global means all UI parts, including popups. This leads to confusing situations in which a hot key is invoked multiple times because it may be defined on different popup pages.

One should be able to define with the hotkey if it is "really global" through all pages, or if it is avialbale "globally within a window".
Dear Mr. Casa,

i'd like to use your calendarfield-control to set date, time and datetime. but i consider the current behavior only viable for date only. i.e. date works fine, datetime returns when a day is clicked, and time fails to display time only instead of date only.

i'd expect the following behaviour for the three types:
- date: date only is fine so far
- datetime: maybe an "ok"-button would be better. a user will work from top to bottom and click on a date before choosing a time.
- time: should be reworked completely. there is no time selector, only a date selector.

the time selector should have formatted fields ("HH:mm", seconds optional), which are enabled for editing. and maybe an additional button on either side, displaying "+10"/"-10" to add/substract 10 minutes at once.

to all users: please tell me (and mr. mueller) what you think about it. maybe you have better or additional ideas.

thanks for reading,

Florian
not much different, except we're using a macro:
<t:calendarfield id="g_87" attributemacro="wb(myDispatchedBean, myBeanWrapper, myDateVar)" flush="true" format="date" timezone="GMT" width="120" />

..
however, discarding the macro and using something like value="#{d.myDispatchedBean.myBeanWrapper.myDateVar}" has no effect and still results in an argument type mismatch.

We watched the overriden "put"-Method of our AbstractBeanWrapper closely and saw a String passed as value-Object. Shouldn't that be a Date?
Hello Mr. Mueller,

looks like t:calendarfiled is back to returning Strings instead of Dates, thus messing up any setters that expect Dates.
=> java.lang.IllegalArgumentException: argument type mismatch
 
Profile for fmueller -> Messages posted by fmueller [16] Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.6 © JForum Team