Re: decorating html with wicket

2012-05-29 Thread Fernando Wermus
Tom,
Something else. I experienced the advantages to have mock up pages
working in another company with Adobe Flex. These pages are added to the
analysis and the clients could have in advance a vivid experience.


Fernando Wermus.

www.linkedin.com/in/fernandowermus



On Tue, May 29, 2012 at 10:00 AM, Fernando Wermus  wrote:

> Tom,
>  Thanks you for the review.
>
> The idea is that some pages are not implemented, tough they are declared
> by some one who do not know how to program. A page implemented by us read
> the form  and instance all the components. We have wizards and they can
> show the mock up to third workers. When they are accepted, the programmers
> finish the work.
>
>
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>
>
>
>
> On Tue, May 29, 2012 at 4:01 AM, Thomas Götz  wrote:
>
>> I'm not convinced yet that this is really a good idea (how to deal with
>> constructor arguments for validators? What is the advantage of having all
>> in html effectively?) but as a starting point you could look at
>> AbstractMarkupFilter (e.g. see how WicketRemoveTagHandler and other
>> implementations work).
>>
>> To add your own MarkupFilter implementation, do the following:
>>
>>
>> public class MyMarkupFactory extends MarkupFactory {
>>
>>@Override
>>public MarkupParser newMarkupParser(MarkupResourceStream resource) {
>>final MarkupParser markupParser = super.newMarkupParser(resource);
>>markupParser.add(new MyMarkupFilter());
>>return markupParser;
>>}
>>
>> }
>>
>> and register MyMarkupFactory in your Application class:
>>
>> @Override
>> public void init() {
>>super.init();
>>getMarkupSettings().setMarkupFactory(new MyMarkupFactory());
>> }
>>
>>
>> Cheers,
>>   -Tom
>>
>>
>>
>> On 28.05.2012, 21:25h Fernando Wermus wrote:
>>
>> > Hi all,
>> > I was wondering if there is some solution already done like this:
>> >
>> > > > wicket:fieldtype="java.lang.String"*
>> > *wicket:validators="com.mycompany.MyValidator1,
>> > com.mycompany.MyValidator2"* />
>> >
>> > The idea is that HTML is allright for rendering, but It lacks  some
>> > behaviors. Therefore , instead of making up another markup, there is the
>> > chance to decorate with wicket behaviors and validators.
>> >
>> > This is flexible enough to have differents specifications and
>> > implementation to rich HTML.
>> >
>> > The idea we have at my work is to allow junior programmers to design
>> mockup
>> > pages for funcitonal analyst without adding a line of code. We were
>> mocking
>> > up pages with Adobe Flex and would like to have this behaviour with
>> wicket.
>> >
>> > thanks in advance
>> >
>> > Fernando Wermus.
>> >
>> > www.linkedin.com/in/fernandowermus
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


Re: decorating html with wicket

2012-05-29 Thread Fernando Wermus
Tom,
 Thanks you for the review.

The idea is that some pages are not implemented, tough they are declared by
some one who do not know how to program. A page implemented by us read the
form  and instance all the components. We have wizards and they can show
the mock up to third workers. When they are accepted, the programmers
finish the work.


Fernando Wermus.

www.linkedin.com/in/fernandowermus



On Tue, May 29, 2012 at 4:01 AM, Thomas Götz  wrote:

> I'm not convinced yet that this is really a good idea (how to deal with
> constructor arguments for validators? What is the advantage of having all
> in html effectively?) but as a starting point you could look at
> AbstractMarkupFilter (e.g. see how WicketRemoveTagHandler and other
> implementations work).
>
> To add your own MarkupFilter implementation, do the following:
>
>
> public class MyMarkupFactory extends MarkupFactory {
>
>@Override
>public MarkupParser newMarkupParser(MarkupResourceStream resource) {
>final MarkupParser markupParser = super.newMarkupParser(resource);
>markupParser.add(new MyMarkupFilter());
>return markupParser;
>}
>
> }
>
> and register MyMarkupFactory in your Application class:
>
> @Override
> public void init() {
>super.init();
>getMarkupSettings().setMarkupFactory(new MyMarkupFactory());
> }
>
>
> Cheers,
>   -Tom
>
>
>
> On 28.05.2012, 21:25h Fernando Wermus wrote:
>
> > Hi all,
> > I was wondering if there is some solution already done like this:
> >
> >  > wicket:fieldtype="java.lang.String"*
> > *wicket:validators="com.mycompany.MyValidator1,
> > com.mycompany.MyValidator2"* />
> >
> > The idea is that HTML is allright for rendering, but It lacks  some
> > behaviors. Therefore , instead of making up another markup, there is the
> > chance to decorate with wicket behaviors and validators.
> >
> > This is flexible enough to have differents specifications and
> > implementation to rich HTML.
> >
> > The idea we have at my work is to allow junior programmers to design
> mockup
> > pages for funcitonal analyst without adding a line of code. We were
> mocking
> > up pages with Adobe Flex and would like to have this behaviour with
> wicket.
> >
> > thanks in advance
> >
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Full month calendar

2012-05-18 Thread Fernando Wermus
you can see ehour wicket app which has an interesting calendar. It is into
the app.


Fernando Wermus.

www.linkedin.com/in/fernandowermus



On Fri, May 18, 2012 at 9:46 AM, Sandor Feher  wrote:

> Hi,
>
> The example Igor mentioned is nice but I'm still struggling with that. I
> have copy-pasted the code from HomePage but it throws me
>
> java.lang.ArrayStoreException:
> net.ftlines.wicket.fullcalendar.callback.GetEventsCallback
> at
>
> net.ftlines.wicket.fullcalendar.FullCalendar.setupCallbacks(FullCalendar.java:90)
> at
>
> net.ftlines.wicket.fullcalendar.FullCalendar.onBeforeRender(FullCalendar.java:81)
> at org.apache.wicket.Component.internalBeforeRender(Component.java:993)
> at org.apache.wicket.Component.beforeRender(Component.java:1027)
> at
>
> org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743)
> at org.apache.wicket.Component.onBeforeRender(Component.java:3838)
> at org.apache.wicket.Page.onBeforeRender(Page.java:831)
> at org.apache.wicket.Component.internalBeforeRender(Component.java:993)
> at org.apache.wicket.Component.beforeRender(Component.java:1027)
> at
> org.apache.wicket.Component.internalPrepareForRender(Component.java:2211)
> at org.apache.wicket.Page.internalPrepareForRender(Page.java:280)
> at org.apache.wicket.Component.render(Component.java:2293)
> at org.apache.wicket.Page.renderPage(Page.java:1043)
>
> I also included the required .js in my markup.
>
>
> http://pastebin.com/KGZq9dkM http://pastebin.com/KGZq9dkM
>
> Regards., Sandor
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Full-month-calendar-tp4642735p4644452.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: custom listeners

2012-05-16 Thread Fernando Wermus
May you explain further your user case? Thus, we can understand the needs.


Fernando Wermus.

www.linkedin.com/in/fernandowermus



On Wed, May 16, 2012 at 7:00 AM, elvis.ciocoiu
wrote:

> I'm working on something that uses custom information attached to the
> components and needs some sort of a listeners mechanism. The path taken was
> to register the needed listeners in onCreate() of some component but I
> don't
> have a solution to unregister ... The onRemove doesn't help because it's
> called when replacing the component with another in an ajax call. Is there
> a
> way to be notified that a component is reatached to component hierarchy?
> I'm
> using wicket 1.4. Is there another solution? Imagine that using a ListView
> that creates elements and every element registers some listeners ... I need
> to clear those listeners when the element is destroyed.
> Thak you
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/custom-listeners-tp4641122.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: tomcat deployment issues

2012-04-22 Thread Fernando Wermus
try deleting work folder in Tomcat6.


Fernando Wermus.

www.linkedin.com/in/fernandowermus



On Thu, Apr 12, 2012 at 4:29 AM, Martin Grigorov wrote:

> Hi,
>
> Can you put a breakpoint in WicketServlet#init() ?
> The only reason for that I see is this servlet to be initialized twice ...
> Even better set the breakpoint in Application#setName() and see who is
> calling it and how many times
>
> On Thu, Apr 12, 2012 at 4:41 AM, Alex Rass  wrote:
> > If someone could help me out with this issue, that would be awesome.
> >
> > Currently:
> > Deploying on Tomcat 6.
> >
> > Default deploy folder is webapps
> > webapps/ROOT is where my 1st wicket app is (lets call it App1)
> > webapps.web2 is another Host record for a different URL.
> > webapps.web2/app2 is my wicket app #2
> >
> > No matter what I tried, app#2 doesn't get started (but servlets from
> same context work fine).
> > When I go to the url, it says:
> >
> > java.lang.IllegalStateException: Application with name 'App2' already
> exists.'
> >org.apache.wicket.Application.setName(Application.java:854)
> >
>  org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:337)
> >
>  org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:271)
> >javax.servlet.GenericServlet.init(GenericServlet.java:212)
> >...
> >
> > I tried renaming it to App3 (in web.xml and I get same message except it
> says App3).
> > I checked all the web.xml files on the server, no other one has App2 in
> it.
> >
> > I have lib folders under each app. I don't share anything beside DB
> drivers in Tomcat's lib folder.
> > I have Wicket 1.5.4 for App1 and 1.5.5 for App2 (donno if that makes a
> diff).
> >
> > Any ideas?
> >
> > Regards,
> > - Alex.
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


independent work between web designer and web programmers

2011-03-04 Thread Fernando Wermus
Hi all,
 I would like web designers could deploy its html, css and images
independentely from developer deploys.
 I thought to have 2 projects. One for developers and their classes and
another one for web designers. Web designers' project will be deployed using
a maven profile as a shared library of developers deploy. Thus they can work
independentely. Each time there is some change in design, web designers
could do a deploy by themself.

I would like to have some shared opinions on how it is the best way to do
this.

For instance, I like this idea but I would like to have an only project
anyway. What I know about maven, it is that there is a pom.xml for project
and I wouldn't be able to have this organization.

thanks in advance.

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Should Logger classes be transient?

2011-01-17 Thread Fernando Wermus
Just to know Why a static variable is not serializable?

On Sat, Jan 15, 2011 at 7:44 PM, Emmanouil Batsis  wrote:

>
>
> Quoting Alexandros Karypidis :
>
>> I'm using SLF4J and was wondering whether pages should declare:
>>
>>private transient final Logger log = LoggerFactory
>>.getLogger(SomePage.class);
>>
>> as members. I guess that accessing a page that was saved and then
>> re-loaded
>> would result in breaking logging, as the variable would be set to null.
>> I've no
>> idea how heavy-weight these Logger implementations are though and am
>> worried
>> that they should not be declared in class scope.
>>
>
> Using static loggers has the benefit of non-serialization between other
> things, including consistency between instances. Making them final and
> private may be appropriate as well. Here's a snippet from our calipso wicket
> app:
>
> /**
>  * Please make proper use of logging, see
>  * http://www.owasp.org/index.php/Category
>  * :Logging_and_Auditing_Vulnerability
>  */
> private static final Logger logger = // call logger factory
>
>
> Cheers,
>
> Manos
>
>
> -----
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Problem on wicket-auth-role ve Spring-security integration

2010-12-02 Thread Fernando Wermus
try wicket-shiro!

On Thu, Dec 2, 2010 at 7:33 AM, alex shubert  wrote:

> Let me guess may be the reason is that document is pretty outdated
> and provides no help if one looking for a how-to manual?
> It just looks pretty useless for whos already familiar with JAAS and
> SpringSecurity 'cos they will not found anything new and almost
> unhelpful for whom doesn't .
>  :)
>
> For unknown reason the page looks locked so one can't propose new version.
>
> 2010/12/2 Altuğ Bilgin Altıntaş :
> > why you don't just use Spring Security + Wicket ?
> >
> >
> >
> > 2010/12/2 Taner Diler 
> >
> >> Hi,
> >>
> >> I'm trying to integrate Wicket-auth-roles 1.4.9 and Spring Security
> 3.0.4
> >> by
> >> following
> >>
> https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html
> >> .
> >>
> >> @AuthorizeAction and @AuthorizeInstantiation annotations are not
> working.
> >>
> >> The blog says "
> >>
> >> The only filter we need defined from Acegi is the
> >> HttpSessionContextIntegrationFilter. This filter will ensure that the
> >> SecurityContext is transported to and from the HttpSession onto the
> Thread
> >> context. All authorization is delegated to the wicket-auth-roles module
> >> which uses Annotations (@AuthorizeInstantiation)."
> >>
> >> So how can I make configuration to provide this?
> >>
> >
>
>
>
> --
> Best regards
> Alex
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: automatically sizing modal window

2010-10-01 Thread Fernando Wermus
I need that my modal window works with a page :(.

On Tue, Sep 28, 2010 at 9:00 AM, Anna Simbirtsev wrote:

> I think if the modal window is a panel, not a Page, then it auto sizes
> its height.
>
> On Mon, Sep 27, 2010 at 5:41 PM, Martin Grigorov 
> wrote:
> > patches are welcome
> > especially if they work cross-browser ;-)
> >
> > On Mon, Sep 27, 2010 at 11:23 PM,  wrote:
> >
> >> Sounds like a nice feature, however be careful, if the content is too
> >> large the close button may be off-screen and make it impossible to
> close.
> >> So maybe it should auto adjust within the bounds of the screen...
> >>
> >>
> >>
> >>
> >> From:   andrea del bene 
> >> To: users@wicket.apache.org
> >> Date:   09/27/2010 05:04 PM
> >> Subject:Re: automatically sizing modal window
> >>
> >>
> >>
> >> Hi Martin,
> >>
> >> what I'd like to have is a window that automatically adjusts its height
> >> and width in order to ensure that all its content it's always visible
> >> without scrollbars.   I think it could be done with some JavaScript
> code.
> >> Do you think it's possible to implement such behavior?
> >>
> >> Thank you in advance!
> >> > Can you give more information about this feature, please.
> >> > Either here or in the ticket.
> >> > What are the current obstacles? How do you want it to be? Etc.
> >> >
> >> > On Sun, Sep 26, 2010 at 3:49 PM, andrea del
> >> benewrote:
> >> >
> >> >
> >> >> On 09/25/2010 02:30 PM, Fernando Wermus wrote:
> >> >>
> >> >>
> >> >>> I would like so much this feature. It is so important to me!
> >> >>>
> >> >>> On Sat, Sep 25, 2010 at 5:51 AM, Josh Kamau
> >> >>>   wrote:
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>> Hi guys,
> >> >>>>
> >> >>>> Is there are way to ensure that a modal window automatically sizes
> to
> >> fit
> >> >>>> the available content? the default size seems sometimes too big and
> >> >>>> sometimes too small for the contents.
> >> >>>>
> >> >>>> Regards.
> >> >>>> Josh
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>>
> >> >
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >>
> >>
> >>
> >>
> >> Notice: This communication, including any attachments, is intended
> solely
> >> for the use of the individual or entity to which it is addressed. This
> >> communication may contain information that is protected from disclosure
> >> under State and/or Federal law. Please notify the sender immediately if
> >> you have received this communication in error and delete this email from
> >> your system. If you are not the intended recipient, you are requested
> not
> >> to disclose, copy, distribute or take any action in reliance on the
> >> contents of this information.
> >
>
>
>
> --
> Anna Simbirtsev
> (416) 729-7331
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: automatically sizing modal window

2010-09-25 Thread Fernando Wermus
I would like so much this feature. It is so important to me!

On Sat, Sep 25, 2010 at 5:51 AM, Josh Kamau  wrote:

> Hi guys,
>
> Is there are way to ensure that a modal window automatically sizes to fit
> the available content? the default size seems sometimes too big and
> sometimes too small for the contents.
>
> Regards.
> Josh
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-03 Thread Fernando Wermus
Igor,
I did what you pointed me out. However, I got a MarkupNoFoundExpcetion.

My code

 try{
 application=(WebApplication) MiSession.get().getApplication();
 }catch(Exception e){
 application=new BaseWicketTester.DummyWebApplication(){
protected void init(){

getApplicationSettings().setDefaultMaximumUploadSize(Bytes.bytes(500));
 getResourceSettings().addResourceFolder("/WEB-INF/html");
}
};
 application.mountBookmarkablePage("mensaje",
PaginaMensajeEvento.class);
 }
It says that PaginaMensajeEvento doesn't have a markup which is not true.
Actually, when I don't use this code into a separate servlet, It runs
smoothly.

thanks in advance



On Thu, Sep 2, 2010 at 6:49 PM, Igor Vaynberg wrote:

> you can create a new instance
>
> -igor
>
> On Thu, Sep 2, 2010 at 1:49 PM, Fernando Wermus
>  wrote:
> > Igor,
> >When I don't pass the application I got the following error
> >
> > RuntimeException: There is no application attached to current thread
> > btpool0-3 - /messagebroker/amf
> >
> > This is because I need to render the emails from a different servlet. Do
> I
> > have any solution for this situation?
> >
> > How can I get the WebApplication from a different servlet?
> >
> > On Thu, Sep 2, 2010 at 1:26 PM, Igor Vaynberg  >wrote:
> >
> >> you should pass a new instance of application. wicket tester inits the
> >> application and so it would call the init method which will execute
> >> the mounts - and on already initialized instance it would cause that
> >> error.
> >>
> >> -igor
> >>
> >> On Thu, Sep 2, 2010 at 9:13 AM, Fernando Wermus
> >>  wrote:
> >> > Hi all,
> >> >I am using wicketTester to render html for emails. I pass my
> current
> >> app
> >> > to WicketTester and I get the following error:
> >> >
> >> > WicketRuntimeException: loginPage is already mounted for
> >> > BookmarkablePageEncoder[page=class com.xxx.LoginPage]
> >> >
> >> > Which makes no sense. The Application is running and I just passing it
> to
> >> > the WicketTester constructor.
> >> >
> >> > any help would be really appreciated.
> >> >
> >> > thanks in advance
> >> >
> >> > --
> >> > Fernando Wermus.
> >> >
> >> > www.linkedin.com/in/fernandowermus
> >> >
> >>
> >> -----
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


rendering a page for an email: org.hibernate.HibernateException: createCriteria is not valid without active transaction

2010-09-03 Thread Fernando Wermus
Hi all,
 I have coded the following to render a mail,


Application app;
try{
app=MyApplication.get();
}catch(Exception e){
app=new WicketTester().getApplication();
}
final Application app2=app;
final ExecutorService service = new ScheduledThreadPoolExecutor(1) {
@Override
protected void beforeExecute(final Thread t, final Runnable r) {
Application.set(app2);
};
@Override
protected void afterExecute(final Runnable r, final Throwable t) {
Application.unset();
}
};
service.submit(new ThreadMail(destinatarios, clazz, p));

But, I got a org.hibernate.HibernateException: createCriteria is not valid
without active transaction
when I tried to load an entity in a model to be used in the PageMail.

How can I attach the Transaction to the thread to get this working?

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-02 Thread Fernando Wermus
Igor,
When I don't pass the application I got the following error

RuntimeException: There is no application attached to current thread
btpool0-3 - /messagebroker/amf

This is because I need to render the emails from a different servlet. Do I
have any solution for this situation?

How can I get the WebApplication from a different servlet?

On Thu, Sep 2, 2010 at 1:26 PM, Igor Vaynberg wrote:

> you should pass a new instance of application. wicket tester inits the
> application and so it would call the init method which will execute
> the mounts - and on already initialized instance it would cause that
> error.
>
> -igor
>
> On Thu, Sep 2, 2010 at 9:13 AM, Fernando Wermus
>  wrote:
> > Hi all,
> >I am using wicketTester to render html for emails. I pass my current
> app
> > to WicketTester and I get the following error:
> >
> > WicketRuntimeException: loginPage is already mounted for
> > BookmarkablePageEncoder[page=class com.xxx.LoginPage]
> >
> > Which makes no sense. The Application is running and I just passing it to
> > the WicketTester constructor.
> >
> > any help would be really appreciated.
> >
> > thanks in advance
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
> ---------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Localizer in a new Thread

2010-09-02 Thread Fernando Wermus
Ale,
I got a

org.hibernate.HibernateException: createCriteria is not valid without active
transaction

because the page that I am trying to render need to get an entity using
hibernate.

how could I solve this situation?

thanks in advance

On Fri, Jul 30, 2010 at 5:38 PM, Alex Objelean wrote:

>
> Yes, the solution I've mentioned in previous post should solve your
> problem.
>
> Alex
>
> On 30 July 2010 22:44, Fernando Wermus-3 [via Apache Wicket] <
> ml-node+2308410-419528218-229...@n4.nabble.com
> 
> >
> > wrote:
>
> > Ale,
> >Related to what you have mentioned. I render mails with some
> > mockHTTPrequest and mockeHTTPResponse, etc. But, I need to render mails
> in
> > a
> > different thread than wicket's one. I have another servlet that runs
> > Blazeds
> > (Flex) where I also need to render some mails, but  I got  "There is no
> > application
> > attached to current thread...". According to what you mentioned, could I
> > solve this issue?
> >
> > thanks in advance.
> >
> > On Fri, Jul 30, 2010 at 5:46 AM, Alex Objelean <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=2308410&i=0>>wrote:
> >
> >
> > >
> > > There was a long discussion about this. One of the proposal was to use
> > > InheritableThreadLocal which would solve this problem, but there was a
> > lot
> > > of concerns about this approach.
> > >
> > > The solution I have found was this:
> > > If you create the thread with ExecutorService, you could do the
> > following:
> > >
> > >final ExecutorService service = new ScheduledThreadPoolExecutor(1) {
> > >  @Override
> > >  protected void beforeExecute(final Thread t, final Runnable r) {
> > >Application.set(app);
> > >  };
> > >  @Override
> > >  protected void afterExecute(final Runnable r, final Throwable t) {
> > >Application.unset();
> > >  }
> > >};
> > >
> > > and execute you thread like this:
> > > service.submit(new Runnable() {
> > >@Override
> > >public void run() {
> > >  //do stuff
> > >}
> > >  });
> > >
> > > This will ensure that Application is accessible from within newly
> created
> >
> > > thread.
> > >
> > > Alex
> > > --
> > > View this message in context:
> > >
> >
> http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2307732.html
> <
> http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2307732.html?by-user=t
> >
> > > Sent from the Wicket - User mailing list archive at Nabble.com.
> > >
> > > -
> > > To unsubscribe, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=2308410&i=1>
> > > For additional commands, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=2308410&i=2>
> > >
> > >
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
> >
> > --
> >  View message @
> >
> http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2308410.html
> > To unsubscribe from RE: Localizer in a new Thread, click here<
> http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=YWxleC5vYmplbGVhbkBnbWFpbC5jb218MjMwNzczMnwtNDA5MTE1Njc3
> >.
> >
> >
> >
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2308459.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-02 Thread Fernando Wermus
Hi all,
I am using wicketTester to render html for emails. I pass my current app
to WicketTester and I get the following error:

WicketRuntimeException: loginPage is already mounted for
BookmarkablePageEncoder[page=class com.xxx.LoginPage]

Which makes no sense. The Application is running and I just passing it to
the WicketTester constructor.

any help would be really appreciated.

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


how to render a page for an email with wickettester

2010-08-31 Thread Fernando Wermus
Hi all,
I need to render a page using wickettester. I tried the following,

WicketTester tester=new WicketTester();
tester.startPage(PageA.class, new PageParameters());
tester.assertRenderedPage(PageA.class);
HttpServletResponse
servletResponse=tester.getWicketResponse().getHttpServletResponse();
BufferedWebResponse webResponse = new
BufferedWebResponse(servletResponse);
webResponse.setAjax(true);

System.out.println("render page: " + webResponse.toString());

the result was an empty string.

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Fwd: htmlUnit + Wicket to get a page

2010-08-31 Thread Fernando Wermus
Hi all,
I have to send some emails when a user clicks a link. The problem I am
encountering is that I got a lock.

Caused by: java.sql.BatchUpdateException: Lock wait timeout exceeded; try
restarting transaction

If I request the email page in a common browser, let say chrome; it works
fine.

I am using htmlUnit as client to get the page.

any idea?

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


htmlUnit + Wicket to get a page

2010-08-31 Thread Fernando Wermus
Hi all,
I have to send some emails when a user clicks a link. The problem I am
encountering is that I got a lock.

Caused by: java.sql.BatchUpdateException: Lock wait timeout exceeded; try
restarting transaction

If I request the email page in a common browser, let say chrome; it works
fine.

any idea?

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: jsr 286 inter-portlet communication

2010-08-10 Thread Fernando Wermus
I think I read something in brix framework about this. I think is already
offered.

On Tue, Aug 10, 2010 at 11:28 AM, dgh1  wrote:

>
>
> I read in the PortletsInAction manning book that  for wicket  that
> inter-portlet communications is not in 1.4.x but will be in 1.5.  Can
> somebody please verify that the jsr 286 nter-portlet communications will be
> in 1.5 and if not when might it be.
>
> Thanks
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/jsr-286-inter-portlet-communication-tp2319874p2319874.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


autocomplete works in development but It doesn't in production

2010-08-08 Thread Fernando Wermus
Hi all,
 Any advice or clue about how to solve this issue?

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


HTMLModel and path to access html file

2010-08-03 Thread Fernando Wermus
Hi all,
I have  a model that look up an html file for being shown.
But I have an issue regarding how to get the file without matters if the
site is in deployment or development mode.

I thought the following,

URL input=classComponent.getResource("help.html");

My html files are in "/WEB-INF/html/com." and my classes are in
"/classes/com"

How can I find the resource accurately taking into account the a component?

thanks in advance



public class HtmlModel extends AbstractReadOnlyModel {
private static final long serialVersionUID = 9079057140521991184L;
 @SuppressWarnings("unused")
protected static Logger log = Logger.getLogger(HtmlModel.class);

@SuppressWarnings("unchecked")
private Class classComponent;

private String name;


@SuppressWarnings("unchecked")
public HtmlModel(String name, Class component){
this.name=name;
this.classComponent=component;
}
 @Override public Object getObject() {
BufferedReader reader=null;
StringBuffer html = new StringBuffer();
try {
String aux=null;
URL input=classComponent.getResource(name);
reader = new BufferedReader(new InputStreamReader(input.openStream()));
 while((aux=reader.readLine()) != null){
html.append(aux);
}
} catch (IOException e) {
log.error(e);
} finally {
try {
reader.close();
} catch (Exception e) {
log.error(e);
}
}
return html.toString();
}
}

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Localizer in a new Thread

2010-07-30 Thread Fernando Wermus
Ale,
   Related to what you have mentioned. I render mails with some
mockHTTPrequest and mockeHTTPResponse, etc. But, I need to render mails in a
different thread than wicket's one. I have another servlet that runs Blazeds
(Flex) where I also need to render some mails, but  I got  "There is no
application
attached to current thread...". According to what you mentioned, could I
solve this issue?

thanks in advance.

On Fri, Jul 30, 2010 at 5:46 AM, Alex Objelean wrote:

>
> There was a long discussion about this. One of the proposal was to use
> InheritableThreadLocal which would solve this problem, but there was a lot
> of concerns about this approach.
>
> The solution I have found was this:
> If you create the thread with ExecutorService, you could do the following:
>
>final ExecutorService service = new ScheduledThreadPoolExecutor(1) {
>  @Override
>  protected void beforeExecute(final Thread t, final Runnable r) {
>Application.set(app);
>  };
>  @Override
>  protected void afterExecute(final Runnable r, final Throwable t) {
>Application.unset();
>  }
>};
>
> and execute you thread like this:
> service.submit(new Runnable() {
>@Override
>public void run() {
>  //do stuff
>}
>  });
>
> This will ensure that Application is accessible from within newly created
> thread.
>
> Alex
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2307732.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: don't find the html resource for a component

2010-07-26 Thread Fernando Wermus
I wanna add that first case is working, however second not.

On Mon, Jul 26, 2010 at 11:49 AM, Fernando Wermus  wrote:

> Hi all,
>  I am rendering emails with wicket in two different ways:
>
> 1. Into an onclick's link.
> 2. Calling a back end that is implemented with Blazeds (Flex). In this
> case, when the page is rendering, it doesn't find the html
> resource associated to the component within cache. I got
>
> (cache)
> ...frontend.entidades.mensajes.paginas.evento.PaginaMensajeEventoen_UShtml=(unknown
> resource)
>
> I can't explain the differences in behavior between the two cases.
> Does somebody has experienced this situation?
> I am lack of ideas.
>
>
> The page which isnt associated to its corresponding html is a bookmarkable
> page.
>
>
> thanks in advance.
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


don't find the html resource for a component

2010-07-26 Thread Fernando Wermus
Hi all,
 I am rendering emails with wicket in two different ways:

1. Into an onclick's link.
2. Calling a back end that is implemented with Blazeds (Flex). In this case,
when the page is rendering, it doesn't find the html resource associated to
the component within cache. I got

(cache)
...frontend.entidades.mensajes.paginas.evento.PaginaMensajeEventoen_UShtml=(unknown
resource)

I can't explain the differences in behavior between the two cases.
Does somebody has experienced this situation?
I am lack of ideas.


The page which isnt associated to its corresponding html is a bookmarkable
page.


thanks in advance.


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: learn from my security mistake with getString

2010-07-23 Thread Fernando Wermus
All we know that. On the other hand it is very practice to solve it in that
way. What tools or framework do you use instead?

On Fri, Jul 23, 2010 at 5:25 PM, Igor Vaynberg wrote:

> wicket property files are meant for externalizing ui strings, not
> configuration values :)
>
> -igor
>
> On Fri, Jul 23, 2010 at 12:12 PM, Jim Pinkham  wrote:
> > I was just looking around for my dunce cap after noticing this little
> gotcha
> > - and I thought of this forum instead to share my moment of
> > not-so-brilliance:
> >
> >public LoginForm(final String id) {
> >... other stuff ...
> >add(new FormComponentFeedbackBorder("user.feedback").add(new
> > TextField("user").setRequired(true)));
> >passwordField = new PasswordTextField("password");
> >passwordField.setRequired(true);
> >add(new
> > FormComponentFeedbackBorder("password.feedback").add(passwordField));
> >}
> >protected void onSubmit() {
> >String password=getString("password").trim();
> >if (password.equalsIgnoreCase(getPassword())) {
> >((AuctionSession)getSession()).setAdmin(true);
> >((AuctionSession)getSession()).setUserName(getUser());
> >if (!continueToOriginalDestination())
> >setResponsePage(getApplication().getHomePage());
> >} else
> >passwordField.error("invalid user/password");
> >}
> >}
> >
> > Pretty basic, I know.  Maybe you have a page like this in your Wicket
> app?
> >
> >
> > The mistake I wanted to share is that I'm using the same name for the
> > "password" wicket:id, and the string property in MyLoginPage.properties,
> > which just has a line that says password=super_secret_whatever.
>  (Actually,
> > it's ${profile.password} and I have different maven profiles for
> different
> > versions of the app, but that's another story).
> >
> > Anyway, imagine my suprise when I accidentally left the password blank by
> > mistake - the required error message uses the same property and shows the
> > password to the wide world in the feedback message:
> 'super_secret_whatever'
> > is required.  Hah!(Yup, it's been in production for quite a while
> like
> > this...)
> >
> > Just wanted to share that one with y'all - may all your mistakes be
> > entertaining and/or educational...
> > :)
> >
> > -- Jim.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: AjaxPagingNavigation change style

2010-07-21 Thread Fernando Wermus
Ivonetta,
If you wanna change the styles, you can also add an id attribute to
AjaxPaginavigator and use style css in the way:

#myPageN

{
   your style
}

in this way you would not have to overwrite the markup. It is easier.


On Wed, Jul 21, 2010 at 5:50 PM, Ivoneta  wrote:

>
> ohh I see the problem. I used a markup for AjaxPagingNavigator, but it
> doesn't have one. The markup is for PagingNavigator.
> I need to use AjaxPagingNavigator, so I implemented my own class
> MyAjaxPagingNavigator - copying exactly the same AjaxPagingNavigator code -
> and then I create a subclass from PagingNavigator, and create the markup.
> MyAjaxPagingNavigator extends from my own PagingNavigator subclass. But I
> have a problem my own class doesn't work...If I clicked to next page, the
> entire page is refresh,   I don't understand why?
>
> Is there another solution to change the AjaxPagingNavigation Style?
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-change-style-tp2297188p2297746.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: HowTo inject FeedbackPanel

2010-07-20 Thread Fernando Wermus
Martin,
  I would like to learn a little. Which is the use case? Why do you need
to inject feedback panels? I don't get a case for this situation.

thanks in advance.

On Tue, Jul 20, 2010 at 9:44 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Hi!
>
> I don't like passing feedbackpanel to subpanels and I don't like the
> idea using visitors/component-search for looking it up in page
> hierarchy because of its potential volatility...
>
> Has some of you pals come up with a nice way of injecting
> feedbackpanel references to children or something? Or even better some
> direct refrence? Should I only allow one (particular) feedbackpanel
> per session and re-use it from session?
>
> **
> Martin
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior

2010-07-20 Thread Fernando Wermus
Daniel,
It is better to return just a null. A null is translate it as "...the
page you already are...".

On Fri, Jul 2, 2010 at 8:39 AM, bjolletz  wrote:

>
> Hi,
>
> My conclusion is that this is not really a wicket error, since we're
> clicking a link which no longer exists after the Ajax update.
>
> My solution to this has been to catch these exceptions in my
> WebRequestCycleProcessor, like this:
>
>@Override
>public IRequestTarget resolve(RequestCycle requestCycle,
> RequestParameters requestParameters) {
>try {
>return super.resolve(requestCycle, requestParameters);
>} catch (InvalidUrlException e) {
>if
> (requestCycle.getRequest().getURL().contains("ILinkListener")) {
>return new
> PageRequestTarget(requestCycle.getRequest().getPage());
>}
>throw e;
>}
>}
>
> What happens is that if I get this exception and the request URL contains
> "ILinkListener", I just return the page which the user is already at. For
> the user it will seem like nothing happens, which at least is better than
> that they get an exception.
>
> This is not a pretty solution, but the best I could think of. If someone
> knows of a better or more general soultion to this problem I would be happy
> to know.
>
> /Daniel
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276328.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior

2010-07-19 Thread Fernando Wermus
Daniel,
 Help!
 I am running into the same exception. But I had a harsher situation. In
my case I have a component called box who can have many images in it. A
modal window permits adding images to boxes - your case: modal window and
refreshing back page -  which you can click and send you to another page. I
have plenty of these boxes into my app. The exception only occurs for the
new images added. As I had plenty of boxes, I cannot take your patch for my
case. It would be burdensome.

Have you found any solution to this kind of not proven bug, but repeated in
many cases?

thanks in advance


On Fri, Jul 2, 2010 at 8:39 AM, bjolletz  wrote:

>
> Hi,
>
> My conclusion is that this is not really a wicket error, since we're
> clicking a link which no longer exists after the Ajax update.
>
> My solution to this has been to catch these exceptions in my
> WebRequestCycleProcessor, like this:
>
>@Override
>public IRequestTarget resolve(RequestCycle requestCycle,
> RequestParameters requestParameters) {
>try {
>return super.resolve(requestCycle, requestParameters);
>} catch (InvalidUrlException e) {
>if
> (requestCycle.getRequest().getURL().contains("ILinkListener")) {
>return new
> PageRequestTarget(requestCycle.getRequest().getPage());
>}
>throw e;
>}
>}
>
> What happens is that if I get this exception and the request URL contains
> "ILinkListener", I just return the page which the user is already at. For
> the user it will seem like nothing happens, which at least is better than
> that they get an exception.
>
> This is not a pretty solution, but the best I could think of. If someone
> knows of a better or more general soultion to this problem I would be happy
> to know.
>
> /Daniel
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276328.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: new feature in trunk and branch: Component#onInitialize()

2010-07-12 Thread Fernando Wermus
thanks you all

On Tue, Jul 13, 2010 at 12:19 AM, vineetsemwal
wrote:

>
> very good feature,thanks!!
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/new-feature-in-trunk-and-branch-Component-onInitialize-tp2286924p2286961.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: how to distinguish browser's tab?

2010-07-07 Thread Fernando Wermus
Nino,
  I write down

On Wed, Jul 7, 2010 at 8:36 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> hmm i see a couple of ways of solving this.
>
>
>   - Mount a special facebook entry page, that setups your style etc.Use
>   that as entry point for the facebook app
>

 This is the original problem. I do have an entry point, but if the user
opens a browser tab now, and access to the site directly, my session was set
up as a facebook app and thus the styling is the facebook one.

  - The session cookie approach, in my setups I have Apache HTTP infront,
>   so again I would have two apps where a cookie are set from Apache like
>   facebook.myapp.com and app.myapp.com
>
>
> 2010/7/7 Fernando Wermus 
>
> > Hi all,
> > I have a site which works in facebook, as an facebook ap, as well as
> > "stand alone". the styling is the only thing that changes between these
> two
> > versions.
> >
> > Some days ago, I found a bug that I don't know how to solve.
> >
> > If a user logins in facebook an uses my facebook app and later he adds a
> > browser's tab and uses the stand alone version, the styling which remains
> > is
> > the one for facebook. This is because I stored in the session the info
> > about
> > how he had logged in and thus which styling should be applyed. I don't
> find
> > a way to distinguish later between the two browser's tab - or any other
> > kinds of solution. I was thinking of adding a cookie which could help me
> to
> > distinguish between tabs, but I am not used to working with cookies.
> >
> > I have a plenty lack of ideas, any help would be really appreciate it.
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


how to distinguish browser's tab?

2010-07-06 Thread Fernando Wermus
Hi all,
 I have a site which works in facebook, as an facebook ap, as well as
"stand alone". the styling is the only thing that changes between these two
versions.

Some days ago, I found a bug that I don't know how to solve.

If a user logins in facebook an uses my facebook app and later he adds a
browser's tab and uses the stand alone version, the styling which remains is
the one for facebook. This is because I stored in the session the info about
how he had logged in and thus which styling should be applyed. I don't find
a way to distinguish later between the two browser's tab - or any other
kinds of solution. I was thinking of adding a cookie which could help me to
distinguish between tabs, but I am not used to working with cookies.

I have a plenty lack of ideas, any help would be really appreciate it.

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


modal window and its css

2010-07-01 Thread Fernando Wermus
Hi all,
I am using modal window in conjunction with a page. This page has a css
contributor. But there is something wrong with the page into the modal
window. The text inputs don't show correctly. It seems that the modal window
css is working over the page. I thought that the page was into an iframe.
Thus the page itself wouldn't be modified by the modal window css.This
doesn't seems to be the behavior.


thanks in advance.

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: passing a map into PageParameters

2010-06-29 Thread Fernando Wermus
Ray,
I haven't had any succeded either. I am working with fb rest (facebook)
which has some classes that work with json to store several kind of objects.
In my case, I need my page to be bookmarkable.

thanks anyway

On Tue, Jun 29, 2010 at 1:47 AM, Ray Weidner <
ray.weidner.develo...@gmail.com> wrote:

> I haven't had any success storing anything other than Strings in
> PageParameters objects.  It makes sense, since these are supposed to
> represent bookmarkable (i.e. GET) parameters.  If you're hoping to throw
> arbitrary Maps into a PageParameters, you're going to be disappointed.  But
> if you have an idea what kind of data is going to be in the Map (especially
> if you're using generics, unlike your example), then you can write a pair
> of
> methods to translate between Map and String for this purpose.
>
> I'm not sure what limitations on characters that you might run into due to
> the fact that they have to be embedded in a URL, so you have to try it out.
>  However, I wouldn't be surprised if Wicket escapes everything cleanly,
> meaning that you don't have to worry about such things.
>
> Of course, you don't have to embed your Map within a PageParameters if the
> page that you want to go to doesn't need to be bookmarkable.  In that case,
> just pass your Map to the destination page object through a constructor of
> your design, and call #setResponsePage on the page object.
>
>
> On Mon, Jun 28, 2010 at 3:23 PM, Fernando Wermus
> wrote:
>
> > This is not what I want to achieve.
> >
> > I need to pass a map of  parameters as just an entry into PageParameters
> > and
> > other entries too.
> >
> > For instance,
> >
> >
> > Map swfParameters=new HashMap();
> > swfParameteres.put("a", "1");
> > swfParameteres.put("b", "2");
> >
> > PageParameters p=new PageParameters();
> > p.put("swfParameters", swfParameters);
> > p.put("other", "other");
> >
> > On Mon, Jun 28, 2010 at 4:15 PM, jammyjohn 
> wrote:
> >
> > >
> > > PageParameters parameters = new PageParameters(swfParameters);
> > >
> > > This is how the hashmap is constructed in PageParameters..
> > >
> > > Thanks,
> > > J
> > > --
> > > View this message in context:
> > >
> >
> http://apache-wicket.1842946.n4.nabble.com/passing-a-map-into-PageParameters-tp2271341p2271351.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
> > >
> > >
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: passing a map into PageParameters

2010-06-28 Thread Fernando Wermus
This is not what I want to achieve.

I need to pass a map of  parameters as just an entry into PageParameters and
other entries too.

For instance,


Map swfParameters=new HashMap();
swfParameteres.put("a", "1");
swfParameteres.put("b", "2");

PageParameters p=new PageParameters();
p.put("swfParameters", swfParameters);
p.put("other", "other");

On Mon, Jun 28, 2010 at 4:15 PM, jammyjohn  wrote:

>
> PageParameters parameters = new PageParameters(swfParameters);
>
> This is how the hashmap is constructed in PageParameters..
>
> Thanks,
> J
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/passing-a-map-into-PageParameters-tp2271341p2271351.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


passing a map into PageParameters

2010-06-28 Thread Fernando Wermus
Hi all,
I need to pass a map into PageParameters. But I failed.

Map swfParameters=new HashMap();
...
swfParameters.put("token", "abc");
p.put(PanelIframe.SWF_PARAMETERS, swfParameters);

...
RequestCycle.get().urlFor(clazz, p);

The map is converted to "{token=abc}" like.

But when the Page for this request is called, there is an empty map into
PageParameters,

Is there a way to pass a map into PageParameters?

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: urlFor not performing an accurate url

2010-06-25 Thread Fernando Wermus
thanks

On Fri, Jun 25, 2010 at 5:09 PM, Jeremy Thomerson  wrote:

> your page is probably mounted with the default mounting strategy, which
> uses
> the "seo-friendly" folder style parameters.  instead, you should mount that
> page with the QueryStringUrlCodingStrategy
>
> On Fri, Jun 25, 2010 at 3:07 PM, Fernando Wermus
> wrote:
>
> > Hi all,
> >I need a url similar to the following example
> >
> > www.example/test?url=map/myMap.swf
> >
> > But urlFor constructs the followng
> >
> > www.example/text/url/map/myMap.swf/
> >
> > The last slash makes that the swf will not be correctly added.
> >
> > Why RequestCycle.get().urlFor is not doing what I do expect?
> >
> > Instead, I had to construct it by hand.
> >
> > thanks in advance
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


urlFor not performing an accurate url

2010-06-25 Thread Fernando Wermus
Hi all,
I need a url similar to the following example

www.example/test?url=map/myMap.swf

But urlFor constructs the followng

www.example/text/url/map/myMap.swf/

The last slash makes that the swf will not be correctly added.

Why RequestCycle.get().urlFor is not doing what I do expect?

Instead, I had to construct it by hand.

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


one session for standAloneApp or one session for FacebookApp

2010-06-24 Thread Fernando Wermus
Hi all,
Users can login into my site in stand alone mode or with facebook
connect. Thus, I would like to have two polimorphic session according to how
the user decides to login.
Could I switch the session in wicket when this happen?

I was looking at Session.replaceSession()


thanks in advance


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Announcing: visural-wicket 0.6 released - open source wicket components

2010-06-23 Thread Fernando Wermus
These are the errors:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0;
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR
2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
Timestamp: Wed, 23 Jun 2010 19:42:54 UTC


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js


Message: Object doesn't support this property or method
Line: 1
Char: 14578
Code: 0
URI:
http://visural-wicket-examples.appspot.com/app/resources/com.visural.wicket.behavior.beautytips.BeautyTipsJSRef/jquery.bt.js



On Wed, Jun 23, 2010 at 8:44 AM, Fernando Wermus
wrote:

> Tooltip is not working on Internet Explorer 8 and windows xp
>
>
> On Wed, Jun 23, 2010 at 6:31 AM, James Carman 
> wrote:
>
>> Why not just get it published to the main Maven repository?  It's not
>> that difficult.
>>
>> On Wed, Jun 23, 2010 at 9:27 AM, Paul Szulc  wrote:
>> > If you would like to, I can elp you create maven repository on google
>> code
>> > for this project. Let me know.
>> >
>> > On Wed, Jun 23, 2010 at 1:05 PM, Richard Nichols 
>> wrote:
>> >
>> >> It's just hosted in SVN w/ .pom
>> >>
>> >> http://code.google.com/p/visural-wicket/wiki/MavenSupport
>> >>
>> >> <http://code.google.com/p/visural-wicket/wiki/MavenSupport>It should
>> work
>> >> ok
>> >> though - let me know if you have issues.
>> >>
>> >> cheers,
>> >> Richard.
>> >>
>> >> On 23 June 2010 20:24, Maris Orbidans  wrote:
>> >>
>> >> >
>> >> > Looks great! I will give it a try.  Is it maven repo ?
>> >> >
>> >> >
>> >> > > -Original Message-
>> >> > > From: r...@richardnichols.net [mailto:r...@richardnichols.net] On
>> Behalf
>> >> > Of
>> >> > > Richard Nichols
>> >> > > Sent: 23 June 2010 01:31
>> >> > 

Re: Announcing: visural-wicket 0.6 released - open source wicket components

2010-06-23 Thread Fernando Wermus
Tooltip is not working on Internet Explorer 8 and windows xp

On Wed, Jun 23, 2010 at 6:31 AM, James Carman wrote:

> Why not just get it published to the main Maven repository?  It's not
> that difficult.
>
> On Wed, Jun 23, 2010 at 9:27 AM, Paul Szulc  wrote:
> > If you would like to, I can elp you create maven repository on google
> code
> > for this project. Let me know.
> >
> > On Wed, Jun 23, 2010 at 1:05 PM, Richard Nichols  wrote:
> >
> >> It's just hosted in SVN w/ .pom
> >>
> >> http://code.google.com/p/visural-wicket/wiki/MavenSupport
> >>
> >> <http://code.google.com/p/visural-wicket/wiki/MavenSupport>It should
> work
> >> ok
> >> though - let me know if you have issues.
> >>
> >> cheers,
> >> Richard.
> >>
> >> On 23 June 2010 20:24, Maris Orbidans  wrote:
> >>
> >> >
> >> > Looks great! I will give it a try.  Is it maven repo ?
> >> >
> >> >
> >> > > -Original Message-
> >> > > From: r...@richardnichols.net [mailto:r...@richardnichols.net] On
> Behalf
> >> > Of
> >> > > Richard Nichols
> >> > > Sent: 23 June 2010 01:31
> >> > > To: users@wicket.apache.org
> >> > > Subject: Announcing: visural-wicket 0.6 released - open source
> wicket
> >> > > components
> >> > >
> >> > > Hi all,
> >> > >
> >> > > I'm pleased to announce the next major version of visural-wicket -
> 0.6
> >> > >
> >> > > This version includes a bunch of new components and behaviours.
> >> > >
> >> > > For the full run down, follow the link -
> >> > >
> >> > >
> http://www.richardnichols.net/2010/06/visural-wicket-0-6-released-new-
> >> > > components/
> >> > >
> >> > > visural-wicket is Apache 2.0 licensed open source.
> >> > >
> >> > > Let me know if you have any problems, suggestions or feedback.
> >> > >
> >> > > cheers,
> >> > > Richard.
> >> > >
> >> > > --
> >> > > Richard Nichols
> >> > > http://www.richardnichols.net/ :: http://onmydoorstep.com.au/
> >> > >
> >> > >
> >> > >
> _____
> >> > > This e-mail has been scanned for viruses by MessageLabs.
> >> >
> >> > -
> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >
> >> >
> >>
> >>
> >> --
> >> Richard Nichols
> >> http://www.richardnichols.net/ :: http://onmydoorstep.com.au/
> >>
> >
> >
> >
> > --
> > Best regards,
> > Paul Szulc
> >
> > http://paulszulc.wordpress.com
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


ajaxPagingNavigation, Dataview, CheckGroup and check. Persist items checked

2010-06-22 Thread Fernando Wermus
Hi all,
I have a dataview with an ajaxPagingNavigation. Each time, the user
changes the page, he lost the item checked in the previous one. What do I
have to do to guarantee the items checked keep persisted?

Any help would be really appreciated

thanks in advance


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


ajaxPagingNavigation and CheckGroup

2010-06-22 Thread Fernando Wermus
Hola,
Quería saber si existe alguna manera de no perder los items
seleccionados de un checkgroup - check en una lista que esta paginada con
AjaxPagingNavigation.

saludos!

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: ResourceStreamLocator and mvn resource:resource copying resources in the right directory

2010-06-18 Thread Fernando Wermus
The solution I found:

application.init

getResourceSettings().addResourceFolder("/WEB-INF/html");

Your resources will be protected by web-inf and the configuration is the
same in local development machine and in the remote development machine,
where you can give permits to your web designers. Not the best solution but
the simplest.

In maven,


false
src/main/webapp/


On Fri, Jun 18, 2010 at 4:21 AM,  wrote:

> Hi,
>
> You could have the files in a sibling directory in the web directory
> that is hidden by the wicket filter mapping. Has many benefits.
>
> Allows web developers to freely edit and view files in context with
> links that actually work. FInally HTML refactoring will work. Can
> someone suggest how to get the three lines of code into Wicket that
> are needed to support this?
>
> Please See
>
> "Cannot substitute RelativePathPrefixHandler"
> https://issues.apache.org/jira/browse/WICKET-2881
>
>
> Bernard
>
>
>
>
>
>
>
>
> On Thu, 17 Jun 2010 16:31:09 -0300, you wrote:
>
> >Hi all,
> >I need to change the development enviroment for
> >
> >IResourceStreamLocator locator =
> >new ResourceStreamLocator(new Path(new Folder("html")));
> >  getResourceSettings().setResourceStreamLocator(locator);
> >
> >but, what I also need is that maven copy the resources form
> > src/main/resources to src/main/WEB-INF/html. This is needed because when
> >maven creates the war file the resources should also be located in that
> >directory.
> >
> >I've tried
> >
> >
> >   org.apache.maven.plugins
> >   maven-resources-plugin
> >   2.4.1
> >   
> >   
> > copy-package-config
> > package
> > 
> > copy-resources
> > 
> > 
> > ${basedir}/html
> >
> >  
> >
> >  ${basedir}/src/main/resources
> >
> >true
> > 
> >
> > 
> >   
> >   
> >  
> >
> >and I got
> >
> >[1] Inside the definition for plugin 'maven-resources-plugin' specify the
> >following:
> >
> >
> >  ...
> >  VALUE
> >.
> >
> >
> >I don't know what else to do
> >
> >thanks in advance
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


ResourceStreamLocator and mvn resource:resource copying resources in the right directory

2010-06-17 Thread Fernando Wermus
Hi all,
I need to change the development enviroment for

IResourceStreamLocator locator =
new ResourceStreamLocator(new Path(new Folder("html")));
  getResourceSettings().setResourceStreamLocator(locator);

but, what I also need is that maven copy the resources form
 src/main/resources to src/main/WEB-INF/html. This is needed because when
maven creates the war file the resources should also be located in that
directory.

I've tried


   org.apache.maven.plugins
   maven-resources-plugin
   2.4.1
   
   
 copy-package-config
 package
 
 copy-resources
 
 
 ${basedir}/html

  

  ${basedir}/src/main/resources

true
 

 
   
   
  

and I got

[1] Inside the definition for plugin 'maven-resources-plugin' specify the
following:


  ...
  VALUE
.


I don't know what else to do

thanks in advance
-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: got no pages from a data provider

2010-06-15 Thread Fernando Wermus
thanks

On Tue, Jun 15, 2010 at 6:38 PM, Jeremy Thomerson  wrote:

> On Tue, Jun 15, 2010 at 4:30 PM, Fernando Wermus
> wrote:
>
> > Hi all,
> >
> > For some reason *dataView* always passed first=0 and count=0.
> >
> > This is my code
> >  add(new DataView("amistades", new AmistadesProvider()) {
> > private static final long serialVersionUID = 5328267159730501362L;
> >
> > public void populateItem(Item item) {
> > User user=(User)item.getModelObject();
> > item.add(new ContextImage("avatar",new Model(user.getPicture(;
> >item.add(new Label("nombre", user.getName()));
> >item.add(new Label("origen",user.getAbout()));
> >
> >}
> >});
> > add(new AjaxPagingNavigator("navigator", getDataView()));
> > getDataView().setItemsPerPage(7);
> >
> > This is my dataview
> > ...
> > @Override
> > public Iterator iterator(int first, int count) {
> > List users=null;
> > Sesion sesion=Sesion.get();
> > try {
> >  FacebookClient fbClient = new
> DefaultFacebookClient(sesion.getFbToken());
> > Connection myFriends =
> > fbClient.
> > fetchConnection("me/friends", User.class,
> > Parameter.with("fields", "id, name, picture"),
> > Parameter.with("limit", String.valueOf(count)),
> > Parameter.with("offset", String.valueOf(first)));
> > users=myFriends.getData();
> > } catch (FacebookException e) {
> > log.error(e);
> > sesion.error("te desconectaste de facebook");
> > }
> > this.size=users.size();
> > return users.iterator();
> > }
> > ...
> > Any idea?
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
>
> What is size() returning?
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


got no pages from a data provider

2010-06-15 Thread Fernando Wermus
Hi all,

For some reason *dataView* always passed first=0 and count=0.

This is my code
 add(new DataView("amistades", new AmistadesProvider()) {
private static final long serialVersionUID = 5328267159730501362L;

public void populateItem(Item item) {
User user=(User)item.getModelObject();
item.add(new ContextImage("avatar",new Model(user.getPicture(;
item.add(new Label("nombre", user.getName()));
item.add(new Label("origen",user.getAbout()));

}
});
add(new AjaxPagingNavigator("navigator", getDataView()));
getDataView().setItemsPerPage(7);

This is my dataview
...
@Override
public Iterator iterator(int first, int count) {
List users=null;
Sesion sesion=Sesion.get();
try {
 FacebookClient fbClient = new DefaultFacebookClient(sesion.getFbToken());
Connection myFriends =
fbClient.
fetchConnection("me/friends", User.class,
Parameter.with("fields", "id, name, picture"),
Parameter.with("limit", String.valueOf(count)),
Parameter.with("offset", String.valueOf(first)));
users=myFriends.getData();
} catch (FacebookException e) {
log.error(e);
sesion.error("te desconectaste de facebook");
}
this.size=users.size();
return users.iterator();
}
...
Any idea?

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


wicket + rest fb

2010-06-10 Thread Fernando Wermus
I followed the example at
https://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+Connect+via+Javascript+SDK

and I got the following error:

API Error Code: 100
API Error Description: Invalid parameter
Error Message: next is not owned by the application.

Any idea what's going on?

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Confluence out of sync?

2010-06-10 Thread Fernando Wermus
vishapXtreme,
  You can download the code from RestFB google code.


On Thu, Jun 10, 2010 at 4:39 PM, Fernando Wermus
wrote:

> Markus,
>   I have tried
> https://cwiki.apache.org/WICKET/adding-facebook-connect.html without any
> luck. The classes are not any more there.
> Could you find a way to use facebook connect?
>
>
> On Wed, Jun 9, 2010 at 4:36 PM, ViShap wrote:
>
>> Hi,
>>
>> if I use the confluence-link
>> https://cwiki.apache.org/*confluence*/*display
>> */WICKET/How+to+do+things+in+Wicket<https://cwiki.apache.org/*confluence*/*display*/WICKET/How+to+do+things+in+Wicket>I
>>  get the right page with CSS and
>> everything.
>>
>> But if I follow the link on wicket.apache.org -> Reference I goto
>> https://cwiki.apache.org/WICKET/reference-library.html and there is no
>> CSS
>> loading and an article I added recently (Facebook Javascript SDK -
>>
>> https://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+Connect+via+Javascript+SDK
>> )
>> doesn't even show.
>>
>> fyi
>> Markus
>>
>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Confluence out of sync?

2010-06-10 Thread Fernando Wermus
Markus,
  I have tried
https://cwiki.apache.org/WICKET/adding-facebook-connect.html without any
luck. The classes are not any more there.
Could you find a way to use facebook connect?

On Wed, Jun 9, 2010 at 4:36 PM, ViShap  wrote:

> Hi,
>
> if I use the confluence-link
> https://cwiki.apache.org/*confluence*/*display
> */WICKET/How+to+do+things+in+Wicket I get the right page with CSS and
> everything.
>
> But if I follow the link on wicket.apache.org -> Reference I goto
> https://cwiki.apache.org/WICKET/reference-library.html and there is no CSS
> loading and an article I added recently (Facebook Javascript SDK -
>
> https://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+Connect+via+Javascript+SDK
> )
> doesn't even show.
>
> fyi
> Markus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Just launched - www.onmydoorstep.com.au

2010-06-10 Thread Fernando Wermus
I added the dependency to facebook connect but the classes mentioned in the
example aren't available. Is it possible? How do you solve this?

classes:

import com.google.code.facebookapi.FacebookException;import
com.google.code.facebookapi.FacebookJsonRestClient;import
com.google.code.facebookapi.FacebookWebappHelper;import
com.google.code.facebookapi.ProfileField;



On Tue, May 18, 2010 at 6:29 PM, Richard Nichols  wrote:

> I pretty much used the code from
> https://cwiki.apache.org/WICKET/adding-facebook-connect.html
>
> You need to set up the /xd_reciever.htm for it to work correctly (take
> a look at the facebook connect api docs), either using a Wicket mapped
> resource, or using a servlet filter to return it.
>
> The other trap is that you can't test it locally. I spent an hour
> trying to debug why it wasn't working - the only reason was the API
> will not connect from any host other than the one registered in your
> Facebook App Config. If you try from localhost it just opens your site
> inside the Facebook login popup - really unhelpful (an error would be
> nice).
>
> If you follow the wiki article though, it should be fairly easy to get
> going.
>
> On 18 May 2010 22:56, Fernando Wermus  wrote:
> > I need a hand with facebook connect and wicket in some weeks. Could you
> > share your wicket facebook code? I imagine it is pretty easy.
> >
> > thanks in advance
> >
> > On Mon, May 17, 2010 at 10:31 PM, Richard Nichols 
> wrote:
> >
> >> Hey all,
> >>
> >> Just thought fellow Wicketeers might be interested to take a look at a
> >> site I have just launched built 100% with Wicket -
> >> http://www.onmydoorstep.com.au/
> >>
> >> The site is a community portal for people living in Victoria,
> >> Australia and displays government data about every suburb, city and
> >> town in the state. It also allows users to find government services
> >> and business nearby and submit community events/festivals and ask
> >> questions of other users.
> >>
> >> It integrates Wicket with Facebook Connect, Google Maps, Google
> >> Charts, Google's Weather API, plus on the backend, warp-persist, Guice
> >> and Hibernate/JPA. I also made extensive use of
> >> http://code.google.com/p/visural-wicket
> >>
> >> Anyhow - happy to answer any questions about the above technologies
> >> and the experience of building the site with Wicket. Also welcome
> >> feedback & criticism should you have some :)
> >>
> >>
> >> cheers,
> >> Richard.
> >>
> >> --
> >> Richard Nichols :: http://www.visural.com/ ::
> >> http://www.richardnichols.net/
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
>
>
> --
> Richard Nichols :: http://www.visural.com/ ::
> http://www.richardnichols.net/
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


selected links in a menu

2010-06-08 Thread Fernando Wermus
Hi all,
I have a menu that it structure is the following:


1. for the link selected


 
 selected item 




2. for the link not selected


  
  
  item not selected
  
  
...


I programmed this with a border that renders the , but I need make
invisible the border, but not the anchor to get the first case.

I tried:

border.setVisible(false);
border.getBodyContainer().setVisible(true);

and I got an error:

at java.util.AbstractList$Itr.remove(
AbstractList.java:356)
at org.apache.wicket.Page.checkRendering(Page.java:1139)
at org.apache.wicket.Page.renderPage(Page.java:921)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:240)


Which is the best way to achieve this?

I supposed that if a decorator didn't render it would mean the body would
still be rendered - it is a decorator, not a classic container.

thanks in advance


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


devolpment environment and externalizables html in a different server (url)

2010-06-07 Thread Fernando Wermus
Hi all,
We would like to set up a deveolpment environment for some developers
who are not in the same office. We think that externalizing the html in a
different server could improve the independence between different free
lancers and we don't need to set up the server for this case, just to have a
ftp to upload html files, etc. What do you think about? Could this be done
with wicket? Any help would be appreciate it.

thanks in advance



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: [PROPOSAL] Application.runAs() Method...

2010-05-28 Thread Fernando Wermus
I am sorry but I don't knwo what ITL is? Could you explained a little?

On Fri, May 28, 2010 at 10:33 AM, Sven Meier  wrote:

>
> OK, no ITL, got it.
>
> >Then, you can use that Runnable anywhere to run a task
> >with all of the appropriate Wickety goodness set up for you (except
> >for the request cycle of course because you're not executing within a
> >request cycle).
>
> But what are the use cases for *this* proposal (beside mail generation)?
>
> Sven
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/PROPOSAL-Application-runAs-Method-tp2230030p2234572.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: resource model partially resolve key

2010-05-27 Thread Fernando Wermus
Igor,
   It was a bug.

thanks

On Thu, May 27, 2010 at 12:32 PM, Igor Vaynberg wrote:

> how is the TituloReadOnlyModel  used?
>
> -igor
>
> On Thu, May 27, 2010 at 8:22 AM, Fernando Wermus
>  wrote:
> > I got this message,
> >
> > [Warning: String resource for 'Define el recorrido que harán' not found]
> >
> > where '*Define el recorrido que harán*' is the string I do want to show
> > instead of *[Warning: String resource for 'Define el recorrido que harán'
> > not found]*. It seems that wicket is trying to reevaluate the key twice.
> >
> > The model that resolves the string is,
> >
> > public abstract class TituloReadOnlyModel extends AbstractReadOnlyModel{
> > ...
> >   public Object getObject(){
> > if (*someBoolean*){
> >
> >
> *Application.get().getResourceSettings().getLocalizer().getString("desafio.crear",
> > wrappingComponent(), "");*
> > }else{
> >
> >
> *Application.get().getResourceSettings().getLocalizer().getString("recorrido.crear",
> > wrappingComponent(), "");*
> >     }
> >   }
> >   public abstract Component wrappingComponent();
> > }
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


resource model partially resolve key

2010-05-27 Thread Fernando Wermus
I got this message,

[Warning: String resource for 'Define el recorrido que harán' not found]

where '*Define el recorrido que harán*' is the string I do want to show
instead of *[Warning: String resource for 'Define el recorrido que harán'
not found]*. It seems that wicket is trying to reevaluate the key twice.

The model that resolves the string is,

public abstract class TituloReadOnlyModel extends AbstractReadOnlyModel{
...
   public Object getObject(){
 if (*someBoolean*){

*Application.get().getResourceSettings().getLocalizer().getString("desafio.crear",
wrappingComponent(), "");*
 }else{

*Application.get().getResourceSettings().getLocalizer().getString("recorrido.crear",
wrappingComponent(), "");*
 }
   }
   public abstract Component wrappingComponent();
}































-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Just launched - www.onmydoorstep.com.au

2010-05-18 Thread Fernando Wermus
I need a hand with facebook connect and wicket in some weeks. Could you
share your wicket facebook code? I imagine it is pretty easy.

thanks in advance

On Mon, May 17, 2010 at 10:31 PM, Richard Nichols  wrote:

> Hey all,
>
> Just thought fellow Wicketeers might be interested to take a look at a
> site I have just launched built 100% with Wicket -
> http://www.onmydoorstep.com.au/
>
> The site is a community portal for people living in Victoria,
> Australia and displays government data about every suburb, city and
> town in the state. It also allows users to find government services
> and business nearby and submit community events/festivals and ask
> questions of other users.
>
> It integrates Wicket with Facebook Connect, Google Maps, Google
> Charts, Google's Weather API, plus on the backend, warp-persist, Guice
> and Hibernate/JPA. I also made extensive use of
> http://code.google.com/p/visural-wicket
>
> Anyhow - happy to answer any questions about the above technologies
> and the experience of building the site with Wicket. Also welcome
> feedback & criticism should you have some :)
>
>
> cheers,
> Richard.
>
> --
> Richard Nichols :: http://www.visural.com/ ::
> http://www.richardnichols.net/
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Small doubt about wicket and Html

2010-05-18 Thread Fernando Wermus
wicket:enclosure is the best option

On Mon, May 17, 2010 at 7:15 PM, Jeremy Thomerson  wrote:

> You can not do it directly in HTML - it breaks the separation of concerns.
>  But, you can create a WebMarkupContainer, set the visibility on it, and
> nest your HTML within it.  Then you can control the visibility for that
> entire block with only the single component.  Also, see wicket:enclosure.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, May 17, 2010 at 4:41 PM, Victor_Trapiello  >wrote:
>
> >
> > Hello guy;
> >
> > I´m in Spain 12.0 o´clock nothing to do and before falling a sleep I
> > wonder... is there any method / way to hidde wicket items/componentes
> > direct
> > in the html code¿? I mean now I do not want to show an image, in my java
> > code I say bablablabla myLabelWithImage.SetVisible(false);
> >
> > can we do something similar like in php or strutsc, like puting ablock of
> > html and at the beginning one conditions intead putting everything in the
> > java code¿?
> >
> > Thank you very much guys!
> >
> > Victor Trapiello
> > www.trapiello.net
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Small-doubt-about-wicket-and-Html-tp2220418p2220418.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
> >
> >
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


HELP! org.apache.wicket.WicketRuntimeException: There is no application attached to current thread btpool0-6

2010-05-17 Thread Fernando Wermus
Hi all,
I have 2 services in my app. I have wicket pages and a flex-blazeds
service. My wicket app pops up a modal window to show a flex-blazeds service
which connects to back end to do some business logic; *besides it sends some
emails*. The emails are again rendered by wicket using a fake request cycle,
etc. But, the flex-blazeds service runs in a thread and wicket runs in
another thread. Thus, when I try to render the email, I don't have an
Application - the wicket Application is in a different thread.



 org.apache.wicket.WicketRuntimeException: There is no application attached
to current thread btpool0-6

HELP! Is there some way to use wicket as a render in a different thread? or
some trick about this?

thanks in advance


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Wicket:Form support?

2010-05-17 Thread Fernando Wermus
I've never used it, but you have FormComponentPanel. It is a 
but It also has the behavior or traits of a form.

On Mon, May 17, 2010 at 6:44 AM, Ayodeji Aladejebi wrote:

> Sorry, I was only more conversant with older releases of wicket.
> Is there any
>  without users having to make it an inner class of a Panel. A
> form with its own top level markups
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Shared Components

2010-05-13 Thread Fernando Wermus
Despite frameworks as jsf, wicket manages lightweight components. It would
be adding more complexity to something that is pretty simple. Furthermore, I
don't think you will performance better. The important fact in any case is
that the browser caches it.


On Thu, May 13, 2010 at 12:38 PM, Ayodeji Aladejebi wrote:

> Hi,
>
> Please any concept of shared components in Wicket. If I have a component
> that the content (model) will always be the same across all sessions and
> users, is there a wicket api approach for ensuring we only have one of such
> components throughout the application scope
>
> --
> Aladejebi Ayodeji A.,
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-11 Thread Fernando Wermus
Yes, it is.

I will review my case.

I have the following urls:

valiousData/pagenumber/0, valiousData/pagenumber/1,
valiousData/pagenumber/2, valiousData/pagenumber/3

I want fixed urls or stable ones because I would like the searcher robots
could follow this links. But I don't want a programmer ask for each of these
pages to get all the information is in it. I don't want them to be readable
for a programmer. I thought applying bookmarkablePageLink +
CryptedUrlWebRequestCodingStrategy I would get this both needs.


ps: I need this for an app demo and right now I am not worry about how good
is CryptedUrlWebRequestCodingStrategy algorithms.

-fer

On Tue, May 11, 2010 at 2:02 PM, Igor Vaynberg wrote:

> if thats the case why make the url bookmarkable?
>
> -igor
>
> On Tue, May 11, 2010 at 7:13 AM, Fernando Wermus
>  wrote:
> > Jeremy,
> > There is a database with huge amount of data that could be collected
> by
> > someone else. If the url has a clear meaning, to say: /data/0, /data/1.
> They
> > can get all the data from there. I would like to have fixed and encripted
> > urls.
> >
> > On Mon, May 10, 2010 at 4:17 PM, Jeremy Thomerson <
> jer...@wickettraining.com
> >> wrote:
> >
> >> What is a hacker going to get from a URL like "/somepage"?
> >>
> >> --
> >> Jeremy Thomerson
> >> http://www.wickettraining.com
> >>
> >>
> >>
> >> On Mon, May 10, 2010 at 2:06 PM, Fernando Wermus
> >> wrote:
> >>
> >> > Igor,
> >> >Wicket in Action explains
> >> > "... Using this code, Wicket will encrypt all your URLs—including
> >> > bookmarkable URLs. ...".
> >> >
> >> > I need fixed entry point for my stateless page,  but not readable for
> >> > humans, because some hacker would like to extract all the information
> >> from
> >> > the site.
> >> >
> >> > How can I achieve this?
> >> >
> >> >
> >> > On Mon, May 10, 2010 at 4:01 PM, Igor Vaynberg <
> igor.vaynb...@gmail.com
> >> > >wrote:
> >> >
> >> > > afair crypted strategy only encodes non-bookmarkable urls. it does
> not
> >> > > encode bookmarkable urls because those are meant as entrypoints into
> >> > > your application.
> >> > >
> >> > > -igor
> >> > >
> >> > > On Mon, May 10, 2010 at 11:38 AM, Fernando Wermus
> >> > >  wrote:
> >> > > > Hi all,
> >> > > >I create a PagingNavigator stateless. Instead of using a model
> to
> >> > have
> >> > > > the number page shown, my StatelessPagingNavigator shows the
> number
> >> > > through
> >> > > > parameters. I hope that the page number wouldnt have been showed
> >> using
> >> > > > CryptedUrlWebRequestCodingStrategy, but It does. This is rather
> >> weird;
> >> > I
> >> > > > hope any could point me out some solution. Is my class written
> >> wrongly
> >> > in
> >> > > > some way?
> >> > > >
> >> > > >
> >> > > > public class StatelessPagingNavigator extends PagingNavigator {
> >> > > > private static final long serialVersionUID = 3576836044400027436L;
> >> > > >
> >> > > > public StatelessPagingNavigator(String id, DataView dataView) {
> >> > > > super(id, dataView);
> >> > > > }
> >> > > >
> >> > > >  @Override
> >> > > > protected Link newPagingNavigationIncrementLink(final String id,
> >> > > IPageable
> >> > > > pageable, int increment) {
> >> > > > * **PageParameters p=new PageParameters();*
> >> > > > *
> >> > > > *
> >> > > > * **p.add("increment", String.valueOf(increment));*
> >> > > > * **p.add("pageNumber",
> String.valueOf(pageable.getCurrentPage()));*
> >> > > > Link link= new BookmarkablePageIncrementLink(id, pageable,
> >> > > > getPage().getClass(), p){
> >> > > > private static final long serialVersionUID = 1L;
> >> > > >
> >> > > > public boolean isEnabled()
> >> > > > {
> >> > > > return super.isEnabled() &&
> StatelessPagingNavigator.this.isEnabled()
> >> > &a

Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-11 Thread Fernando Wermus
I don't see anything weird in BookmarkablePageIncrementLink code, any help I
do appreciate

package com.misPartidos.web.widgets.seo.navigation;

import org.apache.wicket.Page;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.navigation.paging.IPageable;

public class BookmarkablePageIncrementLink extends BookmarkablePageLink {
private static final long serialVersionUID = 5584517284841095213L;

/** The PageableListView the page links are referring to. */
protected final IPageable pageable;
 @SuppressWarnings("unchecked")
public BookmarkablePageIncrementLink(String id, IPageable pageable, Class
clazz, PageParameters p) {
super(id, clazz, p);
setAutoEnable(true);
this.pageable = pageable;
}
/**
 * Determines the next page number for the pageable component.
 *
 * @return the new page number
 */
public final int getPageNumber()
{
// Determine the page number based on the current
// PageableListView page and the increment
int idx = pageable.getCurrentPage() +
getPageParameters().getInt("increment");

// make sure the index lies between 0 and the last page
return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));
}

/**
 * @return True if it is referring to the first page of the underlying
PageableListView.
 */
public boolean isFirst()
{
return pageable.getCurrentPage() <= 0;
}

/**
 * @return True if it is referring to the last page of the underlying
PageableListView.
 */
public boolean isLast()
{
return pageable.getCurrentPage() >= (pageable.getPageCount() - 1);
}

/**
 * Returns true if the page link links to the given page.
 *
 * @param page
 *ignored
 * @return True if this link links to the given page
 * @see
org.apache.wicket.markup.html.link.PageLink#linksTo(org.apache.wicket.Page)
 */
public boolean linksTo(final Page page)
{
int increment=getPageParameters().getInt("increment");
pageable.getCurrentPage();
return ((increment < 0) && isFirst()) || ((increment > 0) && isLast());
}
}


On Mon, May 10, 2010 at 5:33 PM, Igor Vaynberg wrote:

> indeed, looking at the code everything is encrypted, so the problem
> must be in your BookmarkablePageIncrementLink. only urls that are
> generated via the coding strategy are encrypted, if you concatenate
> strings yourself they will not be encrypted obviously.
>
> -igor
>
> On Mon, May 10, 2010 at 12:06 PM, Fernando Wermus
>  wrote:
> > Igor,
> >Wicket in Action explains
> > "... Using this code, Wicket will encrypt all your URLs—including
> > bookmarkable URLs. ...".
> >
> > I need fixed entry point for my stateless page,  but not readable for
> > humans, because some hacker would like to extract all the information
> from
> > the site.
> >
> > How can I achieve this?
> >
> >
> > On Mon, May 10, 2010 at 4:01 PM, Igor Vaynberg  >wrote:
> >
> >> afair crypted strategy only encodes non-bookmarkable urls. it does not
> >> encode bookmarkable urls because those are meant as entrypoints into
> >> your application.
> >>
> >> -igor
> >>
> >> On Mon, May 10, 2010 at 11:38 AM, Fernando Wermus
> >>  wrote:
> >> > Hi all,
> >> >I create a PagingNavigator stateless. Instead of using a model to
> have
> >> > the number page shown, my StatelessPagingNavigator shows the number
> >> through
> >> > parameters. I hope that the page number wouldnt have been showed using
> >> > CryptedUrlWebRequestCodingStrategy, but It does. This is rather weird;
> I
> >> > hope any could point me out some solution. Is my class written wrongly
> in
> >> > some way?
> >> >
> >> >
> >> > public class StatelessPagingNavigator extends PagingNavigator {
> >> > private static final long serialVersionUID = 3576836044400027436L;
> >> >
> >> > public StatelessPagingNavigator(String id, DataView dataView) {
> >> > super(id, dataView);
> >> > }
> >> >
> >> >  @Override
> >> > protected Link newPagingNavigationIncrementLink(final String id,
> >> IPageable
> >> > pageable, int increment) {
> >> > * **PageParameters p=new PageParameters();*
> >> > *
> >> > *
> >> > * **p.add("increment", String.valueOf(increment));*
> >> > * **p.add("pageNumber", String.valueOf(pageable.getCurrentPage()));*
> >> > Link link= new BookmarkablePageIncrementLink(id, pageable,
> >> > getPage().getClass(), p){
> >> > private static final long serialVersionUID = 1L;
> >> >
> >&

Re: Wicket + security, what are the best options? Spring Security reached almost all the way...

2010-05-11 Thread Fernando Wermus
try

  
   org.wicketstuff
   wicket-shiro
   1.4-SNAPSHOT
  

On Tue, May 11, 2010 at 3:15 AM, PDiefent  wrote:

>
> where can I find the wicket-shiro-example stuff?
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-security-what-are-the-best-options-Spring-Security-reached-almost-all-the-way-tp2068415p2173369.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-11 Thread Fernando Wermus
Jeremy,
 There is a database with huge amount of data that could be collected by
someone else. If the url has a clear meaning, to say: /data/0, /data/1. They
can get all the data from there. I would like to have fixed and encripted
urls.

On Mon, May 10, 2010 at 4:17 PM, Jeremy Thomerson  wrote:

> What is a hacker going to get from a URL like "/somepage"?
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, May 10, 2010 at 2:06 PM, Fernando Wermus
> wrote:
>
> > Igor,
> >Wicket in Action explains
> > "... Using this code, Wicket will encrypt all your URLs—including
> > bookmarkable URLs. ...".
> >
> > I need fixed entry point for my stateless page,  but not readable for
> > humans, because some hacker would like to extract all the information
> from
> > the site.
> >
> > How can I achieve this?
> >
> >
> > On Mon, May 10, 2010 at 4:01 PM, Igor Vaynberg  > >wrote:
> >
> > > afair crypted strategy only encodes non-bookmarkable urls. it does not
> > > encode bookmarkable urls because those are meant as entrypoints into
> > > your application.
> > >
> > > -igor
> > >
> > > On Mon, May 10, 2010 at 11:38 AM, Fernando Wermus
> > >  wrote:
> > > > Hi all,
> > > >I create a PagingNavigator stateless. Instead of using a model to
> > have
> > > > the number page shown, my StatelessPagingNavigator shows the number
> > > through
> > > > parameters. I hope that the page number wouldnt have been showed
> using
> > > > CryptedUrlWebRequestCodingStrategy, but It does. This is rather
> weird;
> > I
> > > > hope any could point me out some solution. Is my class written
> wrongly
> > in
> > > > some way?
> > > >
> > > >
> > > > public class StatelessPagingNavigator extends PagingNavigator {
> > > > private static final long serialVersionUID = 3576836044400027436L;
> > > >
> > > > public StatelessPagingNavigator(String id, DataView dataView) {
> > > > super(id, dataView);
> > > > }
> > > >
> > > >  @Override
> > > > protected Link newPagingNavigationIncrementLink(final String id,
> > > IPageable
> > > > pageable, int increment) {
> > > > * **PageParameters p=new PageParameters();*
> > > > *
> > > > *
> > > > * **p.add("increment", String.valueOf(increment));*
> > > > * **p.add("pageNumber", String.valueOf(pageable.getCurrentPage()));*
> > > > Link link= new BookmarkablePageIncrementLink(id, pageable,
> > > > getPage().getClass(), p){
> > > > private static final long serialVersionUID = 1L;
> > > >
> > > > public boolean isEnabled()
> > > > {
> > > > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled()
> > &&
> > > > StatelessPagingNavigator.this.isEnableAllowed();
> > > > }
> > > > };
> > > >  return link;
> > > > }
> > > >
> > > > @Override
> > > > protected Link newPagingNavigationLink(final String id, final
> IPageable
> > > > pageable, int pageNumber) {
> > > > * **PageParameters p=new PageParameters();*
> > > > * **p.add("pageNumber", String.valueOf(pageNumber));*
> > > >  return new BookmarkablePagingNavigationLink(id, pageable,
> > > > getPage().getClass(),  p){
> > > > private static final long serialVersionUID = -3076648671049640420L;
> > > >
> > > > public boolean isEnabled()
> > > > {
> > > > //return false;
> > > > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled()
> > &&
> > > > StatelessPagingNavigator.this.isEnableAllowed();
> > > > }
> > > >  };
> > > > }
> > > >
> > > > @Override
> > > > protected PagingNavigation newNavigation(final IPageable pageable,
> > final
> > > > IPagingLabelProvider labelProvider) {
> > > > return new PagingNavigation("navigation", pageable, labelProvider) {
> > > > private static final long serialVersionUID = 1102823179571300337L;
> > > >
> > > > @Override
> > > > protected Link newPagingNavigationLink(final String id, final
> IPageable
> > > > pageable, int pageIndex) {
> > > > * **PageParameters p=new PageParameters();*
> > > > * **p.add("pageIndex", String.valueOf(pageIndex));*
> > > >  return new BookmarkablePagingNavigation(id, pageable,
> > > getPage().getClass(),
> > > >  p){
> > > > private static final long serialVersionUID = -3076648671049640420L;
> > > >
> > > > public boolean isEnabled()
> > > > {
> > > > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled()
> > &&
> > > > StatelessPagingNavigator.this.isEnableAllowed();
> > > > }
> > > >  };
> > > > }
> > > > };
> > > > }
> > > > }
> > > >
> > > > thanks in advance
> > > >
> > > > --
> > > > Fernando Wermus.
> > > >
> > > > www.linkedin.com/in/fernandowermus
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-10 Thread Fernando Wermus
Igor,
Wicket in Action explains
"... Using this code, Wicket will encrypt all your URLs—including
bookmarkable URLs. ...".

I need fixed entry point for my stateless page,  but not readable for
humans, because some hacker would like to extract all the information from
the site.

How can I achieve this?


On Mon, May 10, 2010 at 4:01 PM, Igor Vaynberg wrote:

> afair crypted strategy only encodes non-bookmarkable urls. it does not
> encode bookmarkable urls because those are meant as entrypoints into
> your application.
>
> -igor
>
> On Mon, May 10, 2010 at 11:38 AM, Fernando Wermus
>  wrote:
> > Hi all,
> >I create a PagingNavigator stateless. Instead of using a model to have
> > the number page shown, my StatelessPagingNavigator shows the number
> through
> > parameters. I hope that the page number wouldnt have been showed using
> > CryptedUrlWebRequestCodingStrategy, but It does. This is rather weird; I
> > hope any could point me out some solution. Is my class written wrongly in
> > some way?
> >
> >
> > public class StatelessPagingNavigator extends PagingNavigator {
> > private static final long serialVersionUID = 3576836044400027436L;
> >
> > public StatelessPagingNavigator(String id, DataView dataView) {
> > super(id, dataView);
> > }
> >
> >  @Override
> > protected Link newPagingNavigationIncrementLink(final String id,
> IPageable
> > pageable, int increment) {
> > * **PageParameters p=new PageParameters();*
> > *
> > *
> > * **p.add("increment", String.valueOf(increment));*
> > * **p.add("pageNumber", String.valueOf(pageable.getCurrentPage()));*
> > Link link= new BookmarkablePageIncrementLink(id, pageable,
> > getPage().getClass(), p){
> > private static final long serialVersionUID = 1L;
> >
> > public boolean isEnabled()
> > {
> > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> > StatelessPagingNavigator.this.isEnableAllowed();
> > }
> > };
> >  return link;
> > }
> >
> > @Override
> > protected Link newPagingNavigationLink(final String id, final IPageable
> > pageable, int pageNumber) {
> > * **PageParameters p=new PageParameters();*
> > * **p.add("pageNumber", String.valueOf(pageNumber));*
> >  return new BookmarkablePagingNavigationLink(id, pageable,
> > getPage().getClass(),  p){
> > private static final long serialVersionUID = -3076648671049640420L;
> >
> > public boolean isEnabled()
> > {
> > //return false;
> > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> > StatelessPagingNavigator.this.isEnableAllowed();
> > }
> >  };
> > }
> >
> > @Override
> > protected PagingNavigation newNavigation(final IPageable pageable, final
> > IPagingLabelProvider labelProvider) {
> > return new PagingNavigation("navigation", pageable, labelProvider) {
> > private static final long serialVersionUID = 1102823179571300337L;
> >
> > @Override
> > protected Link newPagingNavigationLink(final String id, final IPageable
> > pageable, int pageIndex) {
> > * **PageParameters p=new PageParameters();*
> > * **p.add("pageIndex", String.valueOf(pageIndex));*
> >  return new BookmarkablePagingNavigation(id, pageable,
> getPage().getClass(),
> >  p){
> > private static final long serialVersionUID = -3076648671049640420L;
> >
> > public boolean isEnabled()
> > {
> > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> > StatelessPagingNavigator.this.isEnableAllowed();
> > }
> >  };
> > }
> > };
> > }
> > }
> >
> > thanks in advance
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-10 Thread Fernando Wermus
Hi all,
I create a PagingNavigator stateless. Instead of using a model to have
the number page shown, my StatelessPagingNavigator shows the number through
parameters. I hope that the page number wouldnt have been showed using
CryptedUrlWebRequestCodingStrategy, but It does. This is rather weird; I
hope any could point me out some solution. Is my class written wrongly in
some way?


public class StatelessPagingNavigator extends PagingNavigator {
private static final long serialVersionUID = 3576836044400027436L;

public StatelessPagingNavigator(String id, DataView dataView) {
super(id, dataView);
}

 @Override
protected Link newPagingNavigationIncrementLink(final String id, IPageable
pageable, int increment) {
* **PageParameters p=new PageParameters();*
*
*
* **p.add("increment", String.valueOf(increment));*
* **p.add("pageNumber", String.valueOf(pageable.getCurrentPage()));*
Link link= new BookmarkablePageIncrementLink(id, pageable,
getPage().getClass(), p){
private static final long serialVersionUID = 1L;

public boolean isEnabled()
{
return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
StatelessPagingNavigator.this.isEnableAllowed();
}
};
 return link;
}

@Override
protected Link newPagingNavigationLink(final String id, final IPageable
pageable, int pageNumber) {
* **PageParameters p=new PageParameters();*
* **p.add("pageNumber", String.valueOf(pageNumber));*
 return new BookmarkablePagingNavigationLink(id, pageable,
getPage().getClass(),  p){
private static final long serialVersionUID = -3076648671049640420L;

public boolean isEnabled()
{
//return false;
return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
StatelessPagingNavigator.this.isEnableAllowed();
}
 };
}

@Override
protected PagingNavigation newNavigation(final IPageable pageable, final
IPagingLabelProvider labelProvider) {
return new PagingNavigation("navigation", pageable, labelProvider) {
private static final long serialVersionUID = 1102823179571300337L;

@Override
protected Link newPagingNavigationLink(final String id, final IPageable
pageable, int pageIndex) {
* **PageParameters p=new PageParameters();*
* **p.add("pageIndex", String.valueOf(pageIndex));*
 return new BookmarkablePagingNavigation(id, pageable, getPage().getClass(),
 p){
private static final long serialVersionUID = -3076648671049640420L;

public boolean isEnabled()
{
return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
StatelessPagingNavigator.this.isEnableAllowed();
}
 };
}
};
}
}

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Wicket + security, what are the best options? Spring Security reached almost all the way...

2010-05-10 Thread Fernando Wermus
you can try shiro. There is a shiro-wicket-web-app example which could help
you.

On Mon, May 10, 2010 at 9:54 AM, PDiefent  wrote:

>
> Thanks for this fast respnse. I will have a deeper look at it.
> Actually I hoped to find a much more simple solution, because I wanted to
> avoid Spring in my application and only use it for authentication ...
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-security-what-are-the-best-options-Spring-Security-reached-almost-all-the-way-tp2068415p2165351.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: how to get some data from servlet

2010-05-09 Thread Fernando Wermus
would you paste your code here? I will get a try if there is no problem.

On Sat, May 8, 2010 at 9:04 PM, Zilvinas Vilutis  wrote:

>
> The problem is not in wicket, but in SwfUpload or more specific would be
> the
> Adobe Flash itself - which uses IE cookies in any case, even when you're
> using FF or Chrome or Safari on Windows (
> http://swfupload.org/forum/generaldiscussion/869 )
>
> Not sure how secure is it - but I've solved this in the following way:
> - I've created a "SecureSessionHolder" static class which holds a list of
> secure session ids
> - Adding the secure session id to the list in "SecureSessionHolder" on
> authentification
> - an impl of "HttpSessionListener" to remove the session ids from the
> static
> list in "SecureSessionHolder" when session is destroyed
> - in the SwfUpload servler just check if the session id ( passed as a
> submit
> parameter ) is in the secure session list in "SecureSessionHolder" before
> parsing the response data
>
> If anybody has got any security concerns on this impl - please notify me,
> I'll appreciate any opinions
>
> -
> 
> nothing is impossible
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/how-to-get-some-data-from-servlet-tp1885531p2136546.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Call Ajax on Parent Page from Popup page.

2010-05-07 Thread Fernando Wermus
add a WindowClosedCallback. Then you can make the refresh to your parent
page.


On Fri, May 7, 2010 at 8:45 AM, Serban Balamaci wrote:

> Hello.
>
> I have a case where I'm trying to refresh the parent page from a popup
> page.
>
> On the parent page I have:
>
>AbstractDefaultAjaxBehavior clientSideCallingBehavior =
>new AbstractDefaultAjaxBehavior() {
>protected void respond(AjaxRequestTarget target) {
>System.out.println("Refreshing ...");
>}
>};
>
>Label lblCallback = new Label("refreshJS", new
> LoadableDetachableModel() {
>
>protected Object load() {
>String callbackScript = "var callRefresh = function(value) {
> wicketAjaxGet('"
>+ clientSideCallingBehavior.getCallbackUrl(false)
>+ "', null, null, function() {return true;}); return
> false;}";
>return callbackScript;
>}
>});
>lblCallback.add(clientSideCallingBehavior);
>lblCallback.setEscapeModelStrings(false);
>add(lblCallback);
>
>
> In the popup page I have on a link call the callRefresh method:
>AjaxLink cancel = new AjaxLink("cancel") {
>public void onClick(AjaxRequestTarget target) {
>target.appendJavascript("window.opener.callRefresh();");
>}
>};
>
> org.apache.wicket.protocol.http.request.InvalidUrlException:
> org.apache.wicket.WicketRuntimeException: component
> right-content-panel-container:right-content-panel-id:details-panel:tabs:panel:refreshJS
> not found on page com.asf.ufe.web.pages.evaluation.AccountEvaluationPage[id
> = 2], listener interface = [RequestListenerInterface name=IBehaviorListener,
> method=public abstract void
> org.apache.wicket.behavior.IBehaviorListener.onRequest()]
>at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
>at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
>at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
>at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
>at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
>at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
> Caused by: org.apache.wicket.WicketRuntimeException: component
> right-content-panel-container:right-content-panel-id:details-panel:tabs:panel:refreshJS
> not found on page com.asf.ufe.web.pages.evaluation.AccountEvaluationPage[id
> = 2], listener interface = [RequestListenerInterface name=IBehaviorListener,
> method=public abstract void
> org.apache.wicket.behavior.IBehaviorListener.onRequest()]
>at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
>at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
>at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
>... 26 more
>
> If I do make the call to callRefresh from the Parent Page(the same page
> where the behaviour is located) with onclick="callRefresh();return false;"
> it works.
>
> Do you have any ideeas? Does it have to be the last page in the PageMap for
> ajax to work?
> Thanks.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Big Problem with TinyMCE

2010-05-03 Thread Fernando Wermus
I've solved it with the following

@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator(){
private static final long serialVersionUID = 4430011596296790970L;

@Override
public CharSequence decorateScript(CharSequence script) {
return "tinyMCE.triggerSave(true,true); " + script;
}
};
}

I don't need any extra button.


I think this could be a behavior, doesn't it?


On Mon, May 3, 2010 at 5:59 PM, Fernando Wermus
wrote:

> Nicolas,
> Your proposal work. But I have my TinyMCE in a modal window and it has
> stopped to close. In the other case, I don't get any string in text area,
> but my modal window close. I need both. Any suggestion?
>
> thanks in advance
>
>
>
> On Mon, May 3, 2010 at 12:06 PM, nicolas melendez wrote:
>
>> hey!
>> do this:
>>
>> add to the page a hidden ajaxSubmitLink and se it an id, for example:
>> "submitToServer". In the onclick java method of the hidden ajaxSubmitLink
>> do your java magic server-side.
>> Then in your submit button of the html page,  add a small javascript that
>> save HTML and then clicks the hidden link, for example:
>>
>> function() {
>> tinyMCE.triggerSave(true,true);
>>  document.getElementById('submitToServer').onclick();
>> };
>>
>> Your problem is that wicket recive the information that is in a hidden
>> textfield, but you have to say to tinyMce, to save in the hidden textfield
>> the html the user have been writing (thats what tinyMCE.triggerSave do)
>> then, when the data is saved in the textfield, you submit your form to the
>> server, and in the wicket code, you use it like a normal textfield.
>>
>> NM
>>
>>
>>
>>
>> On Mon, May 3, 2010 at 11:49 AM, Fernando Wermus
>> wrote:
>>
>> > I run into the same problem. I cant see the text written in text area.
>> > Could
>> > show the code you have written?
>> >
>> > thanks in advance
>> >
>> > On Mon, May 3, 2010 at 4:04 AM, Robert Kimotho 
>> wrote:
>> >
>> > > On your AjaxButton add TinyMceAjaxSubmitModifier.
>> > >
>> > > Kimotho.
>> > >
>> > > On Fri, Apr 30, 2010 at 12:53 AM, Brad Grier <
>> brad.gr...@salusnovus.com
>> > > >wrote:
>> > >
>> > > > I'm trying to use a TinyMCE editor on a form (itself belonging to a
>> > panel
>> > > > added to a page via Ajax). The form is submitted via an AjaxButton.
>> > From
>> > > > other posts here and elsewhere I found I had to call
>> > > > "tinyMCE.triggerSave(true,true);" before the submit to get the data
>> > into
>> > > the
>> > > > textarea's model and then "tinyMCE.idCounter=0;" after the submit. I
>> > used
>> > > an
>> > > > IAjaxCallDecorator to add these functions to the submit button.
>> > > >
>> > > > The problem is that the form only submits with every other press of
>> the
>> > > > button. When it fails, it looks like no script appended after the
>> > > > triggerSave runs. Can anyone help me out? I'm stuck.
>> > > >
>> > > > Thanks,
>> > > > Brad
>> > >
>> >
>> >
>> >
>> > --
>> > Fernando Wermus.
>> >
>> > www.linkedin.com/in/fernandowermus
>> >
>>
>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Big Problem with TinyMCE

2010-05-03 Thread Fernando Wermus
Nicolas,
Your proposal work. But I have my TinyMCE in a modal window and it has
stopped to close. In the other case, I don't get any string in text area,
but my modal window close. I need both. Any suggestion?

thanks in advance



On Mon, May 3, 2010 at 12:06 PM, nicolas melendez wrote:

> hey!
> do this:
>
> add to the page a hidden ajaxSubmitLink and se it an id, for example:
> "submitToServer". In the onclick java method of the hidden ajaxSubmitLink
> do your java magic server-side.
> Then in your submit button of the html page,  add a small javascript that
> save HTML and then clicks the hidden link, for example:
>
> function() {
> tinyMCE.triggerSave(true,true);
>  document.getElementById('submitToServer').onclick();
> };
>
> Your problem is that wicket recive the information that is in a hidden
> textfield, but you have to say to tinyMce, to save in the hidden textfield
> the html the user have been writing (thats what tinyMCE.triggerSave do)
> then, when the data is saved in the textfield, you submit your form to the
> server, and in the wicket code, you use it like a normal textfield.
>
> NM
>
>
>
>
> On Mon, May 3, 2010 at 11:49 AM, Fernando Wermus
> wrote:
>
> > I run into the same problem. I cant see the text written in text area.
> > Could
> > show the code you have written?
> >
> > thanks in advance
> >
> > On Mon, May 3, 2010 at 4:04 AM, Robert Kimotho 
> wrote:
> >
> > > On your AjaxButton add TinyMceAjaxSubmitModifier.
> > >
> > > Kimotho.
> > >
> > > On Fri, Apr 30, 2010 at 12:53 AM, Brad Grier <
> brad.gr...@salusnovus.com
> > > >wrote:
> > >
> > > > I'm trying to use a TinyMCE editor on a form (itself belonging to a
> > panel
> > > > added to a page via Ajax). The form is submitted via an AjaxButton.
> > From
> > > > other posts here and elsewhere I found I had to call
> > > > "tinyMCE.triggerSave(true,true);" before the submit to get the data
> > into
> > > the
> > > > textarea's model and then "tinyMCE.idCounter=0;" after the submit. I
> > used
> > > an
> > > > IAjaxCallDecorator to add these functions to the submit button.
> > > >
> > > > The problem is that the form only submits with every other press of
> the
> > > > button. When it fails, it looks like no script appended after the
> > > > triggerSave runs. Can anyone help me out? I'm stuck.
> > > >
> > > > Thanks,
> > > > Brad
> > >
> >
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Survey -- Tool Success Theory Empirical Study - Apache Wicket

2010-05-03 Thread Fernando Wermus
I did.
don't know if valid. sorry :)

On Mon, May 3, 2010 at 12:21 PM, Eric Reagan  wrote:

> Hello All,
> I recieved an email entitled Tool Success Theory Empirical Study -
> Apache Wicket. I was seeing if anyone else got this. Just wanted to make
> sure that the request is valid before I go and fill out the survey.
> Thanks
>
> --
> Eric Reagan
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Big Problem with TinyMCE

2010-05-03 Thread Fernando Wermus
I run into the same problem. I cant see the text written in text area. Could
show the code you have written?

thanks in advance

On Mon, May 3, 2010 at 4:04 AM, Robert Kimotho  wrote:

> On your AjaxButton add TinyMceAjaxSubmitModifier.
>
> Kimotho.
>
> On Fri, Apr 30, 2010 at 12:53 AM, Brad Grier  >wrote:
>
> > I'm trying to use a TinyMCE editor on a form (itself belonging to a panel
> > added to a page via Ajax). The form is submitted via an AjaxButton. From
> > other posts here and elsewhere I found I had to call
> > "tinyMCE.triggerSave(true,true);" before the submit to get the data into
> the
> > textarea's model and then "tinyMCE.idCounter=0;" after the submit. I used
> an
> > IAjaxCallDecorator to add these functions to the submit button.
> >
> > The problem is that the form only submits with every other press of the
> > button. When it fails, it looks like no script appended after the
> > triggerSave runs. Can anyone help me out? I'm stuck.
> >
> > Thanks,
> > Brad
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: close a modal window and setResponsePage

2010-04-29 Thread Fernando Wermus
Steve,
 Done!

On Thu, Apr 29, 2010 at 2:21 AM, Steve Swinsburg
wrote:

> Hi,
>
> close the modal, then do the setResponsePage in the window closed callback
> that you can provide.
>
> cheers,
> Steve
>
>
>
> On 29/04/2010, at 7:53 AM, Fernando Wermus wrote:
>
> > Hi all,
> >I have a modal window. There are some image avatars in it, and the
> user
> > could click on them. In case the user click it, it should close the modal
> > window an redirect to antoher page. But, I get the redirected page into
> the
> > modal window instead. I am not findind any to solution to this situation.
> > How come?
> >
> > myModalWindo.close(target);
> > getPage().setResponsePage(PaginaAmistades.class);
> >
> > ps: getPage() returns not the modal window page, but the one which is
> under.
> >
> > thanks
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
>
>
> -----
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


close a modal window and setResponsePage

2010-04-28 Thread Fernando Wermus
Hi all,
I have a modal window. There are some image avatars in it, and the user
could click on them. In case the user click it, it should close the modal
window an redirect to antoher page. But, I get the redirected page into the
modal window instead. I am not findind any to solution to this situation.
How come?

myModalWindo.close(target);
getPage().setResponsePage(PaginaAmistades.class);

ps: getPage() returns not the modal window page, but the one which is under.

thanks

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: YUI 3 anyone?

2010-04-28 Thread Fernando Wermus
+1 Jquery I mean

On Wed, Apr 28, 2010 at 10:34 AM, Fernando Wermus  wrote:

> +1
>
>
> On Tue, Apr 27, 2010 at 8:02 PM, Joe Fawzy  wrote:
>
>> Hi
>> i hope the dev team to consider jQuery , it seams it is the standard now ,
>> used by all the big companies , even microsoft
>> and although YUI is great, Yahoo has its own problem these days and we
>> cannot consider the commited to the lib, they dropped support for many of
>> their products and abandond many projects in the last 2 years
>>
>> this is my opinion only, u may make a vote or poll or something , or just
>> pick YUI
>> thanks
>> Joe
>> On Tue, Apr 27, 2010 at 6:13 PM, Jeremy Thomerson <
>> jer...@wickettraining.com
>> > wrote:
>>
>> > Yes, it's experimental, and it is not 100% decided that YUI will be
>> used.
>> >
>> > --
>> > Jeremy Thomerson
>> > http://www.wickettraining.com
>> >
>> >
>> >
>> > On Mon, Apr 26, 2010 at 6:03 AM, Ernesto Reinaldo Barreiro <
>> > reier...@gmail.com> wrote:
>> >
>> > > Isn't this an experimental branch?
>> > >
>> > > Ernesto
>> > >
>> > > On Mon, Apr 26, 2010 at 12:34 PM, danisevsky 
>> > wrote:
>> > > > I think wicket 1.5 will use YUI 3. You can look to svn:
>> > > >
>> > >
>> >
>> http://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/ajax/
>> > > >
>> > > >
>> > > > 2010/4/26 Istvan Soos 
>> > > >
>> > > >> Hi,
>> > > >>
>> > > >> Is there a cool best-practice or even better an integration library
>> to
>> > > >> use YUI 3? I know the standard generic way, I'm interested
>> > > >> specifically in YUI 3...
>> > > >>
>> > > >> Thanks,
>> > > >>   Istvan
>> > > >>
>> > > >>
>> -
>> > > >> 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
>> > >
>> > >
>> >
>>
>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: YUI 3 anyone?

2010-04-28 Thread Fernando Wermus
+1

On Tue, Apr 27, 2010 at 8:02 PM, Joe Fawzy  wrote:

> Hi
> i hope the dev team to consider jQuery , it seams it is the standard now ,
> used by all the big companies , even microsoft
> and although YUI is great, Yahoo has its own problem these days and we
> cannot consider the commited to the lib, they dropped support for many of
> their products and abandond many projects in the last 2 years
>
> this is my opinion only, u may make a vote or poll or something , or just
> pick YUI
> thanks
> Joe
> On Tue, Apr 27, 2010 at 6:13 PM, Jeremy Thomerson <
> jer...@wickettraining.com
> > wrote:
>
> > Yes, it's experimental, and it is not 100% decided that YUI will be used.
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> >
> > On Mon, Apr 26, 2010 at 6:03 AM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Isn't this an experimental branch?
> > >
> > > Ernesto
> > >
> > > On Mon, Apr 26, 2010 at 12:34 PM, danisevsky 
> > wrote:
> > > > I think wicket 1.5 will use YUI 3. You can look to svn:
> > > >
> > >
> >
> http://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/ajax/
> > > >
> > > >
> > > > 2010/4/26 Istvan Soos 
> > > >
> > > >> Hi,
> > > >>
> > > >> Is there a cool best-practice or even better an integration library
> to
> > > >> use YUI 3? I know the standard generic way, I'm interested
> > > >> specifically in YUI 3...
> > > >>
> > > >> Thanks,
> > > >>   Istvan
> > > >>
> > > >>
> -----
> > > >> 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
> > >
> > >
> >
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: How to give feedback in long-running operation within AjaxButton.onSubmit()?

2010-04-08 Thread Fernando Wermus
Does this resolve your problem?

@Override

protected IAjaxCallDecorator getAjaxCallDecorator() {

return new AjaxCallDecorator() {

private static final long serialVersionUID = 1L;

@Override

public CharSequence decorateScript(CharSequence script) {

return YOUR JAVASCRIPT + script;

}

};

}

On Thu, Apr 8, 2010 at 3:43 PM, Thomas Götz  wrote:

> Problem:
> I have an AjaxButton that triggers a long-running operation when clicked. I
> want to give feedback (in form of a javascript message) upon partial
> completion of the operation, therefore I am using a jQuery notifications
> plugin (http://www.programmingmind.com/contributions).
>
> So, what I do is the following:
>
> final Form form = new Form("form");
> add(form);
>
> form.add(new AjaxButton("button) {
>@Override
>protected void onSubmit(AjaxRequestTarget target, Form form) {
>for(Object o : someList) {
>// do somthing
>target.appendJavascript(getJavascript());
>}
>target.addComponent(form);
>}
> });
>
>
> ... but obviously, the Javascript messages are only display at the end of
> the complete operation (after foreach loop has finished). So my question:
> what should I do to get the messages displayed after each iteration?
>
>   -Tom
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


render a page for emailing and bookmarkablePageLink only rendering a partial url

2010-04-07 Thread Fernando Wermus
Hi all,
 I am using the code discused in this list for rendering email content
(see below). Despite pages are rendering nicely, I have some
BookmarkablePageLink in them which  are rendering just the the context part
of it. For instance, for link www.google.com/p1/p2, it renders just /p1/p2,
while I need the whole url because the user is reading it in his email
program. How can I instruct BookmarkablePageLink to render the whole url?

public static String renderPage(Page page) {

//get the servlet context

WebApplication application = (WebApplication) WebApplication.get();

ServletContext context = application.getServletContext();

//fake a request/response cycle

MockHttpSession servletSession = new MockHttpSession(context);

servletSession.setTemporary(true);

MockHttpServletRequest servletRequest =
newMockHttpServletRequest(application, servletSession, context);

MockHttpServletResponse servletResponse =
newMockHttpServletResponse(servletRequest);


//initialize request and response

servletRequest.initialize();

servletResponse.initialize();


WebRequest webRequest = new ServletWebRequest(servletRequest);


BufferedWebResponse webResponse =
newBufferedWebResponse(servletResponse);

webResponse.setAjax(true);


WebRequestCycle requestCycle = new WebRequestCycle(application,
webRequest, webResponse);


//requestCycle.setRequestTarget(new
BookmarkablePageRequestTarget(pageClass, pageParameters));

requestCycle.setRequestTarget(new PageRequestTarget(page));


try {

requestCycle.getProcessor().respond(requestCycle);


if (requestCycle.wasHandled() == false) {


requestCycle.setRequestTarget(newWebErrorCodeResponseTarget(HttpServletResponse.
SC_NOT_FOUND));

}

requestCycle.detach();


} catch(Exception e){

throw new WicketRuntimeException(e);

}finally {

requestCycle.getResponse().close();

}


return webResponse.toString();

}




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


method error on construction time

2010-04-06 Thread Fernando Wermus
Hi all,
I have a page when an error is thrown. This page is constructed in
MyCustomRequestCycle.onRuntimeException. This page is also use to send any
kind of message apart from errors. I add an

error("some error has occurred, please complete the form explaining what
happened ");

for error cases. But this message is not render in the page.

The cases I usually use for error messages are in the onClick and onError
methods.* But this is the first time I need an error message in construction
time. Why is not rendered?*

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: [wicket-stuff] project sitemap-xml

2010-03-25 Thread Fernando Wermus
Do you know why it is said in the page you mention, each pages should have a
different title?

On Thu, Mar 25, 2010 at 2:41 PM, Fernando Wermus
wrote:

> Take a look at Xaloon project. It has a plug in about SEO. But It is a plug
> in for Brix, I dont know much about it.
>
>
> On Thu, Mar 25, 2010 at 2:03 PM,  wrote:
>
>> I am also interested in a sitemap project.  Check out the Wiki about
>> dynamic sitemap below.  Would be nice if someone encapsulated this into a
>> project for reuse.
>>
>> http://cwiki.apache.org/WICKET/seo-search-engine-optimization.html
>>
>>
>>
>>
>> Fernando Wermus 
>> 03/25/2010 11:49 AM
>> Please respond to
>> users@wicket.apache.org
>>
>>
>> To
>> users@wicket.apache.org
>> cc
>>
>> Subject
>> [wicket-stuff] project sitemap-xml
>>
>>
>>
>>
>>
>>
>> Hi all,
>>    I need to develop sitemap for my web app. I see that there is a
>> project
>> related to this problem. Which is its situation? Does anyone know?
>>
>> thanks in advance
>>
>> --
>> Fernando Wermus.
>>
>> www.linkedin.com/in/fernandowermus
>>
>>
>>
>>
>>
>> Notice: This communication, including any attachments, is intended solely
>> for the use of the individual or entity to which it is addressed. This
>> communication may contain information that is protected from disclosure
>> under State and/or Federal law. Please notify the sender immediately if
>> you have received this communication in error and delete this email from
>> your system. If you are not the intended recipient, you are requested not
>> to disclose, copy, distribute or take any action in reliance on the
>> contents of this information.
>
>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: [wicket-stuff] project sitemap-xml

2010-03-25 Thread Fernando Wermus
Take a look at Xaloon project. It has a plug in about SEO. But It is a plug
in for Brix, I dont know much about it.

On Thu, Mar 25, 2010 at 2:03 PM,  wrote:

> I am also interested in a sitemap project.  Check out the Wiki about
> dynamic sitemap below.  Would be nice if someone encapsulated this into a
> project for reuse.
>
> http://cwiki.apache.org/WICKET/seo-search-engine-optimization.html
>
>
>
>
> Fernando Wermus 
> 03/25/2010 11:49 AM
> Please respond to
> users@wicket.apache.org
>
>
> To
> users@wicket.apache.org
> cc
>
> Subject
> [wicket-stuff] project sitemap-xml
>
>
>
>
>
>
> Hi all,
>I need to develop sitemap for my web app. I see that there is a
> project
> related to this problem. Which is its situation? Does anyone know?
>
> thanks in advance
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>
>
>
>
>
> Notice: This communication, including any attachments, is intended solely
> for the use of the individual or entity to which it is addressed. This
> communication may contain information that is protected from disclosure
> under State and/or Federal law. Please notify the sender immediately if
> you have received this communication in error and delete this email from
> your system. If you are not the intended recipient, you are requested not
> to disclose, copy, distribute or take any action in reliance on the
> contents of this information.




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


[wicket-stuff] project sitemap-xml

2010-03-25 Thread Fernando Wermus
Hi all,
I need to develop sitemap for my web app. I see that there is a project
related to this problem. Which is its situation? Does anyone know?

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Required Border...

2010-03-23 Thread Fernando Wermus
see london wicket. I dont know if it is an *, but looks nice.

On Tue, Mar 23, 2010 at 5:52 PM, James Carman wrote:

> Does anyone have a required border class (something that automatically
> puts a little red "*" next to a required field)?  I have one that I'm
> using, but it doesn't work under ajax!  When the component gets
> updated via ajax, it keeps appending little red "*"s to the markup.
> Don't get me wrong, it's quite funny, but I just don't think my users
> will get it.  I've tried using a border and I've also tried doing it
> as a behavior.  Either way I get the endless string if "*"s.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: throw new PageExpiredException("Request cannot be processed. The target page does not exist anymore.");

2010-03-23 Thread Fernando Wermus
Pedro,
 I think I got my problem.

I have a AjaxLink, BookmarkablePageLink, and the page. I would like to have
a stateful BookmarkablePageLink. This is just for not repeating code or
creating new pages. Is it possible? It seems not to be.

thanks in advance

On Tue, Mar 23, 2010 at 8:45 AM, Pedro Santos  wrote:

> Hi, give you page an constructor that your application IPageFactory know
> how
> to create. For instance, use the PageParameters. If your request cycle
> don't
> find your page in the session page map, and don't know how to create it,
> you
> got the mentioned exception.
>
> On Tue, Mar 23, 2010 at 3:44 AM, Fernando Wermus
> wrote:
>
> > Hi all,
> >I am getting this message with a page that gets some paremeters in its
> > constructor, some BookmarkablePageLink and an AjaxLink. When I pressed in
> > the AjaxLink, I got this exception. I don't understand the reason why is
> > thrown.
> >What I can guess is that there isn't any session to keep track in an
> > AjaxLink call because the page is stateless (get some parameters). Am I
> > right?
> >
> > thanks in advance
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


throw new PageExpiredException("Request cannot be processed. The target page does not exist anymore.");

2010-03-22 Thread Fernando Wermus
Hi all,
I am getting this message with a page that gets some paremeters in its
constructor, some BookmarkablePageLink and an AjaxLink. When I pressed in
the AjaxLink, I got this exception. I don't understand the reason why is
thrown.
What I can guess is that there isn't any session to keep track in an
AjaxLink call because the page is stateless (get some parameters). Am I
right?

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Is it possible to have an AjaxLink to pass parameters as BookmarkableLinkPage class does?

2010-03-22 Thread Fernando Wermus
Hi all,
I can pass a parameter in a BookmarkablePage to the page called. But, I
think I cannot do the same with a page and an AjaxLink.

*Use case to solve*

There is a Link instance that reference to a page that renders an entity.
This entity is loaded getting the entity id from the page parameter.

This situation is repeated in an AjaxLink + Page that renders this entity.

*Problem*

If the ajax link is in a stateless page, for instance a page that receives
parameters; I got an expired session.


I would like to solve this use case with ajax and without ajax with the same
design, but I cant. This is because of reusing panel or components needs.


The only way to solve this is instead of using parameters, using the session
to store the entity. But the thing I dislike is that this entity live in the
request scope attribute. No longer.


Am I missing something?




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Registering a Wicket Application using OSGi HTTP service

2010-03-18 Thread Fernando Wermus
Take a look at Antilia

http://code.google.com/p/antilia/

On Thu, Mar 18, 2010 at 12:01 PM, Jaime Soriano Pastor <
jsorianopas...@gmail.com> wrote:

> Hello,
>
> I'm trying to start a Wicket Application using Felix implementation of
> OSGi HTTP service, for that I just register the service using
> WicketServlet with applicationClassName parameter set to the main
> application class name:
>
> props.put("applicationClassName", MainApplication.class.getName());
> service = (HttpService)context.getService(httpReference);
> service.registerServlet("/", new WicketServlet(), props, null);
>
> But it fails to register saying that wicket is "Unable to create
> application of class es.warp.sample.HTTPLocalGUI.MainApplication".
> The output error also includes some lines about class loader so I
> thought it was something related with visibility. I tried to export
> everything but I had the same failure.
> 
> 
> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:247)
> 
> 
>
> I use for deployment maven and pax runner with Felix framework (mvn
> package install pax:run -Dframework=felix -Dprofiles=log,config).
> If I use equinox instead of felix, the application is registered and
> works perfectly, it's ok for development, but I need it working on
> felix for production deployment.
>
> I'm thinking that I'm not doing it on the right way, but I don't know
> how to do it. I also tried to publish the servlet using Felix
> Whiteboard service, and I had the same results, it worked when I used
> equinox and it didn't work when I used felix.
>
> What am I doing wrong?
>
>
> Regards,
>
> Jaime.
>
> -----
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: using IBehaviorListener

2010-03-18 Thread Fernando Wermus
Martin,
 You can have any container, such as a Panel, into de Modal Window. You
can program as you have always done with Wicket. No need of IBehaviorListener.
The close button has its corresponding programming design. Take a look at
the modal window documentation in the web.



On Thu, Mar 18, 2010 at 12:27 PM, Martin Asenov  wrote:

> Please, any help?!
>
> Best,
> Martin
>
> -Original Message-
> From: Martin Asenov [mailto:mase...@velti.com]
> Sent: Thursday, March 18, 2010 1:11 PM
> To: users@wicket.apache.org
> Subject: using IBehaviorListener
>
> Hello, guys!
>
> I'm experiencing troubles with implementing IBehaviorListener on a
> ModalWindow.
>
> I want to detect every single user interaction with to components inside
> the modal window and the close button itself , as well.
>
> Would you give me some hints?
>
> Best,
> Martin
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: A web site developed with Wicket

2010-03-17 Thread Fernando Wermus
It works great and look fine in safari

On Wed, Mar 17, 2010 at 9:46 PM, Daniel Toffetti wrote:

> voltron  yahoo.com> writes:
> > Hello,
> >
> > http://www.nofailtime.com/appmonitor is a web application
> > developed with wicket framework.
> >
> > .
> >
> > I would be happy if you try the site and give feedback. You
> > can login the site with account;
> > username = demo
> > password = demo
> >
> > Thanks,
>
> It looks great, I like specially the menu. Some panels (Login,
> Subscription
> Update) seem to be somewhat to the right of the screen, it would be better
> if
> they were centered.
>And I get a 1 centimeter wide vertical padding both to the left and to
> the
> right, don't know if this is intentional, it doesn't look good but perhaps
> it's
> just me.
>Could not crash it yet, tested with Firefox 3.6 / Windows XP on a 17"
> CRT
> (non-wide format).
>
> Cheers,
>
> Daniel
>
>
>
> -----
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


wicket and shiro

2010-03-16 Thread Fernando Wermus
I am setting up shiro authentication and wicket, without any
authorizationStrategy yet. I got the following message,

org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager
accessible to the calling code, either bound to the
org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an
invalid application configuration.
at org.apache.shiro.SecurityUtils.getSecurityManager(SecurityUtils.java:116)
at org.apache.shiro.subject.Subject$Builder.(Subject.java:565)
at org.apache.shiro.SecurityUtils.getSubject(SecurityUtils.java:57)

I have declared shiro filter into my web.xml and I can see that MyRealm
class is intanceated. But I dont see SessionSecurity instanciated at all.





ShiroFilter

org.apache.shiro.web.servlet.ShiroFilter



   config

   

 [main]

 stupidRealm = com.misPartidos.web.MyRealm

   





I am not using spring as an the example showed, neither wicket-shiro
project, do I?

Thanks in advance
-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Resource authorisation scenario: dealing with non-application wide permissions

2010-03-15 Thread Fernando Wermus
Danielle,
 I run out into the same problem. Did you solve it? if so, how?

thanks in advance

On Thu, Feb 11, 2010 at 11:50 PM, Daniele Dellafiore wrote:

> Hi.
>
> Imagine this scenario: a webapp that allows creation of groups of people.
> There is the owner, the administrator and the normal user for every group.
> Like google groups, yahoo groups, facebook groups, a chat... a lot of
> examples :)
>
> If we define permission as string concatenation, I can have "group:delete"
> as permission.
> In this scenario the permission is not application wide, but "group
> specific". Is related to the entity of my domain: Group.
>
> Unfortunately I have no idea how to solve my problem in AuthStrategy, where
> I can just access the user, not his particular Role in the specific group
> of
> my webapp, I do not have enough information. I can't know in
> isActionAuthorized method what is the group to ask authorization access for
> "group.delete" permission.
> If I know which is the group (domain entity) I can ask the user for the
> role
> he has in the group, and see if it's role has "group.delete" permission.
> Or any similar implementation, the point is that I miss an information.
>
> What can be a nice way to solve this problem with Wicket
> AuthorizationStrategy?
>
> I have just read a recent article about how to integrate shiro and wicket:
> http://blog.tauren.com/2010/01/using-wicket-with-shiro-for.html
>
> My point with that solution is that as far as I know, overriding
> isVisible()
> is a discouraged practice. More over, the visibility control for
> authorisation access has better room in the AuthorizationStrategy and if I
> remember fine, what change is the isVisibilityAllowed().
>
> I can just figure out to to put that information (the role of the subject
> in
> the group) in the Action, but I have to learn how. Do you think should be a
> nice idea? Or maybe I am making my life harder for nothing and setting
> visibilityAllowed (or even override that method) would be fine enough?
>
> I think I can save a lot of "ifs" or a lot of override if I Can figure out
> a
> way to implement it the way I described.
>
> I will sleep on this :)
>
> --
> Daniele Dellafiore
> http://danieledellafiore.net
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: modal window problem

2010-03-11 Thread Fernando Wermus
The link is no more functional. Could you show the code?

On Thu, Mar 11, 2010 at 5:55 AM, Martin Asenov  wrote:

> Please, anyone give some support on this one?
>
> Thank you,
> Martin
>
> -Original Message-
> From: Martin Asenov [mailto:mase...@velti.com]
> Sent: Monday, March 08, 2010 6:23 PM
> To: users@wicket.apache.org
> Subject: RE: modal window problem
>
> Hi, Matthias!
>
> Well, I viewed the page source, and there is no text that says "http://:/";
> . However, this happens only on two PCs from 10. Also, I typed on the one of
> the computers that have this error the above mentioned text in the browser
> and it led to the very same page with the very same parameters. Do you have
> any further ideas?
>
> Thanks,
> Martin
>
> -Original Message-
> From: Matthias Keller [mailto:matthias.kel...@ergon.ch]
> Sent: Monday, March 08, 2010 6:10 PM
> To: users@wicket.apache.org
> Subject: Re: modal window problem
>
> On 2010-03-08 17:07, Martin Asenov wrote:
> > It's me again. I just noticed some very strange error that I have no
> explanation about. When I open a wicket modal window then it appears for a
> while and closes and the entire page gets redirected to some browser related
> pages, for instance ask.com, or some thing like this:
> >
> >
> http://www.mybrowserbar.com/cgi/errors.cgi?q=http%3A%2F%2F%3A%2F&type=dns&ISN=29A2367D3BED40D7A5BA3349E8CAA9FD&ccv=130&cnid=374563&cco=US&ct=12
> >
> > This is a modal window issue. Any help regarding the question will be
> highly appreciated!
> >
> Hi
>
> It appears that something on your page/modal window is referencing an
> URL "http://:/"; (or maybe just ":/") so your browser bar takes over
> control since that host cannot be found. Maybe check the source of that
> page for such an URL...
>
> Matt
>
>
> -
> 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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: possible bug in ComponentFeedBackPanel

2010-03-10 Thread Fernando Wermus
Martijn,

I am recreating the components as you mentioned. But there is a line
which I dont understand in Objects.equals,

 if ((a != null) && (b != null) && a.equals(b))

I look for the implementation of equals in class Component and other classes
 and I havent found any. Then this is equivalent to do a==b.

Just for curiosity,
Are there any component which has an implementation of equals?
and,
why is not enought to compare id between components in
ComponentFeedbackMessageFilter.accept
instead of Objects.equals? Because I think I cant have more than a component
with the same id in same container.

thanks


On Wed, Mar 10, 2010 at 2:09 PM, Martijn Dashorst <
martijn.dasho...@gmail.com> wrote:

> Probably you are not refreshing the component but rather recreating
> it. Hence the different eclipse debugger id's. If this is inside a
> listview, setReuseItems(true)
>
> This behavior is most certainly not a bug in the Objects.equals().
>
> Martijn
>
> On Wed, Mar 10, 2010 at 5:03 PM, Fernando Wermus
>  wrote:
> > ComponentFeedBackPanel called to
> org.apache.wicket.util.lang.Objects.equals
> > to decide if there is a error message to show.
> >
> > The implementation of this method is the following,
> >
> > if (a == b)
> >
> > {
> >
> > return true;
> >
> > }
> >
> >
> >  if ((a != null) && (b != null) && a.equals(b))
> >
> > {
> >
> > return true;
> >
> > }
> >
> >
> >  return false;
> >
> >
> > For instance,
> >
> >
> > a is
> >
> > [MarkupContainer [Component id = date]]
> >
> > and in eclipse variables appears as [DateTextField id=460]
> >
> >
> > while
> >
> >
> > b is
> >
> > [MarkupContainer [Component id = date]]
> >
> > and in eclipse variables appears as [DateTextField id=463]
> >
> > then this is returing false. This behavior only happens if the
> > ComponentFeedBackPanel
> > *is refreshed by ajax. ** *
> >
> >
> > I develop another class to test if I was misunderstanding the problem,
> but
> > it worked:
> >
> >
> > package com.misPartidos.web.eventos.paneles;
> >
> >
> > import org.apache.wicket.Component;
> >
> > import org.apache.wicket.feedback.FeedbackMessage;
> >
> > import org.apache.wicket.feedback.IFeedbackMessageFilter;
> >
> > import org.apache.wicket.markup.html.panel.FeedbackPanel;
> >
> >
> > public class MyComponentFeedbackPanel extends FeedbackPanel {
> >
> >
> >  private static final long serialVersionUID = 1080609018238015083L;
> >
> >
> >  public MyComponentFeedbackPanel(String id, final Component filter) {
> >
> > super(id);
> >
> > setFilter(new IFeedbackMessageFilter(){
> >
> > private static final long serialVersionUID = 3610826326194213455L;
> >
> >
> >  @Override
> >
> > public boolean accept(FeedbackMessage message) {
> >
> > final Component a=filter;
> >
> > final Component b=message.getReporter();
> >
> > if (a == b)
> >
> > {
> >
> > return true;
> >
> > }
> >
> >  if ((a!= null) && (b != null) && *a.getId().equals(b.getId()))*
> >
> > {
> >
> > return true;
> >
> > }
> >
> >
> >  return false;
> >
> > }
> >
> >  });
> >
> > }
> >
> >
> > }
> >
> > I am just testing ids between a and b.
> >
> > Does anyone has expirienced this wrong behavior with
> ComponentFeedBackPanel
> > in an ajax refreshed?
> >
> > thanks in advance.
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.4 increases type safety for web applications
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


possible bug in ComponentFeedBackPanel

2010-03-10 Thread Fernando Wermus
ComponentFeedBackPanel called to org.apache.wicket.util.lang.Objects.equals
to decide if there is a error message to show.

The implementation of this method is the following,

if (a == b)

{

return true;

}


 if ((a != null) && (b != null) && a.equals(b))

{

return true;

}


 return false;


For instance,


a is

[MarkupContainer [Component id = date]]

and in eclipse variables appears as [DateTextField id=460]


while


b is

[MarkupContainer [Component id = date]]

and in eclipse variables appears as [DateTextField id=463]

then this is returing false. This behavior only happens if the
ComponentFeedBackPanel
*is refreshed by ajax. ** *


I develop another class to test if I was misunderstanding the problem, but
it worked:


package com.misPartidos.web.eventos.paneles;


import org.apache.wicket.Component;

import org.apache.wicket.feedback.FeedbackMessage;

import org.apache.wicket.feedback.IFeedbackMessageFilter;

import org.apache.wicket.markup.html.panel.FeedbackPanel;


public class MyComponentFeedbackPanel extends FeedbackPanel {


 private static final long serialVersionUID = 1080609018238015083L;


 public MyComponentFeedbackPanel(String id, final Component filter) {

super(id);

setFilter(new IFeedbackMessageFilter(){

private static final long serialVersionUID = 3610826326194213455L;


 @Override

public boolean accept(FeedbackMessage message) {

final Component a=filter;

final Component b=message.getReporter();

if (a == b)

{

return true;

}

 if ((a!= null) && (b != null) && *a.getId().equals(b.getId()))*

{

return true;

}


 return false;

}

 });

}


}

I am just testing ids between a and b.

Does anyone has expirienced this wrong behavior with ComponentFeedBackPanel
in an ajax refreshed?

thanks in advance.


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


spanish wicket group is going to organize its first wicket meeting at Buenos Aires, Argentina in saturday march 6th

2010-03-01 Thread Fernando Wermus
Hi all,
 I am one of the administrator of wicket...@googlegroups.com which
is a group related to Wicket in spanish. We will have our first meeting in
Buenos Aires, Argentina in saturday march 6th. This meeting is aimed to
prepare a public wicket meeting where we can promote the framework. For more
information, you are welcomed to join to wicket-es and send us an email.

thanks

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


modal window and changing content

2010-02-07 Thread Fernando Wermus
Hi all,
I have a problem using one modal window with several links which change
the modal window content. Despite I do change window modal content panel for
another panel before showing it, the modal window shows blank. I was trying
to reproduce this behavior in a quick start without luck. I can confirm that
the html is being replacing according to Wicket Ajax Debug.

Any help I will really appreciate it.

*INFO:*
*INFO: *
Initiating Ajax GET request on
?x=6*:1:vsContenido:showedView:moduloInscriptosEquipoA:menu:tabs-container:tabs:0:link:2:IBehaviorListener:0:&random=0.6642544791102409
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (3117 characters)
*INFO: *

*INFO: *Response parsed. Now invoking steps...
*INFO: *Response processed successfully.
*INFO: *Invoking post-call handler(s)...
*INFO: *refocus last focused component not needed/allowed
-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: How to change content in ModalWindow

2010-02-07 Thread Fernando Wermus
In my case, I do activate the modalWindow doing,

modalWindow.show

but It seems to have the same problem.

On Sun, Feb 7, 2010 at 11:22 PM, Fernando Wermus
wrote:

> Chris,
>  I have the same problem when switching content into a modal window. It
> appears a modal window blank content too. Do you have solved it?
>
> thanks in advance.
>
> On Mon, Jan 25, 2010 at 3:03 PM, Chris Colman <
> chr...@stepaheadsoftware.com> wrote:
>
>> My use case might explain the situation better:
>>
>> User visits a page that needs authentication. A ModalWindow appears with
>> a username/password field pair and a 'sign in' button. In case they are
>> a new user it also contains a 'create account' button. If they click
>> this then the contents of the ModalWindow changes to hold more fields,
>> name, email, password, confirm password etc., sufficient to creating a
>> new account. I wanted to do a nice smooth switch from the 'sign in'
>> presentation to the 'create account' presentation without the flicker of
>> closing the form and bringing up a new form.
>>
>>
>> > -Original Message-
>> > From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
>> > Sent: Tuesday, 26 January 2010 3:58 AM
>> > To: users@wicket.apache.org
>> > Subject: RE: How to change content in ModalWindow
>> >
>> > I tried that initially but calling modalContentWindow.show when there
>> > already is a ModalWindow being displayed creates a new ModalWindow
>> that
>> > sits over the top of the original one meaning I now have 2 windows
>> that
>> > the user has to close.
>> >
>> > My aim is to have only one ModalWindow but just switch its contents.
>> >
>> > > Aren't you missing a :
>> > >
>> > > modalContentWindow.show(target)
>> > >
>> > > in the onClick callback ?
>> > >
>> > > 2010/1/25 Chris Colman 
>> > >
>> > > > Searching Nable shows this question has been asked before but
>> there
>> > none
>> > > > of the solutions proposed there work for me.
>> > > >
>> > > > I have a link in PanelA that, when clicked, should cause PanelB to
>> > > > display in the same ModalWindow (PanelB replaced PanelA).
>> > > >
>> > > > The onClick event handler does something like the following:
>> > > >
>> > > >add
>> > > >(
>> > > >new AjaxLink("selectionLink")
>> > > >{
>> > > >public void onClick(AjaxRequestTarget target)
>> > > >{
>> > > >PanelB panelB = new
>> > > >PanelB(modalContentWindow.getContentId());
>> > > >
>> > > >modalContentWindow.setContent(panelB);
>> > > >modalContentWindow.setTitle("Hi, I'm PanelB");
>> > > >target.addComponent(panelB);
>> > > >}
>> > > >}
>> > > >);
>> > > >
>> > > > When the link is pressed the panel A content disappears (popup
>> > content
>> > > > goes blank) but the panel B content does not appear.
>> > > >
>> > > > Should this work or have I missed something?
>> > > >
>> > > >
>> > -
>> > > > 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
>>
>>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: How to change content in ModalWindow

2010-02-07 Thread Fernando Wermus
Chris,
 I have the same problem when switching content into a modal window. It
appears a modal window blank content too. Do you have solved it?

thanks in advance.

On Mon, Jan 25, 2010 at 3:03 PM, Chris Colman
wrote:

> My use case might explain the situation better:
>
> User visits a page that needs authentication. A ModalWindow appears with
> a username/password field pair and a 'sign in' button. In case they are
> a new user it also contains a 'create account' button. If they click
> this then the contents of the ModalWindow changes to hold more fields,
> name, email, password, confirm password etc., sufficient to creating a
> new account. I wanted to do a nice smooth switch from the 'sign in'
> presentation to the 'create account' presentation without the flicker of
> closing the form and bringing up a new form.
>
>
> > -Original Message-
> > From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
> > Sent: Tuesday, 26 January 2010 3:58 AM
> > To: users@wicket.apache.org
> > Subject: RE: How to change content in ModalWindow
> >
> > I tried that initially but calling modalContentWindow.show when there
> > already is a ModalWindow being displayed creates a new ModalWindow
> that
> > sits over the top of the original one meaning I now have 2 windows
> that
> > the user has to close.
> >
> > My aim is to have only one ModalWindow but just switch its contents.
> >
> > > Aren't you missing a :
> > >
> > > modalContentWindow.show(target)
> > >
> > > in the onClick callback ?
> > >
> > > 2010/1/25 Chris Colman 
> > >
> > > > Searching Nable shows this question has been asked before but
> there
> > none
> > > > of the solutions proposed there work for me.
> > > >
> > > > I have a link in PanelA that, when clicked, should cause PanelB to
> > > > display in the same ModalWindow (PanelB replaced PanelA).
> > > >
> > > > The onClick event handler does something like the following:
> > > >
> > > >add
> > > >(
> > > >new AjaxLink("selectionLink")
> > > >{
> > > >public void onClick(AjaxRequestTarget target)
> > > >{
> > > >PanelB panelB = new
> > > >PanelB(modalContentWindow.getContentId());
> > > >
> > > >modalContentWindow.setContent(panelB);
> > > >modalContentWindow.setTitle("Hi, I'm PanelB");
> > > >target.addComponent(panelB);
> > > >}
> > > >}
> > > >);
> > > >
> > > > When the link is pressed the panel A content disappears (popup
> > content
> > > > goes blank) but the panel B content does not appear.
> > > >
> > > > Should this work or have I missed something?
> > > >
> > > >
> > -----
> > > > 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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


  1   2   3   >