Migration of generateCallbackScript to Wicket 6

2012-10-26 Thread Adriano dos Santos Fernandes
Hi!

I'm migrating from Wicket 1.5 to 6, and I have a couple of
generateCallbackScript usage that I have no idea what to do.

An example:

class ToolbarBehaviour extends AbstractDefaultAjaxBehavior
{
private static final long serialVersionUID = 1L;

@Override
protected void respond(AjaxRequestTarget target)
{
int itemNumber =
getRequest().getRequestParameters().getParameterValue(item).toInt();
ToolItem item = Toolbar.this.registeredItems.get(itemNumber);
item.onClick(target);
}

public CharSequence getAjaxUrl(String params)
{
return generateCallbackScript(wicketAjaxGet(' +
getCallbackUrl() +
 + params + ');
}
};


This is an integration with ExtJS toolbar, and getAjaxUrl() isused to
build an ajax call in another place.

I do also have similar JQueryBehavior's using generateCallbackScript and
adding parameters to them.

How to code this with Wicket 6?


Adriano


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



Mounting URLs with locale prefix

2012-08-27 Thread Adriano dos Santos Fernandes
Hi!

I do want to mount our application URLs as following:

/${locale}/PageName

So I can access Page1 as:
/pt-br/Page1
/en-us/Page1

The application is a simple website with not so many dynamic content, so
in most cases it directly uses a href=... /, img src=... /
without wicket:id.

That's fine. hrefs and image srcs are resolved correct (wicket strips
the locale from images), but if they're referenced in CSS
(background-image, for example), Wicket does not do it, so I end with
some images going to /image and another ones going to /${locale}/image.

I may mount the resources in two different places, like:
/res/${name}
/${locale}/res/${name}

But this does not seems good for me.

What's the best practice to mount pages with a URL prefix and still make
HTML/CSS to work without needing to use Wicket components (wicket:id)
for everything?


Adriano


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



Wicket tags in output markup may change styles

2012-08-21 Thread Adriano dos Santos Fernandes
Hi!

I was creating a website with Wicket and the CSS styles were fine.

Then I decided to replace some texts with wicket:message / and it
changed the formatting.

I know setStripWicketTags(true), but I prefer to have it working with
setStripWicketTags(false) in dev. mode.

The html is actually a XHTML transitional. The affected style is related
to body * { ... }.

I tried things like body *:* { ... } and it fixed the problem, but
introduced another ones. I'm even not sure this is a valid CSS syntax.

Has anyone have a hint on a good way to solve this problem?

Sorry to not create a quickstart, maybe this is well know thing, but it
never happened to me till now.


Adriano


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



Check the markup in onBeforeRender

2011-06-24 Thread Adriano dos Santos Fernandes

Hi!

I want to add some components to the hierarchy dynamically based on the 
wicket:id presents in the HTML.


Basically, I want to check if an used wicket:id was not explicitly added 
(with add method) by the user and then (in some cases) add it.


But I'm having trouble to do that. I tried with IComponentResolver, but 
then I needed to use autoAdd but I can't afford the component being removed.


So I'm trying in onBeforeRender, but how do I can query the markup to 
see the list of child wicket:id's of a given component?



Adriano


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



Re: Google App Engine and Wicket

2009-04-12 Thread Adriano dos Santos Fernandes

Maarten Bosteels wrote:

But AFAIK GAE doesn't use/guarantee sticky sessions, so I am afraid
you can't rely on local memory.

App Engine uses multiple web servers to run your application, and
automatically adjusts the number of servers it is using to handle
requests reliably. A given request may be routed to any server, and it
may not be the same server that handled a previous request from the
same user.
http://code.google.com/appengine/docs/java/runtime.html#Requests_and_Servlets

It would be interesting to test the performance of an ISessionStore
backed by the App Engine datastore.
FYI, I've put a app. with a static variable counter (just a static, not 
in session). And since two days there, the counter is maintained.


So I guess they solution uses something like Terracotta. BTW, they web 
server is Jetty.



Adriano


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



Re: serialVersionUID

2009-04-11 Thread Adriano dos Santos Fernandes

Brill Pappin wrote:

Yes, its fine.

you really only need to worry about that kind of thing when you are 
passing java serialized classes between VMs (as in RMI).
In fact, you likely don't really even need to bother for Wicket, and 
you can turn off that check in Eclipse.
If you care about inability to maintain your users sessions after a 
redeploy, depending on your change, you would not do it. It serves for 
this purpose as well.



Adriano


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



Re: serialVersionUID

2009-04-11 Thread Adriano dos Santos Fernandes

Brill Pappin wrote:
Actually i don't think a missing one will cause that to fail unless 
there are a  lot of incompatible changes.
Just one incompatible change of class stored in the session and it will 
not be deserialized.




However... even if it does matter, *in no way* should anyone depend on 
a serialized session to store data if your app can't recover from 
a clean session, you have bigger problems than not adding a 
serialVersionId.

Hum? What about stateful pages, which is the Wicket market?

If you can control your serial IDs, you have the chance of write custom 
deserializers. That does not means you can't with an absent ID, but 
AFAIU just the inclusion of one field and it will change making the 
deserialization fail.



Adriano



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



WebResource and Guice

2009-03-30 Thread Adriano dos Santos Fernandes

Hi!

I've this, on my Application class:

getSharedResources().add(name, new WebResource() {
   private static final long serialVersionUID = 1L;

   @Override
   public IResourceStream getResourceStream()
   {
   return new AbstractResourceStream() {
   private static final long serialVersionUID = 1L;
   private @Inject TerceiroService service;

   {
   componentInjector.inject(this);
   }

 ...

Would be there a nicer way to inject service in this case?


Adriano


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



Re: AjaxTabbedPanel stopped working.

2009-03-21 Thread Adriano dos Santos Fernandes

Mathias P.W Nilsson wrote:

Hi,

I know this code is long but for some reason my
AjaxTabbedPanel,link,onSubmit() is not getting called. 

Create an onError and add the feedback panel to target, so you'll know why.


Adriano


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



Re: Update DropDownChoice with ModalWindow

2009-03-19 Thread Adriano dos Santos Fernandes

PDiefent escreveu:

Hi,
In my panel I have a DropDownChoice with names. An AjaxLink opens a
ModalWindow where I can enter a new name. After submitting the modal window,
the new name is stored in the database and the new entry is added to the
DropDownChoice contents. All this works fine, but one problem remains: The
new name doesn't show up in the DropDownChoice field, only Choose value is
shown.
Any suggestions?

Looks like lack of hashCode/equals implementation for the type used.


Adriano


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



Re: Update DropDownChoice with ModalWindow

2009-03-19 Thread Adriano dos Santos Fernandes

PDiefent escreveu:

Adriano, I don't know what you mean. In my point of view the
LoadableDetachableModel representing the list with the names is updated, but
the property model representing the actual name not.
I'm using target.addComponent(nameDropDown) in the setWindowClosedCallback()
method and I'm setting the actual name in the onSubmit() method of the
AjaxSubmitLink in the modal window. But obviously there is something missing
...
Looks like lack of hashCode/equals implementation for the type used.
I suffered from exactly problem as you initially described... But in my 
case, however, equals() was implemented to always return false, and 
DropDownChoice calls it. Perhaps, your problem is different, but I don't 
know if it can happen due to different instances of objects created by 
LoadableDetachableModel so you had to correctly override this method, or 
is a totally different thing...



Adriano


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



Re: Correct use of RangeValidator

2009-03-17 Thread Adriano dos Santos Fernandes

Igor Vaynberg escreveu:

textfield doesnt know that it has been declared as textfieldinteger
at runtime unless it is an anonymous class. welcome to java generics.
lookup type erasure.

Hmm... And what about work done using IObjectClassAwareModel?

It seems to work for me, I never need to pass Integer.class to 
TextTypeInteger...



Adriano


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



Re: Why are we top-posting...

2009-03-14 Thread Adriano dos Santos Fernandes

Jeremy Thomerson wrote:

In my experience, top vs bottom vs interleaved posting is dependent on the
community.

Yes.


In my opinion, I appreciate top posting
I do not. When you post something, and one reply with his 
(mis)understands, it's much more difficult to continue a decent dialog 
when reply was top posted.


Also, I would need to write (and you all read) much more to reply this 
message in top post mode.



Adriano

(an interleaved posting fan) :-)


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



Re: building a wicket app with maven 1

2009-03-12 Thread Adriano dos Santos Fernandes

Steve Swinsburg escreveu:

Hi all,

I have a need to backport my wicket app that builds perfectly in 
Maven2 to Maven1. I think I've adjusted all the pom.xml to project.xml 
correctly as all the classes and dependent jars looks like they are 
where they need to be, but on startup I get this:


java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

Although in my WEB-INF/lib I have (amongst the others) the required jars:

slf4j-log4j12-1.4.2.jar
log4j-1.2.14.jar


Any idea what's missing? Does anyone else build under Maven1?

You also need slf4j-api-*.jar.


Adriano


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



ModalWindow and JQueryBehavior

2009-03-10 Thread Adriano dos Santos Fernandes

Hi!

Has anyone used ModalWindow with JQueryBehavior from wicket-stuff?

It seems to cause Javascript problems and the behavior does not do the job.

Is ModalWindow susceptible to problems with many Javascript interrelated 
contributions, some inline and some references?


Wicket DateTime component works for me.


Adriano


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



Re: DropDownChoice with disabled items

2009-03-06 Thread Adriano dos Santos Fernandes

Thanks, Cemal.

However, I must say that I don't like how generics are handled (or not 
handled at all) in these components.



Adriano


jWeekend escreveu:

Adriano,

Take a look at a mini-presentation I gave at one of our London Wicket Events
sometime in last couple of years on Select and SelectOption at
http://jweekend.com/dev/ArticlesPage/  .

Regards - Cemal
http://jWeekend.com jWeekend  



Adriano dos Santos Fernandes-3 wrote:
  

Is there an easy way to do it? Output would be:

select
optionEnabled item/option
option disabled=disabledDisabled item/option
...
/select


Adriano


-
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: DropDownChoice with disabled items

2009-03-06 Thread Adriano dos Santos Fernandes

jWeekend escreveu:

Adriano,

I'm glad it was useful - these classes make DDCs pretty versatile.

Wicket 1.3 is designed to be ale to run on Java versions before 1.5 (when
generics were introduced to the language). Take a look at 
http://wicket.apache.org/docs/1.4/ SelectOption in Wicket 1.4   if you are

using Java 5 or better.

I'm using Wicket 1.4. :-)

Let me explain. The problems are:
- Select is not generified. It receives an unparameterized Model.
- SelectOption is parameterized, but we should rely on getDefaultModel 
(that returns a IModel?), so it getDefaultModel().getObject() always 
returns an Object.



Adriano


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



DropDownChoice with disabled items

2009-03-05 Thread Adriano dos Santos Fernandes

Is there an easy way to do it? Output would be:

select
   optionEnabled item/option
   option disabled=disabledDisabled item/option
   ...
/select


Adriano


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



Re: Uppercasing inputs

2009-03-04 Thread Adriano dos Santos Fernandes

public class UpperCaseBehavior extends AttributeAppender
{
   private static final long serialVersionUID = 1L;

   public UpperCaseBehavior()
   {
   super(style, new ModelString(text-transform: uppercase), ;);
   }

   @Override
   public void bind(Component component)
   {
   super.bind(component);
   component.add(new AttributeAppender(
   onkeyup, new ModelString(this.value = 
this.value.toUpperCase()), ;));

   }
}


Leszek Gawron escreveu:

Hello,

one of my customers has this weird requirement that all data should be 
input/shown uppercase. I can easily add


input {
  text-transform: uppercase;
}

to my css rules, but this does not change the fact that data written 
into database will still be case sensitive.


How can I create a behavior for TextField so that the dat is 
uppercased before being written to the model?


my regards   




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



Re: NullPointerExceptions due to missing Spring constructor injection - Workaround

2009-02-28 Thread Adriano dos Santos Fernandes

Christian Helmbold wrote:

I've found a workaround. Not elegant, but it works:

public class ArticlePage extends WebPage
{
@SpringBean
private ArticleRepository repository;
private Article article;

public ArticlePage()
{
InjectorHolder.getInjector().inject(this);
construct(repository.findByName(index));
}

private void construct(Article article)
{
add(new Label(name, new PropertyModel(article, name)));
//...
}

}

It looks a bit better than service locator pattern but not much. Any other 
suggestions?
Create a abstract (or not) function on the base class and call it from 
the base (now without arguments) constructor. Override this function to 
return what you want based on repository.



Adriano


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



DropDownChoice constructor

2009-02-27 Thread Adriano dos Santos Fernandes

Hi!

Maybe I'm dumb today :-), but I can't access this constructor:
   public DropDownChoice(String id, IModelList? extends T choices, 
IChoiceRendererT renderer)


So I had created new functions using similar generics parameter, and it 
also don't work for the DDC equivalent:
   private T void temp1(String id, IModelListT choices, 
IChoiceRendererT renderer)

   {
   }

   private T void temp2(String id, IModelList? extends T choices, 
IChoiceRendererT renderer)

   {
   }

If I call:
   temp1(, (IModelListConta) null, (IChoiceRendererConta) 
null);   // compile
   temp2(, (IModelListConta) null, (IChoiceRendererConta) 
null);   // don't compile


Error is: The method temp2(String, IModelList? extends T, 
IChoiceRendererT) in the type ... is not applicable for the arguments 
(String, IModelListConta, IChoiceRendererConta).


I can't pass anything on the model. Should not the Wicket constructor be 
changed to IModelListT or what I'm missing?



Adriano


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



Re: DropDownChoice constructor

2009-02-27 Thread Adriano dos Santos Fernandes
Seems I'm late reading this list, and encounter the same problem 
discussed in another thread today. :-)



Adriano


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



Re: using a model with DropDownChoice

2009-02-27 Thread Adriano dos Santos Fernandes

What do you mean with read only here?


Adriano


Igor Vaynberg escreveu:

? extends Foo collections are read only, it would be too
inconvenient to make the model collection read only :)

-igor

On Thu, Feb 26, 2009 at 8:34 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
  

This is what I was commenting on last week on the list (or earlier this
week).  One expects List? extends Foo while the other expects ListFoo.
I'm not fully convinced yet that the ? extends is the better option.
Either way, I think they should be the same.

--
Jeremy Thomerson
http://www.wickettraining.com

On Thu, Feb 26, 2009 at 8:27 PM, Brill Pappin br...@pappin.ca wrote:



Roughly what I'm doing is:

class TypeA{}

class TypeAModel extends LoadableDetachableModel ListTypeA {
   public ListTypeA load(){
   ... do the load ...
   return ...
   }
}

TypeAModel model = new TypeAModel();
DropDownChoice TypeA ddc = new DropDownChoiceTypeA(id, model );

which gets complained about... in this case the generic def is
DropDownChoiceList? extends T

I think the problem is that the generic def of the class should actually be
DropDownChoiceListT because you are already identifying the type when
you create a new instance.

Now... my generics are a bit hazy at this level, because I can understand
why it was done that way... does anyone with more generics experience know
what it should be? Is this a bug that needs filing?

- Brill



On 26-Feb-09, at 6:03 PM, Kaspar Fischer wrote:

 On 26.02.2009, at 22:52, Brill Pappin wrote:
  

 For some reason the DropDownChoice component doesn't have the same


generics as ListView and it will not accept a model that listview will,
despite its saying that it will accept an IModel.

Is anyone else having that sort of trouble with DropDownChoice?

- Brill

  

Can you give us more information on what exactly is not working for you?

DropDownChoice indeed does accept a model, see for instance the example in
the class description at


http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/DropDownChoice.html

This works for me.

Kaspar

--

!-- HTML: --
 select wicket:id=site
  optionsite 1/option
  optionsite 2/option
 /select
 ul
 li wicket:id=site2wicket:container wicket:id=sitename//li
 /ul

// Code
  List SITES = Arrays.asList(new String[] {
  The Server Side, Java Lobby, Java.Net
  });
  form.add(new DropDownChoice(site, SITES));
  form.add(new ListView(site2, SITES)
  {
@Override
protected void populateItem(ListItem item)
{
  item.add(new Label(sitename, item.getModel()));
}
  });


-
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


  


? extends

-
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



Border body inside a fragment

2009-02-25 Thread Adriano dos Santos Fernandes

Hi!

I'm having some difficulties to achieve this, may be it's not supported?

My Border have:
wicket:border
   wicket:fragment wicket:id=windowFragment
  ...
  wicket:body /
  ...
   /wicket:fragment
wicket:border

I.e., could the border body be inserted inside a fragment? I want this 
to use with a ModalWindow.


If I know it's supported, I could try a quickstart...


Adriano


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



IResourceStream.close

2009-02-17 Thread Adriano dos Santos Fernandes

Hi!

Why does IResourceStream have a close() method? I don't see it being 
called in 1.4-RC2.


Shouldn't ResourceStreamRequestTarget.detach call it?


Adriano


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



Re: IResourceStream.close

2009-02-17 Thread Adriano dos Santos Fernandes

https://issues.apache.org/jira/browse/WICKET-2109


Johan Compagner escreveu:

as far as i know it is called all over the place
For example WicketFilter.getLastModified()

But you are right about the RSRT that one should call close on detach as far
as i can see
can you make a jira issue?

On Tue, Feb 17, 2009 at 12:44, Adriano dos Santos Fernandes 
adrian...@gmail.com wrote:

  

Hi!

Why does IResourceStream have a close() method? I don't see it being called
in 1.4-RC2.

Shouldn't ResourceStreamRequestTarget.detach call it?


Adriano


-
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: AbstractAjaxTimerBehavior / Firefox / Page constructor

2009-02-16 Thread Adriano dos Santos Fernandes

Johan Compagner escreveu:

That settings just triggers some code that checks if the pagemap name
is equal to the window name if that isnt the case then it does a
redict to a new page so that every browser window has its own pagemap

Why do you have that setting enabled? With the disk store it is not
really needed anymore

The problem gone away removing this setting, thanks!

My page is very simple, with one img wicket:id=loading / tag (i.e., 
src is not empty).



Adriano


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



Re: AbstractAjaxTimerBehavior / Firefox / Page constructor

2009-02-15 Thread Adriano dos Santos Fernandes
I had some issue when opening multiple tabs. But I should revisit this, 
because my page was with a serialization problem this time.



Adriano


Johan Compagner wrote:

That settings just triggers some code that checks if the pagemap name
is equal to the window name if that isnt the case then it does a
redict to a new page so that every browser window has its own pagemap

Why do you have that setting enabled? With the disk store it is not
really needed anymore

On 13/02/2009, Adriano dos Santos Fernandes adrian...@gmail.com wrote:
  

Johan Compagner escreveu:


if that happens then the newWindowBrowser detection is enabled and
executed.
This makes sure that a new tab or browser window (but same session) will
have there own pagemap
  

I have getPageSettings().setAutomaticMultiWindowSupport(true). But why
AbstractAjaxTimerBehavior would cause a redirection (I see the new url
with the wicket:pageMapName/wicket-N in the browser). And each time I
enter in the page, N is incremented. May be something wrong on wicket
javascripts?


Adriano


-
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

  



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



Re: AbstractAjaxTimerBehavior / Firefox / Page constructor

2009-02-14 Thread Adriano dos Santos Fernandes
I know I have, but could only test about it on Monday. Is there any 
workaround, to have the timer and the image together?


Thanks,


Adriano


Jeremy Thomerson wrote:

Have you made sure that you don't have any img src= ... / in your code?
This has been known to cause similar behavior.

On Thu, Feb 12, 2009 at 11:45 AM, Adriano dos Santos Fernandes 
adrian...@gmail.com wrote:

  

Thomas Mäder escreveu:



Why don't you put a breakpoint in the constructor and see let us know what
you find out? Is the constructor called through the same stack trace
twice?

  

The constructor is called by the filter, it's another request from the
browser. The first URL is the entered one, and the second has a new
parameter about wicket pagemap. The page is a bookmarkable.

I haven't succeed to debug with Firebug.



Adriano


-
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: AbstractAjaxTimerBehavior / Firefox / Page constructor

2009-02-13 Thread Adriano dos Santos Fernandes

Johan Compagner escreveu:

if that happens then the newWindowBrowser detection is enabled and executed.
This makes sure that a new tab or browser window (but same session) will
have there own pagemap
I have getPageSettings().setAutomaticMultiWindowSupport(true). But why 
AbstractAjaxTimerBehavior would cause a redirection (I see the new url 
with the wicket:pageMapName/wicket-N in the browser). And each time I 
enter in the page, N is incremented. May be something wrong on wicket 
javascripts?



Adriano


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



AbstractAjaxTimerBehavior / Firefox / Page constructor

2009-02-12 Thread Adriano dos Santos Fernandes
I've a simple page as below, and when I call it from Firefox, ReportPage 
constructor is almost always called two times. Some times it's correctly 
called once. What may be wrong?


public class ReportPage extends WebPage
{
   private static final long serialVersionUID = 1L;
   private static final int CHECK_INTERVAL = 2;// segundos

   public ReportPage(PageParameters parameters)
   {
   super(parameters);

   WebMarkupContainer update = new WebMarkupContainer(update);
   add(update);
   update.add(new 
AbstractAjaxTimerBehavior(Duration.seconds(CHECK_INTERVAL)) {

   private static final long serialVersionUID = 1L;

   @Override
   protected void onTimer(AjaxRequestTarget target)
   {
   }
   });
   }
}


Adriano


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



Re: AbstractAjaxTimerBehavior / Firefox / Page constructor

2009-02-12 Thread Adriano dos Santos Fernandes

Thomas Mäder escreveu:

Why don't you put a breakpoint in the constructor and see let us know what
you find out? Is the constructor called through the same stack trace twice?
The constructor is called by the filter, it's another request from the 
browser. The first URL is the entered one, and the second has a new 
parameter about wicket pagemap. The page is a bookmarkable.


I haven't succeed to debug with Firebug.


Adriano


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



Re: IoC: how to best handle non-serializable fields in wicket

2009-02-05 Thread Adriano dos Santos Fernandes

Andreas Petersson wrote:

hi timo, thanks for the links.

well, i've modeled my application after reading the mentioned example.

from Wicket, Guice and Ibatis example:

public class MyPage extends WebPage {
@Inject
protected MyDao myDao;


---
i wonder: myDao is most likely not serializable.
WebPage is. WebPage should get serialized. so why the heck does this 
not throw an error? what kind of magic is going on here?


My understand (of a guice newbie) is that your DAO class is not required 
(and will not be, using guice) serializable. But you should have a 
serializable interface. Wicket-ioc/guice will create a serializable 
proxy with a transient instance of the implementation. When it's null, a 
instance will be reinjected reinjected.



Adriano


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



Re: best way to obtain component reference?

2009-01-22 Thread Adriano dos Santos Fernandes

Phillip Rhodes wrote:

I am trying to update the label text on a page from a inner class (onSubmit) of 
my page.

I used the page.get(componentid) method, but it returns null.  While I could 
just store the reference to the label as a variable in my page class, I would like to 
understand how to obtain a reference to it using the wicket API.

When I use the following snippet, my get method always return null.

Thanks, appreciate the help.

public class AdminPage extends WebPage {
public AdminPage() {
add(new Label(message, If you see this message wicket is properly 
configured and running));
DMIRequest dmiRequest = new DMIRequest();
Form myform = new Form(myform, new CompoundPropertyModel(dmiRequest));
add(myform);

myform.add(new DeleteButton());
}
}

private  class DeleteButton extends Button
{
private static final long serialVersionUID = 1L;

private DeleteButton()
{
super(delete, new ResourceModel(delete));
setDefaultFormProcessing(true);
}

@Override
public void onSubmit()
{   
  Label lbl = new Label(message, Deleted);
  this.get(message).replaceWith(lbl);

Use AdminPage.this.get(message).


Adriano


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



Re: Sorting a column populated through pupulateItem method...

2009-01-08 Thread Adriano dos Santos Fernandes

nitinkc wrote:

I have a requirement to sort a column of a Datatable which does not have any
property values. Sorting property columns is easy using the
getSortProperty() method. However in this case, I am populating the values
in the column using the 


populateItem(org.apache.wicket.markup.repeater.Item cellItem,
java.lang.String componentId,
org.apache.wicket.model.IModel rowModel)

method. The column values are generated using additional logic in this
method and are not representative of any property value. Any ideas??
  
The second parameter of PropertyColumn constructor is the property used 
for sorting.



Adriano


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



Re: DateTimeField Error and Question

2009-01-01 Thread Adriano dos Santos Fernandes

As following:
   protected DateTextField newDateTextField(String id, PropertyModel 
dateFieldModel)

   {
   return DateTextField.forDateStyle(id, dateFieldModel, M-);
   }


Adriano


Gerolf Seitz wrote:

you can override the method newDateTextField(String, PropertyModel) and
return
a customized DateTextField object.

  gerolf

On Thu, Jan 1, 2009 at 6:44 AM, tbt nadeesh...@yahoo.com wrote:

  

Hi

I am not sure if the DateTextField attribute in the DateTimeField class can
be modified to change the calendar behavior. But you could use a TextField
or a DateTextField and add a DatePicker instance to it like the following
example

TextField checkInField = new TextField(checkInField
   ,new
PropertyModel(searchModel,checkInDate));
   DatePicker checkInPicker = new DatePicker()
   {
   protected String getDatePattern()
   {
   return dd/MMM/;
   }
   };
   checkInField.add(checkInPicker);

regards

--
View this message in context:
http://www.nabble.com/DateTimeField-Error-and-Question-tp21221202p21239433.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: feedback message without a form

2008-12-30 Thread Adriano dos Santos Fernandes

miro escreveu:

here is my code

public void onClick(AjaxRequestTarget target) {
if(assignProgramsDTO.getGrantsAssigned().size()==0){
getPage().error(Please assing grants);
return;
}

getStgAuditProcessService().startProcess(assignProgramsDTO);
setResponsePage(HomePage.class);
setRedirect(true);
}
  

Add the feedbackpanel to target.


Adriano


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



Re: any better at dealing with Image in DataTable

2008-12-30 Thread Adriano dos Santos Fernandes

Kirk Israel wrote:

Running into the same issue as seen in:
http://www.mail-archive.com/wicket-u...@lists.sourceforge.net/msg03706.html
where you try to put an Image in a DataTable and get

Component cell must be applied to a tag of type 'img', not 'span
wicket:id=cell' (line 0, column 0)

Is there a simpler way of handling this thats emerged in the 3 years
since, or do you still need at least an inner class with a standalone
HTML file?

You may use a fragment instead of new HTML file.


Adriano


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



DataTable columns markup

2008-12-26 Thread Adriano dos Santos Fernandes

Hi!

First, I must say that I'm not a expert on valid HTML, I just tested my 
markup with the w3c validator.


I created a MultiLinePropertyColumn class, that basically have:
   @Override
   public void populateItem(ItemICellPopulatorT item,
   String componentId, IModelT rowModel)
   {
   MultiLineLabel label = new MultiLineLabel(componentId, 
createLabelModel(rowModel));

   item.add(label);
   }

It then generates that markup:
   tdspanp.../p/span/td

But paragraphs are not valid inside span.

Won't it be better to generate divs instead of spans for each DataTable 
(or one of its base component) columns, as divs are less restrictive? 
Changing the markup directly in Firefox didn't changed the appearance in 
my test.



Adriano


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



SignInPanel of wicket-auth-roles (1.4-rc1)

2008-12-23 Thread Adriano dos Santos Fernandes

Hi!

Different from the SignInPanel of the examples, the wicket-auth-roles 
component doesn't do setType(String.class) for username and password. 
That causes warnings in the log about unrecognized model type.


Should not the setType be there?


Adriano


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



Re: Adding images for sorting to HeadersToolbar

2008-12-19 Thread Adriano dos Santos Fernandes

Emanuele Gesuato escreveu:

Hi there,


We are using the default HeadersToolbar in an our customized 
DataTable, now we would like to add in every cell of the header two 
images (an up and down arrows) for helping the user sorting the table.


I think this is a common feature and i was wondering if there are some 
examples around.


Our context is that in the beginning either the images are displayed 
and once the user clicks on one of them, the other one have to 
disappear. It seems quite simple but i would like to see some examples 
around the net.

I use this CSS:

.wicket_orderDown
{
   background-image: url(../images/arrow_down.png);
}

.wicket_orderUp
{
   background-image: url(../images/arrow_up.png);
}

.wicket_orderDown, .wicket_orderUp
{
   margin-right: 8px;
}

.wicket_orderDown *, .wicket_orderUp *
{
   background-image: none;
}

You can found these images on Wicket package.


Adriano


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



Re: How to determine which page I am on?

2008-12-17 Thread Adriano dos Santos Fernandes

pieter claassen escreveu:

Adriano, that worked, thanks!!

Why did it work?
On the Panel constructor, it's not yet added to any page, as you need an 
instance to add it to a page. :-)


On onBeforeRender, you have the complete components hierarchy ready.


Adriano


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



Re: strange 404 error

2008-12-17 Thread Adriano dos Santos Fernandes
I'm having similar errors (not 404, but internal error, sorry but do not 
have stack trace right now, and is not always reproducible). I use 
Wicket 1.4-rc1 and auth-roles with Tomcat6.


It seems that when there is no session, just after the login the error 
happens. It was a NoMethodFound from IForm*.



Adriano


Brill Pappin escreveu:

We are getting a consistent 404 error during our first login.

it seems to be appending the jsessionid= param and wicket doesn't seem 
to like it.




This usually happens on the first login of the day:
the app redirects to the login page with the session id appended:

Goto: http://localhost:8080/
Redirected to: 
http://localhost:8080/login;jsessionid=1b5axe9wb1o8k

Receive a 404 error:
HTTP ERROR: 404

NOT_FOUND

RequestURI=/login;jsessionid=1b5axe9wb1o8k

Powered by Jetty://

This is happening in your dev Jetty instance and on you production 
Tomcat 6 instance.


It looks to me as if the login system (auth-roles) is getting the 
session id from something other than the real session, and attempting 
to use it, but it may also be WIcket not parsing the URI properly.


We're using Wicket 1.4 SNAPSHOT deps.

Does anyone have any idea how to resolve this?

- Brill Pappin


-
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: strange 404 error

2008-12-17 Thread Adriano dos Santos Fernandes

Matthew Hanlon wrote:

This is a Jetty thing...

One way to fix it is to suppress the jsessionid in the url.  Jetty allows
you to suppress the jsessionid in the url as a context parameters in the
web.xml or webdefault.xml.  Note, if the user does not have cookies enabled
this will cause problems.
The jsessionid is also appearing on my falling URL (Tomcat). And I have 
cookies enabled.



Adriano


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



Re: Overriding Text No Records Found

2008-12-16 Thread Adriano dos Santos Fernandes

HITECH79 escreveu:

Hallo,

how can i override/modify the text No Records Found
If you are talking about the DataTable component, write a 
YourApplication.properties on the same package as YourApplication 
class, and put:

datatable.no-records-found=Nenhum registro encontrado


Adriano


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



Re: CSS urls

2008-12-16 Thread Adriano dos Santos Fernandes
Knowing about HeaderContributor.forCss, I didn't realized that the 
images urls would be correctly resolved.


Thanks.

Wicket is so cool. :-)


Adriano


Martijn Dashorst escreveu:

See HeaderContributor.forCss()

Martijn

On Tue, Dec 16, 2008 at 10:51 AM, Adriano dos Santos Fernandes
adrian...@uol.com.br wrote:
  

No good/better way? The problem of using the web directory is that I can't
do that with non-web utility projects in Eclipse and have the files being
contributed to web projects.


Adriano


Adriano dos Santos Fernandes escreveu:


Hi!

What is the better way to handle CSS urls [background: url(...)], inside
HTML style tags?

As I see, wicket:link doesn't work, so I'm writing url(style.css) and
putting style.css on the normal html directory. Obviously, this don't work
if I mount pages with path different than /.


Adriano


-
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







  



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



Re: CSS urls

2008-12-16 Thread Adriano dos Santos Fernandes
No good/better way? The problem of using the web directory is that I 
can't do that with non-web utility projects in Eclipse and have the 
files being contributed to web projects.



Adriano


Adriano dos Santos Fernandes escreveu:

Hi!

What is the better way to handle CSS urls [background: url(...)], 
inside HTML style tags?


As I see, wicket:link doesn't work, so I'm writing url(style.css) 
and putting style.css on the normal html directory. Obviously, this 
don't work if I mount pages with path different than /.



Adriano


-
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 determine which page I am on?

2008-12-16 Thread Adriano dos Santos Fernandes

pieter claassen wrote:

I am trying to write a menu that formats the link nicely for the page I am
on. So far, the novomatic tut helped the most, but there is no detail on how
to customize the implementation.

My strategy is to determine which page I am on and then to set an attribute
on the link and format it with css.

I have tried to use getParent() and getPage() on my menu panel with no luck.

public class MainMenu extends Panel {
.
if (getPage().getClass().equals(com.musmato.HomePage.class)) {
System.out.println(Homepage);
}
  

I think if you put that code on onBeforeRender it will work.


Adriano


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



Re: Remove bulletpoints from messagetext in feedbackpanel

2008-12-15 Thread Adriano dos Santos Fernandes

HITECH79 escreveu:

Hallo,

how can i remove the bulletpoints from messagetext in the feedbackpanel??
  

With CSS stylesheet:

li.feedbackPanelINFO
{
   list-style-type: none;
}

li.feedbackPanelERROR
{
   list-style-type: none;
}


Adriano


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



CSS urls

2008-12-13 Thread Adriano dos Santos Fernandes

Hi!

What is the better way to handle CSS urls [background: url(...)], inside 
HTML style tags?


As I see, wicket:link doesn't work, so I'm writing url(style.css) and 
putting style.css on the normal html directory. Obviously, this don't 
work if I mount pages with path different than /.



Adriano


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



NPE when redeploying

2008-12-10 Thread Adriano dos Santos Fernandes

Hi!

With Eclipse+Tomcat, that problems happens often when redeploying an 
application.


Is it something that can be fixed? I'm using 1.4-rc1.

Adriano

WicketMessage: Exception in rendering component: [MarkupContainer 
[Component id = _header_0]]


Root cause:

java.lang.NullPointerException at 
java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768) 
at 
org.apache.wicket.markup.MarkupCache$DefaultCacheImplementation.get(MarkupCache.java:738) 
at 
org.apache.wicket.markup.MarkupCache.removeMarkup(MarkupCache.java:130) 
at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:485) 
at 
org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:553) 
at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:319) 
at 
org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:215) 
at 
org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:354) 
at 
org.apache.wicket.markup.html.ContainerWithAssociatedMarkupHelper.renderHeadFromAssociatedMarkupFile(ContainerWithAssociatedMarkupHelper.java:72) 
at 
org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.renderHeadFromAssociatedMarkupFile(WebMarkupContainerWithAssociatedMarkup.java:73) 
at org.apache.wicket.markup.html.panel.Panel.renderHead(Panel.java:137) 
at 
org.apache.wicket.markup.html.internal.HtmlHeaderContainer$1.component(HtmlHeaderContainer.java:223) 
at 
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:859) 
at 
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:874) 
at 
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:874) 
at 
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:874) 
at 
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:874) 
at 
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:874) 
at 
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:874) 
at 
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:899) 
at 
org.apache.wicket.markup.html.internal.HtmlHeaderContainer.renderHeaderSections(HtmlHeaderContainer.java:214) 
at 
org.apache.wicket.markup.html.internal.HtmlHeaderContainer.onComponentTagBody(HtmlHeaderContainer.java:138) 
at org.apache.wicket.Component.renderComponent(Component.java:2525) at 
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1504) at 
org.apache.wicket.Component.render(Component.java:2361) at 
org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:232) at 
org.apache.wicket.markup.resolver.HtmlHeaderResolver.resolve(HtmlHeaderResolver.java:78) 
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) 
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1520) 
at org.apache.wicket.Page.onRender(Page.java:1502) at 
org.apache.wicket.Component.render(Component.java:2361) at 
org.apache.wicket.Page.renderPage(Page.java:906) at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:249) 
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104) 
at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1194) 
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1265) at 
org.apache.wicket.RequestCycle.steps(RequestCycle.java:1366) at 
org.apache.wicket.RequestCycle.request(RequestCycle.java:498) at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:444) 
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) 
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) 
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) 
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) 
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 
at java.lang.Thread.run(Thread.java:619)


Complete stack:

org.apache.wicket.WicketRuntimeException: Exception in rendering 
component: [MarkupContainer [Component id = _header_0]] at 
org.apache.wicket.Component.renderComponent(Component.java:2564) at 
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1504) at 

Re: using annotation @AuthorizeInstantiation

2008-12-05 Thread Adriano dos Santos Fernandes

Bruno Borges escreveu:
Note that this is really type-safe, and these classes will never be 
instantiated.
I don't think this has any value in this context. Where will the roles x 
user will be? On the database, certainly...


So why declare dummy classes for them? If yon don't want to repeat 
strings, you could create static final constants somewhere...



Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Session invalidation - 1.4-rc1

2008-12-02 Thread Adriano dos Santos Fernandes

Hi!

After upgrade from m3 to rc1, a problem with session invalidation appeared.

I have a Exit menu, using Ajax (AbstractDefaultAjaxBehavior). On its 
respond, it does:

   getSession().invalidate();
   setResponsePage(HomePage.class);

This worked with m3, but now nothing happens, and in the next request a 
session expired error happens.


The Ajax debug shows:
INFO: Using XMLHttpRequest transport
INFO:
INFO: Initiating Ajax GET request on 
?wicket:interface=:1:toolbar::IBehaviorListener:1:item=3random=0.36475325857545937

INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (1 characters)
INFO:

ERROR: Error while parsing response: Could not find root ajax-response 
element

INFO: Invoking post-call handler(s)...
INFO: Invoking failure handler(s)...

Any clue?


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session invalidation - 1.4-rc1

2008-12-02 Thread Adriano dos Santos Fernandes
Oops, problem a bit different, and solved, but I don't know why this 
worked before and not now.


HomePage has only one constructor:
   HomePage(PageParameters parameters)

Creating a instance now works:
   setResponsePage(new HomePage(new PageParameters()));

I believe, in 1.4-m3 a empty PageParameters has being passed...


Adriano


Adriano dos Santos Fernandes escreveu:

Hi!

After upgrade from m3 to rc1, a problem with session invalidation 
appeared.


I have a Exit menu, using Ajax (AbstractDefaultAjaxBehavior). On its 
respond, it does:

   getSession().invalidate();
   setResponsePage(HomePage.class);

This worked with m3, but now nothing happens, and in the next request 
a session expired error happens.


The Ajax debug shows:
INFO: Using XMLHttpRequest transport
INFO:
INFO: Initiating Ajax GET request on 
?wicket:interface=:1:toolbar::IBehaviorListener:1:item=3random=0.36475325857545937 


INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (1 characters)
INFO:

ERROR: Error while parsing response: Could not find root 
ajax-response element

INFO: Invoking post-call handler(s)...
INFO: Invoking failure handler(s)...

Any clue?


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Monitor session size in Tomcat

2008-12-01 Thread Adriano dos Santos Fernandes

Hi!

This is not a direct wicket question, but important for wicket usage, so 
I'm asking here...


What you use to monitor Tomcat sessions size? (preferable something that 
I can use in production)


I tried with JMX/jconsole and with LambdaProbe. The former doesn't seems 
to have that info, and the later probably enters in cycle, because 
estimate sizes nevers end for a session just established.


Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Monitor session size in Tomcat

2008-12-01 Thread Adriano dos Santos Fernandes
So does that mean there is nothing already made to monitor session size 
at container level instead of  application level?



Adriano


Johan Compagner escreveu:

you can monitor what wicket does with the IRequestLogger

On Mon, Dec 1, 2008 at 16:13, Adriano dos Santos Fernandes 
[EMAIL PROTECTED] wrote:

  

Hi!

This is not a direct wicket question, but important for wicket usage, so
I'm asking here...

What you use to monitor Tomcat sessions size? (preferable something that I
can use in production)

I tried with JMX/jconsole and with LambdaProbe. The former doesn't seems to
have that info, and the later probably enters in cycle, because estimate
sizes nevers end for a session just established.

Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Portlets (JSR-168) and Ajax

2008-11-22 Thread Adriano dos Santos Fernandes

Hi!

I'm trying to create portlets with Wicket, to use in Oracle Portal. 
Portlets on it is with JSR-168 via WSRP. And I'm having trouble...


But before go further, I want to know, with JSR-168 can I use Ajax?

On my environment, Oracle Portal and the portlets application runs in 
different servers, but on the Portal server there is a URL redirection 
to the application server. I have portlets using AJAX with DWR working 
there...



Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Portlets (JSR-168) and Ajax

2008-11-22 Thread Adriano dos Santos Fernandes

Thijs Vonk wrote:
I have no experience with WSRP, but I do know that the portal should 
support a bit more then just jsr-168.  See 
http://cwiki.apache.org/WICKET/portal-howto.html

also the way DWR does it is different then the way wicket works.

Sure.

If I remember correctly DWR functions as a separate servlet next to te 
portal that catches the ajax requests.
Yes. My application is on different server and port, so the redirection 
from the container is needed to it work.


With wicket the portlet itself handles the ajax request and response, 
which officially isn't supported by jsr-168.
Do you mean that ajax doesn't work with wicket 1.4? This is not clear 
for me reading the wiki page...


Also, does components requiring header contribution works, for example, 
contributing things via Javascript instead of the head tag?


Thanks for reply.


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Markup for a component interior

2008-11-18 Thread Adriano dos Santos Fernandes
I have a generic Form component (extends Form) and it adds child 
components to this. But where I place this form, I need to specify more 
content for the form interior. Kind of:


form ...
   tags put by the Form class

   tags put by who inserted the class on the page
/form

In my prototype code, I have all the markup inside the page, and I add 
the form to it. But as I'm going to create more pages, I don't want to 
duplicate the markup. I feel my case is not for page inheritance. In 
fact, I'm already using page inheritance for generic layout.


Any advice why I could do it?


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validators in 1.4-rc1

2008-11-18 Thread Adriano dos Santos Fernandes

I had this in 1.4-m3 working:
   long value = ...;
   textField.add(NumberValidator.maximum(value));

My textField is instantiated as TextFieldInteger and declared as 
TextField?, so I put a long validation for a Integer TextField. It 
also works in 1.4-rc1, but NumberValidator is deprecated.


So I had replaced it:
   textField.add(new MaximumValidator(value));

It caused a warning and assumes a MaximumValidatorLong. This code 
caused a runtime exception:
   WicketMessage: Exception 'java.lang.ClassCastException: 
java.lang.Long cannot be cast to java.lang.Integer' occurred during 
validation ...


How could I have this type of validator? I tried a 
MaximumValidatorNumber but it's not compilable.



Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validators in 1.4-rc1

2008-11-18 Thread Adriano dos Santos Fernandes

Jeremy Thomerson escreveu:

how about new MaximumValidatorInteger(value)?
  
The problem is that I'm iterating on a list of unknown text fields. And 
the maximum value is from a Entity using Hibernate Annotation.


So it seems a valid case to validate a TextFieldInteger with a long.


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Markup for a component interior

2008-11-18 Thread Adriano dos Santos Fernandes

John Krasnay escreveu:

You probably want to implement a Border instead of extending Form.
Border is exactly what I was looking for. But I'm having problems 
[Cannot modify component hierarchy after render phase has started (page 
version cant change then anymore)] with component hierarchies.


My border markup has a form wicked:id and wicket:body / is inside 
it. Is it Border suitable for this usage?



Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: authenticatedWebApplication error with jaas

2008-11-14 Thread Adriano dos Santos Fernandes

francesco dicarlo escreveu:

package it.eurosoft;

import it.eurosoft.gui.module.login.LoginBase;
import it.eurosoft.gui.module.pratiche.PraticheBase;
import it.eurosoft.mapping.convenzioni.Convenzione;
import it.eurosoft.util.MySession;

import java.util.Locale;

import org.apache.wicket.Application;
import org.apache.wicket.Page;
import org.apache.wicket.Request;
import org.apache.wicket.Response;
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;

import wicket.authentication.AuthenticatedWebApplication;
import wicket.authentication.AuthenticatedWebSession;
import wicket.markup.html.WebPage;
You are mixing things from different Wicket versions. Do not use 
wicket.* imports. Use only org.apache.wicket.*.



Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: offtopic (a bit ;) for all the generics lovers here on the list :)

2008-11-14 Thread Adriano dos Santos Fernandes

The code is not so cool as the compiler error messages! :-)


Adriano


Igor Vaynberg escreveu:

youve never coded WTL?

-igor

On Fri, Nov 14, 2008 at 8:17 AM, Johan Compagner [EMAIL PROTECTED] wrote:
  

Who has a real live example of this function:

http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166ydocs/jsr166y/forkjoin/ParallelArrayWithMapping.html#withMapping(jsr166y.forkjoin.Ops.BinaryOp,%20jsr166y.forkjoin.ParallelArrayWithMapping)

Its one of the most beautiful generic methods i have ever seen!
dont you think?

johan




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Top-level classpath Resources

2008-11-07 Thread Adriano dos Santos Fernandes

Hi!

With this:
   component.add(HeaderContributor.forCss(YuiButtonBehavior.class,
   yui/build/button/assets/skins/sam/button.css));

I need to put yui directory inside the directory of YuiButtonBehavior.

How could I make yui a top directoy, i.e., just inside the resources (on 
the classpath)? I tried:

   component.add(HeaderContributor.forCss(new ResourceReference(
   yui/build/button/assets/skins/sam/button.css)));

But it don't work.

Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Top-level classpath Resources

2008-11-07 Thread Adriano dos Santos Fernandes

Bruno Borges escreveu:

By the way, Adriano, there's a Wicket Portuguese community around there...
If you want to join us, please feel free. groups.google.com/wicket-ptbr
  

Yup. I'm there too. :-)


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does serialization work?

2008-11-04 Thread Adriano dos Santos Fernandes
I had a serialization problem (when redeploying the application in 
Tomcat) that I can't understand... Basically, I had this on my 
Page.onBeforeRender:

---
   visitChildren(TextField.class, new VisitorTextField?() {
   private static final long serialVersionUID = 1L;

   public Object component(TextField? textField)
   {
   textField.add(new AjaxEventBehavior(onchange) {
   private static final long serialVersionUID = 1L;

   @Override
   protected void onEvent(AjaxRequestTarget target)
   {
   if (mode == Mode.NAVIGATE)
   {
   mode = Mode.EDIT;
   setupMode();
   target.addComponent(buttonPanel);
   }
   }
   });

   setupValidators(textField);
   return IVisitor.CONTINUE_TRAVERSAL;
   }
   });
---

The non-serializable class was the one created by new 
VisitorTextField? () { ... }. Creating MyVisitor and replacing this 
call solved the problem:

---
   private abstract class MyVisitorX extends Component
   implements IVisitorX, Serializable
   {
   private static final long serialVersionUID = 1L;
   }
---

Why should a non-serializable Visitor could case this problem? Does 
(why?) it get cached on the page?



Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does serialization work?

2008-11-04 Thread Adriano dos Santos Fernandes

Johan Compagner escreveu:

thats simple

what you there create is an inner class in an inner class...

so your textfield has a ajax behavior that is an inner class fo the Visitor
inner class so that behavior has a parent reference to the visitor..
make that ajax behavior his own class and your problem is solved

Very good catch. :-) Unfortunately the exception was not helpful.

Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Advice for a YUI Button Component

2008-11-04 Thread Adriano dos Santos Fernandes

Hi!

I didn't found any project integrating YUI Button with Wicket, and I'd 
want it. The problem that I'm seen is that onclick should not be on the 
button tag, but specified from javascript.


Would be possible to have *Link classes working (inheriting, or with 
behaviors) this way without need to reimplement all them?


Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Advice for a YUI Button Component

2008-11-04 Thread Adriano dos Santos Fernandes

Thanks, Nino.

That is the good and easy way that I want to know.


Adriano


Nino Saturnino Martinez Vazquez Wael escreveu:
Sure.. Just make the javascript call what ever the link calls.. You 
can see the input events contrib on wicketstuff on howto do this..


Adriano dos Santos Fernandes wrote:

Hi!

I didn't found any project integrating YUI Button with Wicket, and 
I'd want it. The problem that I'm seen is that onclick should not be 
on the button tag, but specified from javascript.


Would be possible to have *Link classes working (inheriting, or with 
behaviors) this way without need to reimplement all them?


Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect from an AjaxSelfUpdatingTimerBehavior

2008-11-03 Thread Adriano dos Santos Fernandes

Done: https://issues.apache.org/jira/browse/WICKET-1911


Adriano


Igor Vaynberg escreveu:

yes

-igor

On Sat, Nov 1, 2008 at 11:25 AM, Adriano dos Santos Fernandes
[EMAIL PROTECTED] wrote:
  

Yes. Do you want a quickstart demonstrating the problem?




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect from an AjaxSelfUpdatingTimerBehavior

2008-11-01 Thread Adriano dos Santos Fernandes

Yes. Do you want a quickstart demonstrating the problem?


Adriano


Igor Vaynberg wrote:

does it work if you do not use ajax?

-igor

On Fri, Oct 31, 2008 at 6:38 AM, Adriano dos Santos Fernandes
[EMAIL PROTECTED] wrote:
  

Francisco Diaz Trepat - gmail escreveu:


Hi Adriano, maybe looking for PDF dynamic resource will bring something
up.
We had a similiar issue and discussed it on the list a while ago.
f(t)
  

Are you referring to this one
http://www.nabble.com/Hi%2C-PDF-Question-td15050471.html#a15065319?

It seems not my case, or I don't get it.

And when I redirect with PageRequestTarget it works so seems an issue with
ResourceStreamRequestTarget.


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Redirect from an AjaxSelfUpdatingTimerBehavior

2008-10-31 Thread Adriano dos Santos Fernandes

Hi!

I added AjaxSelfUpdatingTimerBehavior to a WebMarkupContainer (div), and 
inside its onPostProcessTarget I loaded a PDF 
(ResourceStreamRequestTarget) and called 
RequestCycle.get().setRequestTarget(requestTarget).


After that, redirection doesn't happen, and I see the PDF content on the 
AJAX Debug Window.


Can (and how) I redirect to another page/resource from 
AjaxSelfUpdatingTimerBehavior?


Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect from an AjaxSelfUpdatingTimerBehavior

2008-10-31 Thread Adriano dos Santos Fernandes

Francisco Diaz Trepat - gmail escreveu:

Hi Adriano, maybe looking for PDF dynamic resource will bring something up.
We had a similiar issue and discussed it on the list a while ago.
f(t)
Are you referring to this one 
http://www.nabble.com/Hi%2C-PDF-Question-td15050471.html#a15065319?


It seems not my case, or I don't get it.

And when I redirect with PageRequestTarget it works so seems an issue 
with ResourceStreamRequestTarget.



Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Background processing

2008-10-31 Thread Adriano dos Santos Fernandes

Hi!

AFAIK, processing for ResourceStreamRequestTarget is not synchronized, 
so I can have more than one running in the same session. But due to my 
other problem, I had to wrap it on a Page to redirect. But that suspend 
user interaction until a report is completed, a thing that I don't want.


So I'm now generating (nothing depends on Wicket) the report in a new 
thread started on the Page constructor and when that thread finalizes it 
puts the report on a variable of the Page. Meanwhile, there is a 
AbstractAjaxTimerBehavior verifying when that variable is not null to 
create the ResourceStreamRequestTarget and do the redirection.


This works, but only when I'm doing nothing except waiting for the 
report completion. Is it due to when any other request happens the 
original page is serialized and the running thread updates the old one, 
and the timer acts on the new deserialized page?


Is there a way to do background work like I want?

Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Background processing

2008-10-31 Thread Adriano dos Santos Fernandes

Hi Nino!

From my understanding of the component and the example, it will make a 
length AJAX call until the report is complete, so it will make the user 
session blocked. Or am I wrong?


Thanks,


Adriano


Nino Saturnino Martinez Vazquez Wael escreveu:

put the stuff in a lazyloading panel..

Adriano dos Santos Fernandes wrote:

Hi!

AFAIK, processing for ResourceStreamRequestTarget is not 
synchronized, so I can have more than one running in the same 
session. But due to my other problem, I had to wrap it on a Page to 
redirect. But that suspend user interaction until a report is 
completed, a thing that I don't want.


So I'm now generating (nothing depends on Wicket) the report in a new 
thread started on the Page constructor and when that thread finalizes 
it puts the report on a variable of the Page. Meanwhile, there is a 
AbstractAjaxTimerBehavior verifying when that variable is not null to 
create the ResourceStreamRequestTarget and do the redirection.


This works, but only when I'm doing nothing except waiting for the 
report completion. Is it due to when any other request happens the 
original page is serialized and the running thread updates the old 
one, and the timer acts on the new deserialized page?


Is there a way to do background work like I want?

Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Background processing

2008-10-31 Thread Adriano dos Santos Fernandes

Nino Saturnino Martinez Vazquez Wael escreveu:
Ahh forget full me! there is ofcouse another option :) In wicketstuff 
theres the progress something contrib. That might just be what you are 
looking for.


http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-progressbar 




Hmm wicketstuff seems to be down ;/ I wonder why you are having 
trouble with your current approach it should be okay afaik,

...

the value that you update is it in a model?

No.

You could actually do a abstractreadonlymodel which had contact to 
your thread so it could see if the generation where done..?

Hum... I don't know.

The wicketstuff-progressbar does almost the samething I was done. From 
my observation (Page was serialized and Thread updates the original 
variables) I believe the example will fail in the same manner, i.e. if 
the same user does another requests (in another window?) the progressbar 
will not update.


I make it work now using UUIDs and storing things in the session... Will 
verify Igor suggestion.


Thanks guys.


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect to a page on a new browser window

2008-10-29 Thread Adriano dos Santos Fernandes
To make this work in Firefox with window.open, it seems I need Sjax 
(synchronous) to call window.open just inside the onclick handler. Is it 
possible in Wicket, in any way?



Adriano


Adriano dos Santos Fernandes escreveu:
In a non-Wicket application, I had a page for report parameters 
editing and an execute button. Parameter validation was is Javascript, 
and I want my report opening on a new browser window. I done it with a 
form target=_blank tag.


Now with Wicket, I succeeded done the same thing but I have problem 
with the browser preventing the (bad, in its opinion) popup from opening.


My form has a feedbackpanel, so I believe I can't use the same 
technique. I have created an AjaxButton on it, and on its onSubmit I 
call target.appendJavascript(window.open(...)).


Do you see a way to do it without the browser interfere in the new 
window opening?


Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Redirect to a page on a new browser window

2008-10-24 Thread Adriano dos Santos Fernandes
In a non-Wicket application, I had a page for report parameters editing 
and an execute button. Parameter validation was is Javascript, and I 
want my report opening on a new browser window. I done it with a form 
target=_blank tag.


Now with Wicket, I succeeded done the same thing but I have problem with 
the browser preventing the (bad, in its opinion) popup from opening.


My form has a feedbackpanel, so I believe I can't use the same 
technique. I have created an AjaxButton on it, and on its onSubmit I 
call target.appendJavascript(window.open(...)).


Do you see a way to do it without the browser interfere in the new 
window opening?


Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Override panel markup

2008-10-23 Thread Adriano dos Santos Fernandes

Hi!

I would want to override a panel markup, for instance, I want to add a 
SignInPanel to my page but don't want to use builtin SignInPanel.html.


Is there a way to do it, preferable without creating a specific html 
file for the new component, i.e., I want to override the content direct 
on the page if possible?


Thanks.


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Call the server from a javascript function

2008-10-08 Thread Adriano dos Santos Fernandes

jWeekend escreveu:

Adriano,

Create the AbstractAjaxBehaiour you want, call getCallbackUrk() on it and
use the returned URL as a parameter to wicketAjaxGet in the JavaScript
you're generating.

Thanks, Cemal. I'm now able to go further.


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Prevent component markup regeneration in ajax call

2008-10-07 Thread Adriano dos Santos Fernandes

Hi!

I'd like to have extjs toolbar/menu working with Wicket ajax. What I 
want is, for example, in an ajax event show/hide menu items. I created 
the classes and the menu is rendered correctly.


My toolbar render everything from its renderHead (IHeaderContributor) 
method. All javascript code is dumped to the response to render the ext 
component to a div.


I looked at wicket-tools-extjs but still can't figure how to do what I 
need. If I re-render (ajax) the component it just hide. I tried 
different readerRead code when it's called by the second time, but the 
previously rendered component just hide too.


So my question is how I could prevent wicket from regenerate the div 
when updating a component added to an AjaxRequestTarget?



Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Prevent component markup regeneration in ajax call

2008-10-07 Thread Adriano dos Santos Fernandes

Timo Rantalaiho escreveu:

On Tue, 07 Oct 2008, Adriano dos Santos Fernandes wrote:
  
So my question is how I could prevent wicket from regenerate the div 
when updating a component added to an AjaxRequestTarget?



Not sure if this helps, but you can always add smaller
parts inside your div to AjaxRequestTarget.

Thanks for your comment.

My problems was I has been generating javascript on the renderHead and 
the tag was being overwritten later. I solved it generating the 
javascript in onAfterRender for ajax calls.



Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Call the server from a javascript function

2008-10-07 Thread Adriano dos Santos Fernandes
I need to call the server side from a javascript (generated by a 
component) function. Kind of Link/AjaxLink onClick, but instead of have 
it attached to a DOM event, I need to generate the javascript function 
that does the job.


Could you point me out how I could do it?


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket:link, markup inheritance and packages

2008-10-01 Thread Adriano dos Santos Fernandes

Should I create a Jira issue for this?

(using BookmarkablePageLink works correctly)


Adriano


Adriano dos Santos Fernandes wrote:

Hi!

I've created a BasePage.html/java in directory/package mm.sistema.web. 
Its body is:


   body

   wicket:link
   a href=HomePage.htmlHome/a
   a href=adm/ADM0190F.htmlADM0190F/a
   /wicket:link
   br /
   br /

   wicket:child /

   /body

In same directory I have the HomePage.html, with this body:

   body

   wicket:extend
   /wicket:extend

   /body

So far, so good. But my mm.sistema.web.adm.ADM0190F inherits from 
BasePage. When rendering it, an error happens:


   java.lang.NoClassDefFoundError: IllegalName: mm/sistema/web/HomePage
   java.lang.ClassLoader.preDefineClass(ClassLoader.java:476)
   java.lang.ClassLoader.defineClass(ClassLoader.java:614)
   ...

Note llegalName is HomePage. It seems Wicket tries to locate things in 
wrong place.


Is it a Wicket bug, or I'm doing something wrong?

How can I accomplish what I want?

Thanks,


Adriano



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



wicket:link, markup inheritance and packages

2008-09-30 Thread Adriano dos Santos Fernandes

Hi!

I've created a BasePage.html/java in directory/package mm.sistema.web. 
Its body is:


   body

   wicket:link
   a href=HomePage.htmlHome/a
   a href=adm/ADM0190F.htmlADM0190F/a
   /wicket:link
   br /
   br /

   wicket:child /

   /body

In same directory I have the HomePage.html, with this body:

   body

   wicket:extend
   /wicket:extend

   /body

So far, so good. But my mm.sistema.web.adm.ADM0190F inherits from 
BasePage. When rendering it, an error happens:


   java.lang.NoClassDefFoundError: IllegalName: mm/sistema/web/HomePage
   java.lang.ClassLoader.preDefineClass(ClassLoader.java:476)
   java.lang.ClassLoader.defineClass(ClassLoader.java:614)
   ...

Note llegalName is HomePage. It seems Wicket tries to locate things in wrong 
place.

Is it a Wicket bug, or I'm doing something wrong?

How can I accomplish what I want?

Thanks,


Adriano



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: The Wicket Reflex Game Post thoughts?

2008-09-26 Thread Adriano dos Santos Fernandes

Nino Saturnino Martinez Vazquez Wael wrote:

Hi Guys

One of the major problems with the game are that if you click a 
box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) 
are in process you will get an error, since the box's component has 
changed and no longer carries that behavior. I've tried to solve this 
by adding a transparent veil to the page once the heartbeat processes, 
it's simply not good enough, it's still possible to get errors. So how 
do I solve this?


I have one idea but im not liking it, all box's could have behaviors 
even if you wont get an score, that way we will not get an error.



This is a potential pitfall if you ever will have two Ajax components 
that can remove the ones behavior, if the user clicks the other while 
loading then it's gonna complain. On the other hand im not sure what 
wicket can do besides throw a runtime exception.


Can't you use synchronized (obj) { ... }, to serialize multiple threads 
of each ajax call?



Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Session lost when redeploying

2008-09-25 Thread Adriano dos Santos Fernandes

Hi!

On a non Wicket application running on OC4J, I had the problem of the 
HTTP session being lost when the application was redeployed. The usage 
of session data was minimum, for authentication purpose. I'd solved the 
problem with a custom encrypted cookie that reconstructs the server session.


This problem seems critical for Wicket application. In this case, I'll 
probably use JBoss. Is there any good thing I can do to avoid (or 
minimize, i.e., only for changed classes) such type of problem?


Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WebResource and authentication

2008-09-11 Thread Adriano dos Santos Fernandes

Am I on wrong direction?

How can I have a PDF generator integrated with Wicket authentication?

I can't image how can I ask Wicket if user is authenticated or not. I 
don't even see how can I access the Session from WebResource...



Adriano


Adriano dos Santos Fernandes escreveu:

H!

I inherited my application class from AuthenticatedWebApplication so 
my pages requires authentication. It worked.


But I've created a class inherited from WebResource to deliver Jasper 
Report in PDF and mounted it with this code:

   mountSharedResource(/Report, new ResourceReference(Report) {
   @Override
   protected Resource newResource()
   {
   return new ReportWebResource();
   }
   }.getSharedResourceKey());

The problem is that when I access /Report it bypass the authentication 
system, and I don't want this. How can I make WebResource require 
authentication?


Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Dynamic (generated) HTML

2008-09-11 Thread Adriano dos Santos Fernandes

Can wicket be used with dynamic (generated) HTML?

I mean, for example, HTML is generated to a stream based on a table 
metadata and wicket reads that stream and call the page class to add 
logic (also querying the metadata) to it normally (as if the HTML was 
static).


If yes, can anyone point out how should I start to do it?

Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WebResource and authentication

2008-09-11 Thread Adriano dos Santos Fernandes

Serkan Camurcuoglu escreveu:

Session javadoc says:

*Access via Thread Local *- In the odd case where neither a 
RequestCycle nor a Component is available, the currently active 
Session for the calling thread can be retrieved by calling the static 
method Session.get(). This last form should only be used if the first 
two forms cannot be used since thread local access can involve a 
potentially more expensive hash map lookup.

Thanks. I'll try it.


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



WebResource and authentication

2008-09-09 Thread Adriano dos Santos Fernandes

H!

I inherited my application class from AuthenticatedWebApplication so my 
pages requires authentication. It worked.


But I've created a class inherited from WebResource to deliver Jasper 
Report in PDF and mounted it with this code:

   mountSharedResource(/Report, new ResourceReference(Report) {
   @Override
   protected Resource newResource()
   {
   return new ReportWebResource();
   }
   }.getSharedResourceKey());

The problem is that when I access /Report it bypass the authentication 
system, and I don't want this. How can I make WebResource require 
authentication?


Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Authentication and authorization not working

2008-09-02 Thread Adriano dos Santos Fernandes

Hi!

I'm starting with Wicket. Yesterday I created a test and put basic 
authentication and authorization to work. After some changes, it doesn't 
work anymore.


Basically, I have this:

WebSession class extending AuthenticatedWebSession
Application class overriding getHomePage(), getSignInPageClass() and 
getWebSessionClass().


When I try to enter on the home page, it is just going directly without 
go to the login page. My WebSession.authenticate method is not called, 
and @AuthorizeInstantiation on the home page isn't respected.


What could I'm doing wrong?

Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Authentication and authorization not working

2008-09-02 Thread Adriano dos Santos Fernandes
I figured the problem myself... I didn't called super.init() when I 
override Application.init.



Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]