Re: MultiThreading issues with Wicket.

2014-01-18 Thread Andrew Schetinin
Hi,

We were also plagued by these EOF errors since upgrade to Wicket 6 from
1.4. In the old Wicket the errors (which are not errors - it's an expected
behavior when a user cancels navigation) were not reported in such
aggressive manner, with long stack traces.

How is it possible to hide these errors or better convert them to a
one-line WARN messages? Where is the best place to catch them?

Regards,

Andrew

--
Andrew Schetinin


On Sat, Jan 4, 2014 at 11:50 AM, Martin Grigorov wrote:

> Hi,
>
>
> On Sat, Jan 4, 2014 at 1:06 AM, eaglei22  wrote:
>
>


Re: Jquery tooltip for multiple fields in wicket

2013-07-26 Thread Andrew Schetinin
Thanks, Sebastien!

Regards,

Andrew

--
Andrew Schetinin


On Fri, Jul 26, 2013 at 11:57 AM, Sebastien  wrote:

> Hi Andrew,
>
> There is no sample yet about the tooltip.
> I will add sample(s) as soon I add a missing functionality (specifying
> tooltip content using a Panel & ComponentRenderer, fyi)
>
> For now on:
>
> To handle tooltips globally in a page:
> this.add(new TooltipBehavior());
>
> To handle a tooltip for a specific (html) element:
> this.add(new TooltipBehavior("#theSelector"));
>
> To handle a tooltip for a specific (wicket) component:
> this.add(new TooltipBehavior(JQueryWidget.getSelector(myComponent)));
>
> Hope this helps,
> Sebastien.
>
>
> On Fri, Jul 26, 2013 at 10:42 AM, Andrew Schetinin  >wrote:
>
> > Hi Martin,
> >
> > > for jQuery UI see: http://www.7thweb.net/wicket-jquery-ui/
> >
> > But where is a tooltip in that library?
> > I could not find it...
> >
> > Regards,
> >
> > Andrew
> >
> > --
> > Andrew Schetinin
> >
> >
> > On Wed, Jul 24, 2013 at 3:28 PM, Martin Grigorov  > >wrote:
> >
> > > Hi,
> > >
> > > If you use Twitter Bootstrap then you can check
> > > http://wb.agilecoders.de/demo/js#tooltips
> > > Otherwise for jQuery UI see: http://www.7thweb.net/wicket-jquery-ui/
> > >
> > >
> > > On Wed, Jul 24, 2013 at 8:57 AM, Murugan 
> wrote:
> > >
> > > > AM Using wicket framework , I need jquery tooltip till the mouse
> focus
> > on
> > > > the
> > > > field.
> > > >
> > > > There are multiple fields in the screen, whenever the user scroll the
> > > mouse
> > > > to the different fields tooltip should appear until the mouse take
> away
> > > > from
> > > > the particular field.
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://apache-wicket.1842946.n4.nabble.com/Jquery-tooltip-for-multiple-fields-in-wicket-tp4660449.html
> > > > Sent from the Users forum 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
> > > >
> > > >
> > >
> >
>


Re: Jquery tooltip for multiple fields in wicket

2013-07-26 Thread Andrew Schetinin
Hi Martin,

> for jQuery UI see: http://www.7thweb.net/wicket-jquery-ui/

But where is a tooltip in that library?
I could not find it...

Regards,

Andrew

--
Andrew Schetinin


On Wed, Jul 24, 2013 at 3:28 PM, Martin Grigorov wrote:

> Hi,
>
> If you use Twitter Bootstrap then you can check
> http://wb.agilecoders.de/demo/js#tooltips
> Otherwise for jQuery UI see: http://www.7thweb.net/wicket-jquery-ui/
>
>
> On Wed, Jul 24, 2013 at 8:57 AM, Murugan  wrote:
>
> > AM Using wicket framework , I need jquery tooltip till the mouse focus on
> > the
> > field.
> >
> > There are multiple fields in the screen, whenever the user scroll the
> mouse
> > to the different fields tooltip should appear until the mouse take away
> > from
> > the particular field.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Jquery-tooltip-for-multiple-fields-in-wicket-tp4660449.html
> > Sent from the Users forum 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
> >
> >
>


Re: Reading placeholder parameters in mounted resources

2013-07-24 Thread Andrew Schetinin
Hi Martin,

Thank you for the advise with attributes.getPageParameters()
.get("id") - I did not know about it.

You wrote:
*Wicket won't call MediaStorageResourceReference#*
*getResource() if the
request url doesn't match the mount path.*

Now, that's not quite correct - when I create a resource reference (in
order to associate it with Image or get the resource URL). every time
Wicket calls to ResourceReference#getResource() in attempt to receive an
instance of the resource.
The stack trace looks like (Wicket 6.9):

MediaStorageResourceReference.getResource() line: 149
==>> ResourceMapper.addCachingDecoration(Url, PageParameters) line: 218
==>> ResourceMapper.mapHandler(IRequestHandler) line: 199
==>> SystemMapper(CompoundRequestMapper).mapHandler(IRequestHandler) line:
215
==>> RequestCycle.mapUrlFor(IRequestHandler) line: 429
==>> RequestCycle.urlFor(IRequestHandler) line: 529
==>> RequestCycle.urlFor(ResourceReference, PageParameters) line: 492
FileActionPropertiesPanel(Component).urlFor(ResourceReference,
PageParameters) line: 3407
MediaStorageResourceReference.urlForMediaFile(Component, long, String)
line: 107
FileActionPropertiesPanel.(String, List,
ThumbnailSize, int) line: 49

I highlighted here the Wicket code - this is how it arrives to the resource
instantiation. The logic there is quite obvious and straight-forward, and I
did not see any reasonable way to avoid that instantiation, even though I
don't need it at all - it's waste of computational time and resources :-)

Note that this getResource() call happens in the context of an absolutely
irrelevant request - I cannot even construct a correct resource (even if I
would wish to do so), because all request parameters belong to the
currently created panel, and not to the resource.

IMHO it is a design flaw, and I've seen earlier usergroup discussions on it.

So, because of the above, I need to keep the logic of extracting the ID
parameter, and that validation of the request path, in order to silently
prevent unnecessary instantiation of the resource.

Regards,

Andrew


On Wed, Jul 24, 2013 at 9:55 AM, Martin Grigorov wrote:

>
>
> Since IRequestParameters knows nothing about path parameters, but just
> normal request parameters (see HttpServletRequest#getParameters()) you can
> move your logic for extracting the id parameter in the resource.




--
Andrew Schetinin


Re: Reading placeholder parameters in mounted resources

2013-07-23 Thread Andrew Schetinin
Hi Cedric,

I'm not sure what you mean by a quick start, but here you may find the
piece of code I'm using:

This is how the shared resource is initialized with the application:

@Override
protected void init() {
super.init();
mountResource( "/storage/${id}",
new MediaStorageResourceReference() );
}

This is how a URL is constructed:

final PageParameters params = new PageParameters();
params.add( "id", "12345" );
params.add( "thumb", "true" );
params.add( "size", "25" );
final CharSequence ret = component.urlFor( new
MediaStorageResourceReference(), params );
//  ./storage/12345?thumb=true&size=25

And this is the code of the resource reference (the resource can do
anything - it is irrelevant to the story):

public class MediaStorageResourceReference extends ResourceReference {
private static final Key key = new Key(
MediaStorageResourceReference.class.getName(),
"storage", Locale.ENGLISH, null, null );
public MediaStorageResourceReference() {
super( key );
}
@Override
public IResource getResource() {
final Request request = RequestCycle.get().getRequest();
// Wicket uses the same singleton instance also for detecting
// if the given resource can be cached by the server - we don't
need that,
// and the only way to skip that test is to check the URL,
// because the check is done by Wicket during forUrl() call,
// within the context of a different request.
if( !request.getUrl().getPath().startsWith( "storage" ) ) {
logger.debug( "Fake resource request" );
return null;
}

final IRequestParameters params = request.getRequestParameters();

Long id = params.getParameterValue( "id" ).toOptionalLong();
if( id == null ) { // TODO: ask in Wicket forum why the ID is not
extracted
// request.getUrl().getPath() = storage/72147598477361153
// fallback to extract the ID from path
if( request.getUrl().getPath().startsWith( URL_PATH_PREFIX ) ) {
final String s = request.getUrl().getPath().substring(
URL_PATH_PREFIX.length() );
try {
id = new Long( s );
} catch( final NumberFormatException e ) {
logger.error( "Cannot extract ID from the path: {}",
request.getUrl().getPath() );
}
}
if( id == null ) {
throw new AbortWithHttpErrorCodeException(
HttpStatus.SC_NOT_FOUND );
}
}
.
return new MyResource();
   }

Note the workaround for retrieving the ID above - it is required because
the list of parameters does not contain any "id" - only the optional
arguments.

Regards,

Andrew

--
Andrew Schetinin


On Tue, Jul 23, 2013 at 9:47 PM, Cedric Gatay  wrote:

> Hi,
> I think this is because you're mixing path parameters with query string
> one. It could be a bug, could you provide a quickstart with this to help us
> qualify and fix it if it is a bug.
>
> Regards,
>
> __
> Cedric Gatay (@Cedric_Gatay <http://twitter.com/Cedric_Gatay>)
> http://code-troopers.com | http://www.bloggure.info |
> http://cedric.gatay.fr
>
>
> On Tue, Jul 23, 2013 at 7:31 PM, Francois Meillet <
> francois.meil...@gmail.com> wrote:
>
> > Try this pattern /storage/${id}/#{shape}
> >
> > Optional parameters are denoted by using a # instead of $
> >
> >
> > François Meillet
> > Formation Wicket - Développement Wicket
> >
> >
> >
> >
> >
> > Le 23 juil. 2013 à 19:14, Andrew Schetinin  a
> écrit
> > :
> >
> > > Hi,
> > >
> > > I have a shared resource mounted to a URL pattern "/storage/${id}"
> > > So that the URL look like "/storage/12345"
> > > and with optional additional parameters "/storage/12345?shape=xyz"
> > >
> > > It works fine when I create a new URL - the "id" parameter is correctly
> > > encoded in the URL.
> > >
> > > But when I process the actual request, I only receive the optional
> > > parameters like "shape", while "id" parameter is not present in
> > > RequestParameters. Therefore I need to parse the URL string and extract
> > the
> > > ID parameters manually.
> > >
> > > The question is - why Wicket does not decode the parameters back?
> > > Is it by design, or is it only a problem with shared resources?
> > >
> > > Regards,
> > >
> > > Andrew
> > >
> > > --
> > > Andrew Schetinin
> >
> >
>


Reading placeholder parameters in mounted resources

2013-07-23 Thread Andrew Schetinin
Hi,

I have a shared resource mounted to a URL pattern "/storage/${id}"
So that the URL look like "/storage/12345"
and with optional additional parameters "/storage/12345?shape=xyz"

It works fine when I create a new URL - the "id" parameter is correctly
encoded in the URL.

But when I process the actual request, I only receive the optional
parameters like "shape", while "id" parameter is not present in
RequestParameters. Therefore I need to parse the URL string and extract the
ID parameters manually.

The question is - why Wicket does not decode the parameters back?
Is it by design, or is it only a problem with shared resources?

Regards,

Andrew

--
Andrew Schetinin


Re: Problem with wiQuery Dialog after upgrade to Wicket 6.9

2013-07-18 Thread Andrew Schetinin
Hi,

To anybody interested, I've found a workaround that worked.

I've added an invisible link into the dialog and simulated clicking on it:

HTML code for the link:



Java code for the link:

submitLink = new AjaxSubmitLink( "submitFormInvisibleButton", form ) {
private static final long serialVersionUID = 1L;

@Override
protected void onSubmit( AjaxRequestTarget target, Form form ) {
super.onSubmit( target, form );
form.onFormSubmitted();
if( form.hasError() ) {
logger.debug( "AjaxSubmitLink.respond() error" );
} else {
logger.debug( "AjaxSubmitLink.respond() onOK" );
onOk(target);
}
}
};
submitLink.setOutputMarkupId( true );
form.add( submitLink );

JavaScript to be added to the OK button:

sb.append( "$('a#" ).append( submitLink.getMarkupId() )
.append( "').triggerHandler('click');" );

That worked - good enough for me.

I hope that wiQuery will have a more general solution for that, but that's
something to be handled in wiQuery.

Regards,

Andrew

--
Andrew Schetinin


On Wed, Jul 17, 2013 at 6:41 PM, Andrew Schetinin wrote:

> Hi Sebastien,
>
> I've tried it - used getCallbackFunction() - but it generated a function
> inside function, and broke JS syntax.
>
> I've tried a couple of other ideas, but none worked.
>
>
> Regards,
>
> Andrew
>
> --
> Andrew Schetinin
>
>
> On Wed, Jul 17, 2013 at 1:54 AM, Sebastien  wrote:
>
>> Hi,
>>
>> I think the idea is more to replace
>> wicketSubmitFormById('form','" +formAjaxBehavior.getCallbackUrl() +"',
>> null, null, null, null,null);")));
>> by
>> formAjaxBehavior.getCallbackFunction()
>>
>> With the override mentioned bellow.
>> #getCallbackFunction() will get you the ready-to-use javascript function.
>> I
>> am not a wiQuery expert so I don't know where exactly you have to use this
>> statement... (something like new JsScope(statement)?)
>>
>> Maybe Ernesto or Hielke may help you more on this...
>>
>> Best regards,
>> Sebastien.
>>
>>
>>
>> On Tue, Jul 16, 2013 at 6:06 PM, Andrew Schetinin > >wrote:
>>
>> > Hi Sebastien,
>> >
>> > Thank you for the suggestion, but the trouble with the sample (and
>> wiQuery)
>> > is that DialogButton is not a wicket component - it is a very simple
>> > object. There is no updateAjaxAttributes() to change.
>> >
>> > As I explained, the form submit there works by a plain call from
>> > JavaScript, and that call does not work anymore because of the missing
>> > wicketSubmitFormById() function.
>> >
>> > It seems to me that the only way to extend Dialog in wiQuery is through
>> > JavaScript - at least everything related to reaction on the button
>> clicks.
>> >
>> > Regards,
>> >
>> > Andrew
>> >
>> > --
>> > Andrew Schetinin
>> >
>> >
>> > On Tue, Jul 16, 2013 at 6:33 PM, Sebastien  wrote:
>> >
>> > > Hi Andrew,
>> > >
>> > > You have to override your ajaxbehavior#updateAjaxAttributes()
>> > >
>> > > protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
>> > > {
>> > > super.updateAjaxAttributes(attributes);
>> > >
>> > > attributes.setMethod(Method.POST); //if you wish to post
>> > > attributes.setFormId("yourFormId");
>> > > }
>> > >
>> > > Best regards,
>> > > Sebastien.
>> > >
>> > >
>> > > On Tue, Jul 16, 2013 at 5:21 PM, Andrew Schetinin <
>> ascheti...@gmail.com
>> > > >wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > I've just upgraded from Wicket 1.4 to 6.9, and (among lots of other
>> > > > problems) I have a trouble with porting the code that submitted a
>> form
>> > > from
>> > > > within a wiQuery dialog.
>> > > >
>> > > > My code is based on the sample that can be found here:
>> > > >
>> > > >
>> > >
>> >
>> http://code.google.com/p/wiquery/source/browse/examples/wiquery-examples/src/main/resources/org/odlabs/wiquery/examples/dialog/DialogPage.java?r=407
>> > > >
>> > > > The trick here was that the Dialog contains a form which has to be
>> > > > submitted when OK button is clicked, and that was done with the
>> > following
>> > > > code:
>> > > >
>> > > > buttonsAdv.add(new DialogButton("Save",
>> > > >
>> > > > JsScope.quickScope("wicketSubmitFormById('form','" +
>> > > >
>> > > > formAjaxBehavior.getCallbackUrl() +
>> > > > "', null, null,
>> null,
>> > > null,
>> > > > null);")));
>> > > >
>> > > > Unfortunately, in Wicket 6.9 this code fails to find the function
>> > > > wicketSubmitFormById()
>> > > >
>> > > > I also have a feeling that in my previous attempt to port this code
>> to
>> > > > Wicket 6.6 the same functionality worked fine.
>> > > >
>> > > > The question is - how is it possible to submit a form from JS?
>> > > >
>> > > > Regards,
>> > > >
>> > > > Andrew
>> > > >
>> > > > --
>> > > > Andrew Schetinin
>> > > >
>> > >
>> >
>>
>
>


Re: Problem with wiQuery Dialog after upgrade to Wicket 6.9

2013-07-17 Thread Andrew Schetinin
Hi Sebastien,

I've tried it - used getCallbackFunction() - but it generated a function
inside function, and broke JS syntax.

I've tried a couple of other ideas, but none worked.

Regards,

Andrew

--
Andrew Schetinin


On Wed, Jul 17, 2013 at 1:54 AM, Sebastien  wrote:

> Hi,
>
> I think the idea is more to replace
> wicketSubmitFormById('form','" +formAjaxBehavior.getCallbackUrl() +"',
> null, null, null, null,null);")));
> by
> formAjaxBehavior.getCallbackFunction()
>
> With the override mentioned bellow.
> #getCallbackFunction() will get you the ready-to-use javascript function. I
> am not a wiQuery expert so I don't know where exactly you have to use this
> statement... (something like new JsScope(statement)?)
>
> Maybe Ernesto or Hielke may help you more on this...
>
> Best regards,
> Sebastien.
>
>
>
> On Tue, Jul 16, 2013 at 6:06 PM, Andrew Schetinin  >wrote:
>
> > Hi Sebastien,
> >
> > Thank you for the suggestion, but the trouble with the sample (and
> wiQuery)
> > is that DialogButton is not a wicket component - it is a very simple
> > object. There is no updateAjaxAttributes() to change.
> >
> > As I explained, the form submit there works by a plain call from
> > JavaScript, and that call does not work anymore because of the missing
> > wicketSubmitFormById() function.
> >
> > It seems to me that the only way to extend Dialog in wiQuery is through
> > JavaScript - at least everything related to reaction on the button
> clicks.
> >
> > Regards,
> >
> > Andrew
> >
> > --
> > Andrew Schetinin
> >
> >
> > On Tue, Jul 16, 2013 at 6:33 PM, Sebastien  wrote:
> >
> > > Hi Andrew,
> > >
> > > You have to override your ajaxbehavior#updateAjaxAttributes()
> > >
> > > protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
> > > {
> > > super.updateAjaxAttributes(attributes);
> > >
> > > attributes.setMethod(Method.POST); //if you wish to post
> > > attributes.setFormId("yourFormId");
> > > }
> > >
> > > Best regards,
> > > Sebastien.
> > >
> > >
> > > On Tue, Jul 16, 2013 at 5:21 PM, Andrew Schetinin <
> ascheti...@gmail.com
> > > >wrote:
> > >
> > > > Hi,
> > > >
> > > > I've just upgraded from Wicket 1.4 to 6.9, and (among lots of other
> > > > problems) I have a trouble with porting the code that submitted a
> form
> > > from
> > > > within a wiQuery dialog.
> > > >
> > > > My code is based on the sample that can be found here:
> > > >
> > > >
> > >
> >
> http://code.google.com/p/wiquery/source/browse/examples/wiquery-examples/src/main/resources/org/odlabs/wiquery/examples/dialog/DialogPage.java?r=407
> > > >
> > > > The trick here was that the Dialog contains a form which has to be
> > > > submitted when OK button is clicked, and that was done with the
> > following
> > > > code:
> > > >
> > > > buttonsAdv.add(new DialogButton("Save",
> > > >
> > > > JsScope.quickScope("wicketSubmitFormById('form','" +
> > > >
> > > > formAjaxBehavior.getCallbackUrl() +
> > > > "', null, null, null,
> > > null,
> > > > null);")));
> > > >
> > > > Unfortunately, in Wicket 6.9 this code fails to find the function
> > > > wicketSubmitFormById()
> > > >
> > > > I also have a feeling that in my previous attempt to port this code
> to
> > > > Wicket 6.6 the same functionality worked fine.
> > > >
> > > > The question is - how is it possible to submit a form from JS?
> > > >
> > > > Regards,
> > > >
> > > > Andrew
> > > >
> > > > --
> > > > Andrew Schetinin
> > > >
> > >
> >
>


Re: Problem with wiQuery Dialog after upgrade to Wicket 6.9

2013-07-16 Thread Andrew Schetinin
Hi Sebastien,

Thank you for the suggestion, but the trouble with the sample (and wiQuery)
is that DialogButton is not a wicket component - it is a very simple
object. There is no updateAjaxAttributes() to change.

As I explained, the form submit there works by a plain call from
JavaScript, and that call does not work anymore because of the missing
wicketSubmitFormById() function.

It seems to me that the only way to extend Dialog in wiQuery is through
JavaScript - at least everything related to reaction on the button clicks.

Regards,

Andrew

--
Andrew Schetinin


On Tue, Jul 16, 2013 at 6:33 PM, Sebastien  wrote:

> Hi Andrew,
>
> You have to override your ajaxbehavior#updateAjaxAttributes()
>
> protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
> {
> super.updateAjaxAttributes(attributes);
>
> attributes.setMethod(Method.POST); //if you wish to post
> attributes.setFormId("yourFormId");
> }
>
> Best regards,
> Sebastien.
>
>
> On Tue, Jul 16, 2013 at 5:21 PM, Andrew Schetinin  >wrote:
>
> > Hi,
> >
> > I've just upgraded from Wicket 1.4 to 6.9, and (among lots of other
> > problems) I have a trouble with porting the code that submitted a form
> from
> > within a wiQuery dialog.
> >
> > My code is based on the sample that can be found here:
> >
> >
> http://code.google.com/p/wiquery/source/browse/examples/wiquery-examples/src/main/resources/org/odlabs/wiquery/examples/dialog/DialogPage.java?r=407
> >
> > The trick here was that the Dialog contains a form which has to be
> > submitted when OK button is clicked, and that was done with the following
> > code:
> >
> > buttonsAdv.add(new DialogButton("Save",
> >
> > JsScope.quickScope("wicketSubmitFormById('form','" +
> >
> > formAjaxBehavior.getCallbackUrl() +
> > "', null, null, null,
> null,
> > null);")));
> >
> > Unfortunately, in Wicket 6.9 this code fails to find the function
> > wicketSubmitFormById()
> >
> > I also have a feeling that in my previous attempt to port this code to
> > Wicket 6.6 the same functionality worked fine.
> >
> > The question is - how is it possible to submit a form from JS?
> >
> > Regards,
> >
> > Andrew
> >
> > --
> > Andrew Schetinin
> >
>


Problem with wiQuery Dialog after upgrade to Wicket 6.9

2013-07-16 Thread Andrew Schetinin
Hi,

I've just upgraded from Wicket 1.4 to 6.9, and (among lots of other
problems) I have a trouble with porting the code that submitted a form from
within a wiQuery dialog.

My code is based on the sample that can be found here:
http://code.google.com/p/wiquery/source/browse/examples/wiquery-examples/src/main/resources/org/odlabs/wiquery/examples/dialog/DialogPage.java?r=407

The trick here was that the Dialog contains a form which has to be
submitted when OK button is clicked, and that was done with the following
code:

buttonsAdv.add(new DialogButton("Save",

JsScope.quickScope("wicketSubmitFormById('form','" +

formAjaxBehavior.getCallbackUrl() +
"', null, null, null, null,
null);")));

Unfortunately, in Wicket 6.9 this code fails to find the function
wicketSubmitFormById()

I also have a feeling that in my previous attempt to port this code to
Wicket 6.6 the same functionality worked fine.

The question is - how is it possible to submit a form from JS?

Regards,

Andrew

--
Andrew Schetinin


Re: What is your setup for Rapid Application Development?

2013-04-26 Thread Andrew Schetinin
Hi Alexey,

Well, you're right.

To me, RAD was always about GUI prototyping or massive GUI development,
turning around code generation tools.

I've checked the terminology and found that it is a broader term, even
mixed up with Agile and Scrum which are more about project management and
not about tools.

So if we're talking about more general tools for quickening the application
development, your toolset is very good.

Regards,

Andrew

On Fri, Apr 26, 2013 at 9:01 AM, Alexey Mukas wrote:

> Hi Andrew,
>
> For UI we use jquery ui, select2, noty and other js components. Integration
> is pretty simple in wicket.
> We don't really need any UI designer or CRUD form generation, we just
> create
> html then bind it to the logic. CRUD generation could be added easily if
> needed.
> "Basic core services" as you said, in our case is something that allows us
> to work rapidly, may be because we don't work on a CRUD app...
>
> I forgot to mention one very nice tool - lombok. It significantly decreases
> amount lines in code.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/What-is-your-setup-for-Rapid-Application-Development-tp4658278p4658287.html
> Sent from the Users forum 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
>
>


-- 

Regards,

Andrew

--
Andrew Schetinin


Re: What is your setup for Rapid Application Development?

2013-04-26 Thread Andrew Schetinin
Hi Martin,

On Fri, Apr 26, 2013 at 11:17 AM, Martin Grigorov wrote:

> Hi Andrew,
>
> On Fri, Apr 26, 2013 at 9:38 AM, Andrew Schetinin  >wrote:
>
> It is not the maintenance cost the problem.
> The reason why these frameworks have been abandoned is because there were
> no users for them. Or at least not enough.
>

Then again - I'm wondering why Grails and Rails are successful (huge user
base) and these frameworks are not (don't have enough users) :-)
Grails and Rails are simply very good RAD tools, isn't that right?
I strongly believe that Wicket would be able to attract much larger user
base if only it would have a better set of UI components, and better RAD
tooling.
The situation improves lately, but very slowly - not fast enough to
complete with other frameworks.


>
> I hope you have told them that you have considered Isis but choose to roll
> your own solution because their docs are lacking. Without your feedback it
> wont get better by itself ;-)
>
>
I considered Isis for a separate new project with lots of admin UI, and
compared it against Play (1 or 2) and Grails. Finally I've decided to go
with Grails in that case.
Our main product was started quite some time ago, long before Isis (or long
before I had learned about Isis).
Back than we also seriously considered Grails as a Wicket alternative, and
started using Wicket due to performance. Honestly, I'm still wondering
about correctness of that decision, but that's another story :-)


>
> But even that I know about Isis, and their great support in forums, etc. I
> would still prefer to create my own solution for the problem because it
> will be much easier for me.
>
>
Personally, I'd prefer to have a rich framework to start building upon,
instead of developing another bicycle.

Regards,

Andrew

--
Andrew Schetinin


Re: What is your setup for Rapid Application Development?

2013-04-26 Thread Andrew Schetinin
Hi Martin,

See inside...

On Fri, Apr 26, 2013 at 10:01 AM, Martin Grigorov wrote:

> Hi Andrew,
>
> On Fri, Apr 26, 2013 at 7:13 AM, Andrew Schetinin  >wrote:
>
> > In our case, we had to implement the second option, suitable for our
> needs
>
> Can you explain what do you mean by "suitable for our needs" ?
> From your message above this phrase it seems RAD/CRUD are something
> universal that will fit any needs. But then you say _our needs_ ...
>

We have a pretty basic framework that allows defining an edit form logic in
Java without touching any HTML, and the HTML is generated automatically
from common blocks.
The idea is basic and universal, but the implementation is relatively
tightly coupled with the back-end, and making it more generic (or even
open-sourcing it) requires significant efforts - not something we can do at
this stage.

This is the reason why there are no such at the moment. Or at least not
> widely used.
>

That's right - it requires a lot of efforts to maintain any framework. From
the other side - consider Rails and Grails - they do have to have RAD GUI
and they are very successful mostly because of that fact.

  - http://isis.apache.org/ (see it Wicket Viewer) (very well maintained. I

> have no information how many users it has)
>

I considered this one for one of the last projects, but found its
documentation lacking, and decided it is not enough supported.


> Then you will figure out that Ruby/Groovy performance is not that good and
> you will have to reimplement your prototype with something else ...
>
>
Well, that's a holy war topic :-) I better will not touch it :-)

Regards,

Andrew

--
Andrew Schetinin


Re: What is your setup for Rapid Application Development?

2013-04-25 Thread Andrew Schetinin
Hi Alexey,

RAD requires a set of good visual components (not a strong side of Wicket,
unfortunately), and one of the two features - either a visual form editor
(10 years ago), or automated CRUD forms generation (today) - again not a
strong side of Wicket.

In our case, we had to implement the second option, suitable for our needs
- at least Wicket is more or less okay for that.

Mentioned services are basic core services, I'd say low-level - they are
necessary, but they don't mean RAD. For RAD, you need something like Rails
or Grails.

Regards,

Andrew Schetinin

On Thu, Apr 25, 2013 at 10:37 PM, Alexey Mukas wrote:

> In our project we are using the following tools/libs:
>  - hibernate;
>  - LiquiBase (db migration);
>  - wro4j (for merging/compiling js, less and coffee script);
>  - slf4j + logback;
>  - selenium;
>  - testng;
>  - jmockit;
>  - jmeter.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/What-is-your-setup-for-Rapid-Application-Development-tp4658278p4658282.html
> Sent from the Users forum 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
>
>


Navigation to a plain URL within the same application in Wicket 6

2013-03-24 Thread Andrew Schetinin
Hi,

I'm porting a Wicket application from 1.4 to 6.6, and there is one piece of
code I cannot find how to port.

In short, I have a Link descendant class that is supposed to navigate to a
manually constructed URL within the Web application -
something like "/context_path/view_path/view?viewId=21938423423"

In Wicket 1.4, I created an IRequestTarget instance with necessary
RequestParameters.
In Wicket 6.6, all these classes are not what they were in 1.4, and I don't
find an alternative.

The question is - how is it possible to do navigation to a plain URL within
the same application in Wicket 6?

Wicket 1.4 original code:

public class CustomViewLink extends Link{
@Override
public void onClick() {
// View links do not have a click handler.
// Instead they are dispatched by the request handling servlet.
}
@Override
protected CharSequence getURL() {
String viewBaseURI = view.getViewBaseURI();

RequestParameters requestParameters = new RequestParameters();
requestParameters.setPath(viewBaseURI);
Map parameters = new HashMap();
parameters.put( IViewWebDescriptor.VIEW_ID_PARAM, Long.toString(
view.getId() ) );
requestParameters.setParameters(parameters);

IRequestTarget target =
RequestCycle.get().getProcessor().resolve(RequestCycle.get(),
requestParameters);
if(target == null){
throw new WicketRuntimeException("Can't find request target for
ViewConfiguration.viewBaseURI: " + viewBaseURI);
}
return RequestCycle.get().urlFor(target);
}
}

Thank you in advance,

Andrew

-- 
--
Andrew Schetinin


Re: Stale models in a form with a lot of AJAX

2011-10-31 Thread Andrew Schetinin
Hi again,

Sorry, it looks like the model object got assigned to an old copy along the
road, so there is no any problem with the models.

Regards,

Andrew

On Mon, Oct 31, 2011 at 10:28 PM, Andrew Schetinin wrote:

> Hi,
>
> I have a form that contains a complex object in a model, and I pass that
> model to several panels within the form.
> Various components on the panels may invoke AJAX calls and update pieces
> of that object, and then update other controls to reflect the changes.
>
> What happens is that one drop-down lists updates the object when another
> item is selected in the list.
> I see the change in the object. Then, in the same handler, the other
> panels are targeted to be updated.
> But when I get to onInitialize() of those  panels, I see an old copy of
> the object, without any updates.
>
> I have a suspicion that AJAX calls somehow navigate to an old copy of the
> form, and I get old copies of the serialized object.
> Is it possible that this is the case?
> How to workaround it?
> Is there another way to work with the model so that it does not get stale?
>
> Note that I would not like to use LDM since persisting the model on every
> small change is too heavy.
>
> Regards,
>
> Andrew
>
> --
> --
> Andrew Schetinin
>



-- 
--
Andrew Schetinin


Stale models in a form with a lot of AJAX

2011-10-31 Thread Andrew Schetinin
Hi,

I have a form that contains a complex object in a model, and I pass that
model to several panels within the form.
Various components on the panels may invoke AJAX calls and update pieces of
that object, and then update other controls to reflect the changes.

What happens is that one drop-down lists updates the object when another
item is selected in the list.
I see the change in the object. Then, in the same handler, the other panels
are targeted to be updated.
But when I get to onInitialize() of those  panels, I see an old copy of the
object, without any updates.

I have a suspicion that AJAX calls somehow navigate to an old copy of the
form, and I get old copies of the serialized object.
Is it possible that this is the case?
How to workaround it?
Is there another way to work with the model so that it does not get stale?

Note that I would not like to use LDM since persisting the model on every
small change is too heavy.

Regards,

Andrew

-- 
--
Andrew Schetinin


Re: How to get a translated string for an arbitrary locale?

2011-10-29 Thread Andrew Schetinin
Thanks, Igor, it worked.

Regards,

Andrew Schetinin

On Fri, Oct 28, 2011 at 10:45 PM, Igor Vaynberg wrote:

> you are right. i was looking in 1.5 where we have exposed the locale.
>
> for the time being you can simply do this:
> Locale old=session.getlocale();
> session.setlocale(foo);
> localizer.get(..);
> session.setlocale(old);
>
> -igor
>
>
> On Fri, Oct 28, 2011 at 1:22 PM, Andrew Schetinin 
> wrote:
> > Hi Igor,
> >
> > But as I said, this method is deprecated and ignores Locale parameter:
> >
> >@Deprecated
> >public String getString(final String key, final Component component,
> > final IModel model,
> >final Locale locale, final String style, final String
> defaultValue)
> >throws MissingResourceException
> >{
> >return getString(key, component, model, defaultValue);
> >}
> >
> > Or am I looking in a wrong place?
> >
> > Regards,
> >
> > Andrew
> >
>


Re: How to get a translated string for an arbitrary locale?

2011-10-28 Thread Andrew Schetinin
Hi Igor,

But as I said, this method is deprecated and ignores Locale parameter:

@Deprecated
public String getString(final String key, final Component component,
final IModel model,
final Locale locale, final String style, final String defaultValue)
throws MissingResourceException
{
return getString(key, component, model, defaultValue);
}

Or am I looking in a wrong place?

Regards,

Andrew

On Fri, Oct 28, 2011 at 8:54 PM, Igor Vaynberg wrote:

> Localizer#getString(final String key, final Component component, final
> IModel model, final Locale locale, final String style, final String
> defaultValue)
>
> -igor
>
> On Fri, Oct 28, 2011 at 10:54 AM, Andrew Schetinin 
> wrote:
> > Hi,
> >
> > I have a question about Wicket localization I could not find an answer
> for.
> >
> > I have a component where I'd like to get a translated message for a given
> > key.
> > The actual string is sitting somewhere in a grand-parent panel, and I
> have
> > no any access to it.
> >
> > I'd like to get translations for that key in more than one language (I
> have
> > a list of locale names).
> >
> > It is easy to get a translation for a current locale -
> > component.getLocalizer().getString() would do the job. But Localizer does
> > not help me to get strings for other locales.
> > Once upon a time, there seems to be Localizer.getString() method that
> > accepts Locale, but as I can see now it ignores the locale parameter -
> the
> > method is deprecated in Wicket 1.4.18.
> >
> > There is also ComponentStringResourceLoader that has a method that
> returns a
> > string for a given class and any locale. But the translation string I'm
> > looking for is sitting somewhere up the component hierarchy - I've no
> idea
> > where - so I cannot know the class name.
> >
> > I'd appreciate if somebody could hint what classes and methods to look
> for,
> > and tell me if it is possible at all.
> >
> > Thank you in advance,
> >
> > Andrew
> >
> > --
> > --
> > Andrew Schetinin
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
--
Andrew Schetinin


How to get a translated string for an arbitrary locale?

2011-10-28 Thread Andrew Schetinin
Hi,

I have a question about Wicket localization I could not find an answer for.

I have a component where I'd like to get a translated message for a given
key.
The actual string is sitting somewhere in a grand-parent panel, and I have
no any access to it.

I'd like to get translations for that key in more than one language (I have
a list of locale names).

It is easy to get a translation for a current locale -
component.getLocalizer().getString() would do the job. But Localizer does
not help me to get strings for other locales.
Once upon a time, there seems to be Localizer.getString() method that
accepts Locale, but as I can see now it ignores the locale parameter - the
method is deprecated in Wicket 1.4.18.

There is also ComponentStringResourceLoader that has a method that returns a
string for a given class and any locale. But the translation string I'm
looking for is sitting somewhere up the component hierarchy - I've no idea
where - so I cannot know the class name.

I'd appreciate if somebody could hint what classes and methods to look for,
and tell me if it is possible at all.

Thank you in advance,

Andrew

-- 
--
Andrew Schetinin