Re: Where to download Javadoc for Wicket 8.x?

2020-03-02 Thread SB
Okay, I figured it out:

1. Download the Apache Wicket source code from
https://wicket.apache.org/start/wicket-8.x.html
2. Unzip the downloaded file.
3. To generate Javadocs, run `mvn javadoc:aggregate` at the root of the
source code.
4. The generated Javadocs can then be found in the `./target/site/apidocs/`
directory.

On Mon, Mar 2, 2020 at 8:01 AM SB  wrote:

> I usually work offline, and I need to refer to the Javadocs. Is there a
> place where I can download Wicket's Javadocs for offline use?
>


Re: Where to download Javadoc for Wicket 8.x?

2020-03-02 Thread SB
> ... plug in the libraries with maven together with the source option ...

Sorry, I don't understand. Could you explain what you mean by this?


On Mon, Mar 2, 2020 at 11:35 AM Martin Terra <
martin.te...@koodaripalvelut.com> wrote:

> I would recommend to plug in the libraries with maven together with the
> source option, this way you have both the wicket source code and the
> javadoc.
>
> **
> Martin
>
> ma 2. maalisk. 2020 klo 2.01 SB (progscriptcl...@gmail.com) kirjoitti:
>
> > I usually work offline, and I need to refer to the Javadocs. Is there a
> > place where I can download Wicket's Javadocs for offline use?
> >
>


Where to download Javadoc for Wicket 8.x?

2020-03-01 Thread SB
I usually work offline, and I need to refer to the Javadocs. Is there a
place where I can download Wicket's Javadocs for offline use?


Page State not updated via call back from IFrame // AjaxRequestTarget

2012-07-24 Thread sb
Hi, 

I'm writing a component that uploads an image file and then updates a list
(ArrayList) of image files in the containing page.

The UploadImageComponent is implemented with an IFrame which contains the
form that actually uploads the Image File and then calls back to the
UploadImageComponent to indicate when the ImageFile has been uploaded and
saved successfully.

When the IFrame reloads having successfully uploaded the image it then then
calls back again to the UploadImageComponent with an AjaxRequestTarget this
then calls the containing Page which updates the List of ImageFiles that
have been added.

The problem that I'm having is that every time the UploadImageComponent
calls the imageUploaded(ImageFile) call back in containing Page which adds
the ImageFile to an internal List, the List is empty and in fact a different
List (I checked this by calling System.identityHashCode(imageFileList)),
even if I've previously uploaded an ImageFile.  

I'm not sure why this is, I think it might be something to do with marking
the page as Dirty and Page versioning and the way that wicket serializes the
versions of a page.  

Has anyone had a similar problem, I think the issue is that I don't fully
understand the nature of Pages and Page versioning, Page Serialization etc

Any suggestions very welcome.

Simon




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Page-State-not-updated-via-call-back-from-IFrame-AjaxRequestTarget-tp4650753.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: Mapping different paths to the same page and updating session Locale

2012-04-23 Thread sb
Hi Martin, 

Thank you very much for your reply, you definitely pointed me in the right
direction!

In case anyone else is looking at this in the future, the code for the
overriden methods ended up as follows:

 CODE START 
...
   @Override
   public Url mapHandler(IRequestHandler _requestHandler) {
  Url url;
  if (requestPathMatches(RequestCycle.get().getRequest())) {
 url = super.mapHandler(_requestHandler);
  } else {
 url = null;
  }
 
  return url;
   }

   @Override
   public IRequestHandler mapRequest(Request _request) {
  IRequestHandler requestHandler;
  if (requestPathMatches(_request)) {

 // set the Locale
 Session session = Session.get();
 session.setLocale(locale);

 requestHandler = super.mapRequest(_request);

  } else {
 requestHandler = null;
  }

  return requestHandler;
   }

   private boolean requestPathMatches(Request _request) {
  boolean retVal = path.equals(_request.getUrl().getPath());
   }
...
 CODE END 

Cheers

Simon


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mapping-different-paths-to-the-same-page-and-updating-session-Locale-tp4580714p4581761.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



Mapping different paths to the same page and updating session Locale

2012-04-23 Thread sb
Hi, 

I'm new to wicket I'm trying to map two different paths like

/first.html

/primero.html

to the same page and depending on the mount used the Locale should be set so
that the site is internationalized.

I've overriden MountedMapper with the following: 
 CODE START 
import org.apache.wicket.Session;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.request.IRequestHandler;
import org.apache.wicket.request.Request;
import org.apache.wicket.request.mapper.MountedMapper;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Locale;

public class LocalizedMountedMapper extends MountedMapper {
   private static final Logger log =
LoggerFactory.getLogger(LocalizedMountedMapper.class);
   private final Locale locale;

   public LocalizedMountedMapper(String _path, Class
_page, Locale _locale) {
  super(_path, _page);
  this.locale = _locale;
   }

   public IRequestHandler mapRequest(Request _request) {
  // RequestCycle#getSession no longer seems to work or even be there.
  Session session = Session.get();
  session.setLocale(locale);
  log.debug("setting locale: " + locale + " / " +
_request.getContextPath());
  return super.mapRequest(_request);
   }
}
 CODE END 

Then in the application class I add the following to the init method

 CODE START 
mount(new LocalizedMountedMapper("/first.html", HomePage.class, 
Constants.LOCALE_en));

mount(new LocalizedMountedMapper("/primero.html", HomePage.class, 
Constants.LOCALE_es_AR));
 CODE END 

But this does not seem to work.  When I point my browser at
http://localhost:8080/first.html the browser redirects to
http://localhost:8080/primero.html
 
and the output of the logging is the following: 

DEBUG - LocalizedMountedMapper - setting locale: en / en_US /  / 
DEBUG - LocalizedMountedMapper - setting locale: es_AR / en_US /  / 

Does anyone have suggestions about why it doesn't work as I expect it to and
how to correct it.  Or any suggestions about a better way to achieve this
functionality.

Cheers
Simon

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mapping-different-paths-to-the-same-page-and-updating-session-Locale-tp4580714p4580714.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: How to include a link to a css file not in classpath (not in WEB-INF)

2012-03-10 Thread sb
Hi, 

I'm pretty new to Wicket but I had a similar problem and did the following: 

In your Application subclass

@Override
public void init() {
   ...
   getSharedResources().add("cssheader", new
ContextRelativeResource("/css/header.css"));
   ...
}

then in your component // behavior or whatever use a SharedResourceReference
with the key you added the ContextRelativeResource with.
e.g.
@Override
public void renderHead(Component component, IHeaderResponse response) {
   response.renderCSSReference(new SharedResource("cssheader"));
} 
in the rendered page your resource won't be rendered as "/css/header.css"
but as something like : 



But it will point to the correct file.

Like I said I'm just beginning to use the Wicket framework so if someone
else knows a better way or my way is flawed please correct me.

Cheers
Simon




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-include-a-link-to-a-css-file-not-in-classpath-not-in-WEB-INF-tp4459528p4462155.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