How to return specific HTTP result code on HTTP request

2009-12-04 Thread Petr Fejfar
Hi all,

I'm not able to find-out how to respond on HTTP request
(via mounted URL) by setting HTTP result code
to specific value e.g. 402 (Payment required) etc...

Pls, could somebody push me forward?


Thx, pf

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket + Hibernate without Spring for lazy loading

2009-10-04 Thread Petr Fejfar
On Mon, Oct 5, 2009 at 5:12 AM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:

 I really don't want to bloat my code to implement Spring but if it is the 
 only way to do it then I will.

When I've started learning of Wicket few month ago, my position was
the similiar: I'd like to avoid stuff like Maven, Spring etc... I
found out Databinder as well and tried it. But I was not able to make
it running with Hibernate, just with HSQLDB.

So we've decided to continue with Spring, Maven... We've increased our
overhead little bit, but once we define beans, we do not care about
them any more. There was only one pitfall: manually invoking injection
of non-visual components. After few month I must say that Spring seems
to be the least problematic part of our projects.


Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



What is preferred/recommended way to localize texts of non-visual components

2009-09-30 Thread Petr Fejfar
Hi all,

I have an enum type e.g.

public enum MapType
UNDEFINED,ROADMAP,MOBILE,SATELITE,TERRAIN,HYBRID;

public static String toKeyword(MapType mapType) {
switch (mapType) {
  case ROADMAP:
  return roadmap;
  ...

public static MapType fromKeyword(final String keyword) {
final String kw = keyword.toLowerCase();
if (kw.equals(roadmap))
return ROADMAP;
else if ...



and I'd like to localize a verbal representation of particular elements
which I could share throughout Wicket application in many places.
i.e. I need something like this:

public static String verbose(MapType mapType) {
switch (mapType) {
  case ROADMAP:
  return getString(verbROADMAP);
  ...


What is a preferred/recommended way to localize it?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: What is preferred/recommended way to localize texts of non-visual components

2009-09-30 Thread Petr Fejfar
On Wed, Sep 30, 2009 at 4:40 PM, Ernesto Reinaldo Barreiro
reier...@gmail.com wrote:

Thank you for the prompt reply to all of you.

 for org.apache.wicket.resource.loader.PackageStringResourceLoader

Currently I used iteration through getStringResourceLoaders(), later
on I'd like to implement EnumConverted as adviced by Matthias Keller.

BTW, why all of those IStringResourceLoaders have overloaded methods
  loadStringResource(Class?, String, )
  loadStringResource(Component, String, )

but Localizer's getStrings() supports just Components? Should/could
not be there methods accepting classes as well?

Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to run wicket-stuff phonebook example?

2009-09-28 Thread Petr Fejfar
Hi all,

few months ago I've run wicket-stuff phonebook examples and it worked.

No I'd like to study it again, hence I downloaded wicket-stuff from the trunk,
run command  mvn clean install  with result BUILD SUCCESSFUL.

But on command mvn jetty:run, I've got exception:

org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name 'dataSource' defined in class path
resource [common.xml]:
  Instantiation of bean failed; nested exception is
java.lang.NoClassDefFoundError:
  org/apache/commons/pool/impl/GenericObjectPool

I'd expect that Maven will download all modules the example
depends on... What shall I do to make the example running on my machine?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to run wicket-stuff phonebook example?

2009-09-28 Thread Petr Fejfar
On Mon, Sep 28, 2009 at 8:41 PM, Maarten Bosteels
mbosteels@gmail.com wrote:

 Someone changed the version of commons-dbcp from 1.2.2 to 20030825.18442
 (revision 4964)
 I have reverted that change, and the phonebook seems to work now.

Yes, it works now.


Thanks for your help, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



DataTable, ChoiceFilteredPropertyColumn, Choice renderer and values translated via M:1 association

2009-09-24 Thread Petr Fejfar
Hi all,

please, could somebody push me forward how to implement ChoiceRenderer
of ChoiceFilteredPropertyColumn? I seem to be lost among data
providers and models little bit...

I followed Wicket-stuff's phonebook example and I show list of
persistent entities in the DataTable. I'd like to have a choice
filtered column containing subcription names got from phone numbers
via @ManyToOne association. But I'm not able to create proper Choice
renderer to be returned to DataTable for filtering purposes. My code
looks like this (choice filtering is commented out):


private PropertyColumnString createSenderColumn()
{
return new PropertyColumnString(new
ResourceModel(columnPhone), phone, phone) {
//return new ChoiceFilteredPropertyColumn(
//new ResourceModel(columnPhone), phone,phone,
//new LoadableDetachableModel() {
//private static final long serialVersionUID = 1L;
//@Override
//protected Object load() {
//List names =
TTraceWebSession.get().getUser().listSubscriptionNames();
//names.add(0,);
//return names;
//}
//}) {
private static final long serialVersionUID = 1L;

public void populateItem(Item cellItem, String
componentId, IModel model) {
AttitudeHistory history = (AttitudeHistory) model.getObject();
Label label = new Label(componentId, createLabelModel(model));
label.add(new AttributeModifier(title, true, new
ModelString(history.getPhone(;
cellItem.add(label);
}

@Override
protected IModel createLabelModel(IModel rowModel) {
final AttitudeHistory history = (AttitudeHistory)
rowModel.getObject();
return new AbstractReadOnlyModelString() {
private static final long serialVersionUID = 1L;

@Override
public String getObject() {
return history.getSubscription().getSubscriptionName();
}
};
}

//@Override
//protected IChoiceRenderer getChoiceRenderer() {
//return null;
//}


public String getCssClass() {
return column-phone;
}
};

}


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Non-english UTF-8 characters in POSTed data

2009-09-16 Thread Petr Fejfar
Hi all,

I'm probably facing the same problem as described here:

http://mail-archives.apache.org/mod_mbox/wicket-users/200804.mbox/%3cdf3d7452-0ac0-4cf7-8164-87e9371d8...@signicat.com%3e

I use Maven to build my applications, so I have a beginner's qustion:
how to reorganize a project to work with modified version of wicket-ajax.js
file?

Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Non-english UTF-8 characters in POSTed data

2009-09-16 Thread Petr Fejfar
On Wed, Sep 16, 2009 at 1:35 PM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:

 Hmm.. can't you fix this with encoding settings?

    getMarkupSettings().setDefaultMarkupEncoding(WebPageConstants.ISO_8859_1);

 Or something?

It seems it cannot. I have in my appliction's init() code:

getMarkupSettings().setDefaultMarkupEncoding(UTF-8);
getRequestCycleSettings().setResponseRequestEncoding(UTF-8);  

and both, static texts from .HTML, translated texts from .XML are show O.K.,
but data posted from a form are not.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Overloaded (?) ClientProperties.isJavaEnabled and JavaScript support detection

2009-09-15 Thread Petr Fejfar
Hi all,

I use detection of JavaScript the way described e.g. here
http://www.mkyong.com/wicket/how-do-detect-browser-javascript-or-ajax-disabled-in-wicket/
and it works OK providing that client has JRE installed on his/her machine.

But if there is a machine without JRE, the browser (Firefox, Opera) on
navigator.JavaEnabled()
call returns false even if JavaScript support is enabled, what seems
to be correct...

Is not isJavaEnabled property overloaded and should not be a new
separated field
for JavaScript per se there and the constructor of BrowserInfoPage()
called in the case
of time-out should reset such field?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to render part of component's markup and the very end of HTML document?

2009-09-03 Thread Petr Fejfar
Hi all,

I'm trying to wrap some jQuery plugins as a wicket
component but I met a problems with positions calculated
by jQuery's script in some page layouts controlled by
a mix of absolute and relative DIV's positions.

Plugin's author recommends to render part of markup
at the very end of markup just before /body tag.

How to achieve this in Wicket's component oriented
environment? What would be the best technique?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Ajax update of visibility component having attached JavaScript in run-time

2009-08-14 Thread Petr Fejfar
Hi all,

I've created a component which needs to be initialized by JavaScript
in run-time.
To achieve it, I use script markup associated with Label which supplies
required JS code.

Now I need to update visibility of the component using Ajax.
But after update this script (which is a part of Ajax Response)
is not executed and previous run-time initialization is lost.

1. Is there a way to tell a browser to reinitialize component
while processing Ajax response?

2. or is there another way how to either keep component
initialized or reinitialize it again?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax update of visibility component having attached JavaScript in run-time

2009-08-14 Thread Petr Fejfar
 see iheadercontributor, use that to output the necessary javascript
 rather then a label.

OK. I'll try it.

FYI, JS implementing a component is part of header already,
but initilization call I put into script element just behind related markup
within the body,  as recommended by documentation of the
JS component.

Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketTester Newbie User Issue: MarkupNotFoundException

2009-08-08 Thread Petr Fejfar
 Caused by: org.apache.wicket.markup.MarkupNotFoundException: Markup not 
 found. Component class: integration.wicket.MyPage

Do you have a MyPage.html with related markup in the same folder as
your MyPage.java file?

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DropDownChoice.onSelectionChanged() in ModalWindow

2009-08-07 Thread Petr Fejfar
On Fri, Aug 7, 2009 at 8:03 AM, Martin
Makundimartin.maku...@koodaripalvelut.com wrote:

 You must add OnChangeAjaxBehavior onto the dropdown and NOT
 wantOnSelectionChangedNotifications().

I see... I fixed it following you recommendation. Thanks for prompt help.

--

Anyway, I'm still fighting with Ajax:

I want to show/hide a AjaxButton in dependence on whether
there is any value selected by the DropDownChoice.

I've AjaxButton on my form in the modal window hidden at the beginning:

musterButton.setOutputMarkupId(true);
musterButton.setVisible(false);
form.add(musterButton);

and in the handler of onUpdate event I'm trying to show it if selected
value is not null:

protected void onUpdate(AjaxRequestTarget target) {
...
musterButton.setVisible(pp.getMuster()!=null);
target.addComponent(musterButton);
}

But the button is not shown event if setVisible() is set to true.
What I'm missing now?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DropDownChoice.onSelectionChanged() in ModalWindow

2009-08-07 Thread Petr Fejfar
On Fri, Aug 7, 2009 at 8:39 AM, Martin
Makundimartin.maku...@koodaripalvelut.com wrote:

 hidden component not found.. naturally. So in order for  the hidden
 component to exist in the HTML DOM tree even if it is HIDDEN, you
 must set:

... still thinking like in Desktop world  :'(

Thanks for prompt help

Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Firefox, be afraid be very afraid!!!

2009-08-06 Thread Petr Fejfar
On Wed, Aug 5, 2009 at 4:12 AM, Steve Tarltonstarl...@gmail.com wrote:

 I just spent the better half of a day WASTED because I use Firefox for
 testing my Wicket development. For the life of me, I couldn't figure out why

Is there any resume?

Today I met a similiar problem with Google Chrome when trying to change
an initial Height/Width of ModalWindow.

In my case, the reason was a position/size kept in cookie expiring
after 30 days.

Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



DropDownChoice.onSelectionChanged() in ModalWindow

2009-08-06 Thread Petr Fejfar
Hi all,

I have a DropDownChoice on a panel within ModalWindow
and once I return true from wantOnSelectionChangedNotifications()
method and its value is changed, a browser shows dialog asking
for confirmation to continue:

   Reloading this page will cause the modal window to disappear

Please, could somebody advice me what I am missing?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Thanks Wicket-Team!

2009-07-30 Thread Petr Fejfar
On Thu, Jul 30, 2009 at 9:31 AM, okrohneokro...@yahoo.de wrote:

 So customizing existing wicket ajax components or adding
 ajax to components was not so easy for me.

Hi Oliver,

please, could you share with us what ajaxified compontets you have finally
used in your project?

This stuff seems to be the most difficult for us as well.

Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Is Accordion example at wicketstuff-core.jquery broken?

2009-07-27 Thread Petr Fejfar
Hi all,

I run wicketstuff-core.jquery-examples (revision #4859 from Jul26,
using mvn jetty:run)
and it seems that accordion's example does not work in all tested
browsers (Chrome,IE,FF,Opera):
all items are shown as expanded and only observable activity is cursor
change to pointer over title.

Looking at rendered page source, Accordion scripts are included,
accordion content
is rendered and acordion is initialized by $('#id5').Accordion({header: 'h3'});

It seems it should work but it does not.

Please, does anybody know what I'm missing or what is wrong?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Looking for Pop-up menu...

2009-07-24 Thread Petr Fejfar
On Fri, Jul 24, 2009 at 4:25 AM, Joshua Limlim.j...@gmail.com wrote:

 I Think menu2 can do what you want as Ryan said. You can override the
 getCssClass() to return your own class name, because the default is
 yui-skin-sam which will span the width of yui-menu to the whole of the
 containing box.

Yes, I finally came with Mathias support at this solution.

 BTW... whether the menu pop-up on mouse click or mouse over is due the the
 css class yuimenubarnav -

Thank you for help,


Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Looking for Pop-up menu...

2009-07-23 Thread Petr Fejfar
On Thu, Jul 23, 2009 at 2:01 AM, Ryan McKinleyryan...@gmail.com wrote:

 why not just a YUI menu?  (not a context menu)

Do you mean to use menu (not menu2) with permanently visible single
menubar's item and pull down associated menu on click and resign on
mouse over functinality?

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to customize/override .CSS of 3rd party component

2009-07-23 Thread Petr Fejfar
Hi all,

I do not know, how to override/customize CSS styles
of 3rd party component, in this case YUI menu.

It seems to me they are loaded from packaged resource with URL
resources/org.wicketstuff.yui.inc.YUI/2.7.0b/menu/assets/menu.css,
which is embedded in yui.jar.

I tried to make a local copy of menu.css and put it into applications
root and include it into page's header to override particular style definition
within the page what normally works. This is not the case: resource inspector
shows that original .css file is loaded *after* the included one, probably
by Javascript in run-time...

Please, could somebody explain to me, how to customize those
style sheets?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to customize/override .CSS of 3rd party component

2009-07-23 Thread Petr Fejfar
On Thu, Jul 23, 2009 at 11:45 AM, Mathias
Nilssonwicket.program...@gmail.com wrote:


 You could extends the component, create own markup and css.

Really: there is the getCssClass() method supplying class name of style...
Thanks for prompt reply.


 You can also just look at the css and then in the header of your class add
 override them.

If I didn't miss anything, it does not work (even if it should) - this
is probably due
run-time loading of .css file by JavaScript e.g. on load my internal
style is used,
but on page refresh and/or menu click, it is replaced by original one.

Petr








 Let´s say YUI have a css class of .menu.

 style type=text/css
  .menu{
    color: red;
  }
 /style
 --
 View this message in context: 
 http://www.nabble.com/How-to-customize-override-.CSS-of-3rd-party-component-tp24622417p24622529.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to customize/override .CSS of 3rd party component

2009-07-23 Thread Petr Fejfar
On Thu, Jul 23, 2009 at 12:26 PM, Mathias
Nilssonwicket.program...@gmail.com wrote:

 I don't exactly know which component you are trying to implement but what
 about.

 add( new YUIMenu( id ){
   @Override
   protected void onBeforeRender() {
     super.onBeforeRender();
    // Add css reference here or something else
  }
 });

I'm violating YuiMenuBar :-)

Overriding getCssClass() method did the job - it allows to change
root class name of all Yui menu hierarchy hence I can introduce my
own styles in another .css file.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to customize/override .CSS of 3rd party component

2009-07-23 Thread Petr Fejfar
 You might want to google for YUI skins and take a look at
 YuiHeaderContributor

OK. Thanks for hint - I'll probably use YuiHeader Contributor.

Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to keep selection of TabbedPanel

2009-07-22 Thread Petr Fejfar
Hi all,

I have nested tabbed panels and I'd like save/restore
currect selected tab on each nested page when
e.g. switching parent tab.

What is a recommended way to achieve this?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Looking for Pop-up menu...

2009-07-22 Thread Petr Fejfar
Hi all,

I went through lot of Javascript integrating components
to find out pop-up menu similiar to YUI context menu
except a menu could be poped-up by left mouse click,
mouse hover etc...

But I did not find any. Is somewhere such component?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to show/hide, enable/disable items in menu based on YUI menu2

2009-07-17 Thread Petr Fejfar
On Thu, Jul 16, 2009 at 11:43 PM, Petr Fejfarpetr.fej...@gmail.com wrote:

 tries to be compatible with. Please find out attached table - maybe it
 could be usefull for someone else as well.

Errata: in the Menu test on Google Chrome, there should be (it seems
the value does *not* toggle)

Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to show/hide, enable/disable items in menu based on YUI menu2

2009-07-16 Thread Petr Fejfar
 I've made some changes on the trunk to allow AjaxLinkAction, and remove the
 setRenderBodyOnly so that you can basically modify the menu 'ajaxically'.
[...]
 check out the yui-examples

Hi Joshua,

thank for your effort. I tried your improvements, but it stil does not
work for me. It is possible that I'm missing something, but some
problems can be seen in your yui-example as well: After you click
M2:L3 item to remove 1st item from menu:
- all marks indicating an item has a submenu disappears
- the menubar losts its dynamic behaveour i.e. mouse over does nothing
- a click into any menubar's item returns it into regular behaveour

This is probably the major problem. More, I've tried extend your example:

- by adding Enable/Disable toggle with behaveour same as in the removing case

subMenu2.addMenuItem(new AjaxLinkAction(M2 : L6 (Ajax) - 
disables 2nd item)
{
@Override
public void onClick(AjaxRequestTarget target)
{
MenuBar2Page.this.info(getName().getObject());
m2L2.setEnabled(!m2L2.isEnabled());
target.addComponent(feedback);
target.addComponent(mb);
}
});


- by adding Checked toggle - it toggles value, but it seems there is
no checked mark

m2L7 = subMenu2.addMenuItem(new AjaxLinkAction(M2 : L7 (Ajax) -
toggles itself)
{
@Override
public void onClick(AjaxRequestTarget target)
{
MenuBar2Page.this.info(getName().getObject());
System.out.println(Check togle: 
+m2L7.isChecked());
m2L7.setChecked(!m2L7.isChecked());
target.addComponent(feedback);
target.addComponent(mb);
}
});


Please, if you would have some time, could you try to fix it?

Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to show/hide, enable/disable items in menu based on YUI menu2

2009-07-16 Thread Petr Fejfar
On Thu, Jul 16, 2009 at 4:25 PM, Joshua Limlim.j...@gmail.com wrote:

 Did you check out yui as well? This marks disappears should be redrawn
 in the new code.

Yes. I tested it on revision 4808 from July 15.


 What browser are you using though I 've only tested on FF.

I see. While learning Wicket I use Google Chrome (because it shows
source code using small fonts and offers live hrefs there). I've spent
some time and retest all wicketstuff Yui examples with 4 browsers we
tries to be compatible with. Please find out attached table - maybe it
could be usefull for someone else as well.


 btw, I am not the original author for the menu bar, so I have still to figure 
 out that bits.

Anyway, if you would be able to fix it, it would be great (at least
for me), because even if I'm SW engineer with 30+ years experience,
I'm a beginner in the Java, EE and Ajax field.


Petr


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

How to show ModalWindow in menuě onClick event?

2009-07-13 Thread Petr Fejfar
Hi all,

originally I had a row of AjaxLinks and on some clicks
I opened a modal window by calling:

  dialog.show(target);

Later, I've changed AjaxLinks to menuBar based on
YUI menu2, but I do know how to show the modal
window because of my onClick handler does not have
an argument of AjaxRequestTarget type.

Please, how to handle menu2 click to be able
show modal windows?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to show ModalWindow in menuě onClick event?

2009-07-13 Thread Petr Fejfar
On Mon, Jul 13, 2009 at 12:05 PM, sander v Fsandervanfaas...@gmail.com wrote:

 I don't know YUI menu2, but if it is an AjaxClick, you could use
 AjaxRequestTarget.get() to get the current AjaxRequestTarget.

It is easy, as I've found finally: Originally, I followed examples and
implement just IYUIMenuAction interface with ordinary onClick() event
with no arguments. But menu2 contains ajaxified interface
IYUIMenuAjaxAction with onClick() method having AjaxRequestTarget as
argument.

Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to show/hide, enable/disable items in menu based on YUI menu2

2009-07-13 Thread Petr Fejfar
Hi all,

I'm still trying to build menubar based on YUI menu2 from wicketstuff
and still have a problems: currently I'd like to hide/show ev. to enable/disable
some menu items (YuiMenuBarItem) in dependence of actions taken
by commands related to this menu bar.

If I tried to add those menu items into AjaxRequestTarget to be refreshed,
I get run-time java.lang.IllegalStateException: Ajax render cannot be called
on component that has setRenderBodyOnly enabled.

If I tried switch rendering of full markup on, there is some kind of refresh,
but the menu does not work correctly e.g. from refreshed menu submenus
have disappeared
etc...

Please, could somebody help me to refresh status/visibility of menu
items?


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to setup QuickStart project being able useYUI menubar from Wicket stuff

2009-07-12 Thread Petr Fejfar
On Sun, Jul 12, 2009 at 6:52 AM, James
Carmanjcar...@carmanconsulting.com wrote:

 I thought someone said this was fixed in the latest version of the
 code.  Are you using the trunk version of YUI menu2?  I had the same
 issues as you.

Yes, I downloaded wicketstuff from trunk. My revision is #4778 from
July 6th...

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to setup QuickStart project being able useYUI menubar from Wicket stuff

2009-07-11 Thread Petr Fejfar
   - Finally, if I run the QuickStart application the menu bar is
 shown, but there is no dynamic behaveour, there ar no pull down menus
 etc...

 and I'm not able to find-out what I'm missing in my QucikStart project
 to use this menu2 bar.

I'll reply myself:  as I found-out here
http://mail-archives.apache.org/mod_mbox/wicket-users/200712.mbox/%3c14130319.p...@talk.nabble.com%3e
later on knowing exactly what to look for, menu2 does not work if
wicket's tags are rendered :-O

Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to setup QuickStart project being able useYUI menubar from Wicket stuff

2009-07-10 Thread Petr Fejfar
Hi all,

I have another beginner's problem...

- I've imported project yui and and yui-expamles from wicketstuff info
Eclipse IDE
and examples work fine.


- I've created a QuickStart project using maven anc command generated
by Wicket's site and imported it into Eclipse IDE

- I'd like to add functinality of Menu2 bar from yui-examples into
this project :
   - I've copypasted code creating menu bar from yui-example page
into QuickStart home page
   - I've added dependecy on yui to compile QuickStart project successfully
   - Finally, if I run the QuickStart application the menu bar is
shown, but there is no dynamic behaveour, there ar no pull down menus
etc...

and I'm not able to find-out what I'm missing in my QucikStart project
to use this menu2 bar.

Please, could anybody help me


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to configure data source for Jetty server?

2009-07-07 Thread Petr Fejfar
 A couple of tips to do the Jetty DataSource JNDI configuration the 'wicket
 way' - in code, instead of xml.

Hi Peter,

thanks for your help. I like your solution without those .xml files
everywere around...

I completed dependencies into my POM and some additional
BasicDataSource() settings into code and it works.


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to configure data source for Jetty server?

2009-07-07 Thread Petr Fejfar
On Mon, Jul 6, 2009 at 10:38 PM, Igor Vaynbergigor.vaynb...@gmail.com wrote:
 http://docs.codehaus.org/display/JETTY/JNDI

Hi Igor,

thanks for you prompt reply, but I was not able to utilize it (I had a
glance at some Jetty docs before asking my question), because I don't
know, how is Jetty integrated into Eclipse IDE, hence I do not know
where to put/modify its configurations files.

I didn't install Jetty server on my machine, I do not have Jetty's
plugin installed in Eclipse.
I can find its .jar files in local Maven's repository only.

In spite of it, I can run it from Eclipse and it works (e.g. with some
wicketstuff examples) :-OOO


Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to configure data source for Jetty server?

2009-07-06 Thread Petr Fejfar
Hi all,

When I've started learning Wicket, I followed configuration described
in the book Enjoy web dev ...

Now I'm trying to migrate my project under Maven's management. I seem
to be almost
finished except data source configuration in the Tomcat's context file:

  Resource
name=jdbc/trackerDataSource
auth=Container
type=javax.sql.DataSource
driverClassName=org.postgresql.Driver
url=jdbc:postgresql://localhost/tracker
username=xxx
password=xxx
maxActive=20
maxIdle=8
defaultAutoCommit=false
defaultTransactionIsolation=SERIALIZABLE
testOnBorrow=true
validationQuery=select 1/

Please, could somebody show me how to achieve
the same effect in Jetty's configuration?


Thanks, Peter

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Help with design of application layout

2009-06-23 Thread Petr Fejfar
On Mon, Jun 22, 2009 at 3:52 PM, Igor Vaynbergigor.vaynb...@gmail.com wrote:

 if i were you i would create something like this:

 class zonepage extends webpage {
  private final repatingview zones;
[...]
   public zonepage() {
        add(zones=new repeatingview(zones));
   }

Hi Igor,

thanks for your help. I followed your recommendation and I've achieved
the goal. Great!

FYI,

- I've merged two first layers into AbstractPage with wicket:child as
  placeholder of zones c (z.a excluded)
- The extended page contains three RepeatingViews for zones c.b, c.c and c.d
- A chain of descendants relaying on POJO inheritance populates
  those RepeatingViews by panels.

Thx, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Help with design of application layout

2009-06-22 Thread Petr Fejfar
On Mon, Jun 22, 2009 at 7:21 AM, Igor Vaynbergigor.vaynb...@gmail.com wrote:

 i think you will get more help if you present a concrete usecase.

Thanks for your reply. Ok, I'd like to design something like this:

layer[0]
  - zone.a (a banner, sometimes visible, sometimes not).
  - zone.b (FeedbackPanel)
  - zone.c (abstract. A content)
  - zone.d (a footer)
  - zone.e (debug output)

layer[1]
  - zone.c (overriden by)
   - zone.c.a (header)
   - zone.c.b (abstract. Left column )
   - zone c.c (abstract. Central column)
   - zone c.d (abstract. Right column)

layer[2]
  - zone.c.d  overriden by
   - zone.c.d.a (user box i.e. login/logout panel etc...)
   - zone.c.d.b (abstract. A content)

layer[3a]
  - zone.c.b overriden by
   - zone c.b.a (ref box)
   - zone.c.b.b (a content)
  - zone.c.c overriden (content)
  - zone.c.d.b overriden by
   - zone c.d.b.a (content)

layer[3b]
  - zone.c.b overriden by
   - zone c.b.a (status box)
   - zone.c.b.b (menu)
  - zone.c.c overriden (content)
  - zone.c.d.b overriden by
   - zone c.d.b.a (content)

layer[3c]
  ...

My attempts to build something like this was unsuccessfull. From the
perspective of my current wicket's knowledge/experience it seems I
could achieve this using a base page fragmented down to the collection
of smallest zones of all top-most layers and override/show/hide them
in particular page. But it'd probably violate DRY principe: I'd have
to include common (inherited) panels in fragments in all ancestors...

Thx, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Help with design of application layout

2009-06-21 Thread Petr Fejfar
Hi everybody,

I am new in Wicket: I choose it as the most promissing Java web
framework today when looking for framework we could use instead of
Django and dynamically typed Python.

I read books Enjoy Web Dev  and Wicket in Action, but I am still
not able to move forward with design of skeleton for our applications.
Probably because of not being able to step over Django's generic
inheritence of the markup templates with (logicaly) unlimited number
of inherited blocks inside each markup file and unlimited number of
page's descendants.

I tried various combinations of markup inheritance with panels
inheritence, but I'm not satisfied with it.

Please, could some push me forward with application design containig
multiple varying parts per page?


Thx, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org