Author |
Message |
|
Hi,
ok, maybe I rephrase my Question: If _you_ use longpollig, please let me know: have you ever seen this kind of log errors?
Thanks,
Björn
|
|
|
Hi,
I use few Modal and Modeless Popup where I need to pass width and height into. No problem, I pick some values and they look well on my screen. Using 0,0 for automatic popup sizing is not possible at any time, so I need to stick to this static size definition.
I'm afraid that what works on my screen could look bad on other monitors (Maybe because they're bigger and the Popup looks very small or vice versa).
So my Idea is: If I know the width and height of the client screen then I could implement something adaptive for that screen, e.g. that a Popup opens at 1/3 of the screen height and 2/3 of screen width).
In Code it would look like this:
Code:
popup.open(
popupUi.getPageName(),
this.messageSource.getMessage("popup_headline", getLocale()),
(getScreenWidth()*2)/3,
(getScreenHeight())/3,
new DefaultModalPopupListener(popup)
);
Spontaniously, I have no idea how I would implement getScreenWidth() and getScreenHeight(). Any hints how this can be accomplished, are welcome.
Thanks,
Björn
|
|
|
...OK, here the dev tool is a bit too pessimistic! ;-)
So I just ignore that and maybe the Dev Tools will be smarter sometime in the future (to check all menuitems if they have an actionListener already)?
This is some weird habit of me to feel incomfortable whenever I need to ignore warnings of my tools ;-)
Thanks for your help, I got my Shortcut-Focus now quite well done.
Cheers,
Björn
|
|
|
Hi,
ad2: Thanks, that is the hint I needed.
ad1: Right, and I do already exactly as you write. Problem is, I need to _use_ the popupmenu somewhere, so I use it in my rowbodypane. But if I do that, the Dev tools critisize me for not providing an actionListener on that rowbodypane, which, as you wrote, is unnessecary because we use the actionListener on the MenuItem.
In code:
Code:
<t:rowbodypane ... popupmenu="FOCUSMENU" ... >
The Dev Tools Logic says that if there is a popupmenu, there needs to be an actionlistener too, but you and I know better. Is there a way to convince the dev tools of our opinion? Or would you suggest a different place to _use_ out Popupmenu?
Thanks,
Björn
|
|
|
Hi,
OK, that works almost perfectly.
I define a Popup Menu in outmost position:
Code:
<t:popupmenu id="FOCUSMENU" >
<t:menuitem id="g_61" actionListener="#{d.VorgangsEditorUI.searchBarUI.focusSearchField}" hotkey="ctrl-70" text="focusMe!" />
</t:popupmenu>
If I now use popupmenu=FOCUSMENU in my rowbodypane than I can use crtl-F whenever I have focus anywhere in my application and it does what I want.
My problems are now:
1. I would rather not do this popupmenu=FOCUSMENU (so the definition of the popupmenu is fine for my, but I don't want to use it in any concrete component explicitly), because I then need to provide an ActionListener which I don't need.
2. I need to make the popupmenu invisible, but I cannot use rendered=false, because then nothing works.
Do you have any Ideas how to tackle these problems?
Thanks,
Björn
|
|
|
Hi,
I have a Text field which represents a searchbox above a Grid (so it simply uses #{d.SearchBarUI.grid.textSearcher.text}, where SearchBarUI is a PageBean and properly initialized with a reference on the grid it shall search in).
What I want now is that the cursor is set into the field when I push Ctrl+F.
t:field does not have a hotkey attribute, otherwise that would probably do the job.
Which possibilities do I have to achieve what I want?
Thanks,
Björn
|
|
|
Hi,
if anybody is interessted in the cause of the problem: The height of the tile was defined by me to be 33%;200. Collapsing the tile collapsed it down to 200px.
The solution was that Björn fixed that in CaptainCasa. So that sideeffect should no longer appear from the next release on.
Thanks BJörn for your analysis of this issue.
Cheers,
Björn
|
|
|
Thanks, it would be cool if that were possible in the future.
|
|
|
Hi,
if I take a normal Grid, and I select on line, I can easily select the next line by just using key-down on my keyboard.
When I use multiselect=true on a Grid, I can use the mouse and Ctrl Or Shift Key to select multiple lines.
Unfortunately, holding the shift key down and then using key-down or key-up to select multiple lines of a grid does not work. One can only use multiselect by using both mouse and keyboard.
Would it be possible to bring these two together to enable the user to use multiselect by keyboard only?
Regards,
Björn
|
|
|
Hi,
for some weird feeling of intuition I tried to do the following:
JSP:
Code:
<t:row id="g_13" >
<t:label id="g_14" text="Static I18N Test" width="150" />
<t:label id="g_15" text="#{rr.literals['literals.usage.static']}" />
</t:row>
<t:row id="g_16" >
<t:label id="g_17" text="Dynamically used literal" width="150" />
<t:label id="g_18" text="#{d.HelloWorldUI.resourceLiteralExpression}" />
</t:row>
Java Ui class:
Code:
public String getResourceLiteralExpression() {
return "#{rr.literals['literals.usage.dynamic']}";
}
Properties-File:
Code:
literals.usage.dynamic=Dynamically used literal
literals.usage.static=Statically used literal
This (the second way to internationalize) does not work since the expression is resolved once, but for my "expression in expression" scenario it would need to be resolved twice (first the property in the UI class and with the result of this the literal of the properties file).
Björn, could you imagine that it could be possible to resolve expressions iteratively until it's no expression any more.
The reason why I find it desirable to do this is the fact that, as long as you use unparameterized literals, UI classes would only need to know about the message keys and could be language- and message-source-agnostic. I hope this does not seem too weird of an idea to you.
Regards,
Björn
|
|
|
Another small question regarding longtextfield: My Development tools complain that I don't provide an action listener on my longtextfield. Why? Can I turn this actionListener off? I think I don't need it in my case.
Thanks,
Björn
|
|
|
Hi,
I got the following scenario: I have three tiles in a tiled area (as in maximized.jpg). If I use the Collapse-Button in the titlebar of one tile, the content disappears, but the Tile is not collapsed to the titlebar (please see minimized1.jpg). If I then push around the tiles in the tiled area, the collapsed tile is collapsed as I would have expected in the first place (see minimized2.jpg).
My project manager isn't too happy about how things look in minimized1.jpg. Is there a way to let this look as correct as in minimized2.jpg?
Oh yes, still to mention: What you see here is rendered via a page browser in Swing.
Regards,
Björn
|
|
|
Hi,
are there any news here?
A longtextfield which can be made readonly but still have that longtextpopup-functionality would be great.
Regards,
Björn
|
|
|
Hi,
it seems I have not expressed myself good enough.
As long as I am in my code, args are no Problem ...
But when i am in my JSP, I do the following:
Code:
<... text="#{rr.resource['message_key']}"
If I have then defined in resources.properties ...
Code:
message_key=Message with Placeholder {0} inside
... I cannot pass an argument to be filled into the placeholder. The resource mechanism does not seem to give me a chance to pass args into the tag. I guess this is simply a fact, isn't it?
Regards,
Björn
|
|
|
We check...
Thanks for checking!
Or, even better: use FIXGRIDComponent and directly access setSbvisibleamotun(..)...
How exactly do you mean?
I'd like to rephrase my code from:
Code:
private ComponentNode createFixgridComponentNode() {
ComponentNode fixgridComponentNode = new ComponentNode("t:fixgrid");
fixgridComponentNode.addAttribute("objectbinding", "#{d.DemoGridDyn.rows}");
fixgridComponentNode.addAttribute("width", "100%");
fixgridComponentNode.addAttribute("height", "100%");
fixgridComponentNode.addAttribute("sbvisibleAmount", "25");
fixgridComponentNode.addAttribute("verticalscrollmode", "always");
return fixgridComponentNode;
}
to
Code:
private ComponentNode createFixgridComponentNode() {
FIXGRIDComponent fixgridComponentNode = new FIXGRIDComponent();
fixgridComponentNode.setObjectbinding("#{d.DemoGridDyn.rows}");
fixgridComponentNode.setWidth("100%");
fixgridComponentNode.setHeight("100%");
fixgridComponentNode.setSbvisibleamount("25");
fixgridComponentNode.setVerticalscrollmode("always");
return fixgridComponentNode;
}
Unfortunately, this does not work, since FIXGRIDComponent doesn't have these setters. How would you rephrase this piece of code?
Thanks,
Björn
|
|
|