Search Results

Search found 5 results on 1 pages for 'vagabond'.

Page 1/1 | 1 

  • How do you set a custom session when unit testing with wicket?

    - by vagabond
    I'm trying to run some unit tests on a wicket page that only allows access after you've logged in. In my JUnit test I cannot start the page or render it without setting the session. How do you set the session? I'm having problems finding any documentation on how to do this. WicketTester tester = new WicketTester(new MyApp()); ((MyCustomSession)tester.getWicketSession()).setItem(MyFactory.getItem("abc")); //Fails to start below, no session seems to be set tester.startPage(General.class); tester.assertRenderedPage(General.class);

    Read the article

  • How to take a screenshot with Mono C#?

    - by vagabond
    I'm trying to use use code get a screenshot in Mono C# but I'm getting a System.NotImplementedException when I call CopyFromScreen. My code works with .NET, so is there an alternate way of getting a screenshot using Mono? Bitmap bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); Graphics graphics = Graphics.FromImage(bitmap as Image); graphics.CopyFromScreen(0, 0, 0, 0, bitmap.Size); System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(); bitmap.Save(memoryStream, imageFormat); bitmap.Save(@"\tmp\screenshot.png", ImageFormat.Png); I am using Mono JIT compiler version 2.4.2.3 (Debian 2.4.2.3+dfsg-2)

    Read the article

  • Set focus on a component with Apache Wicket?

    - by vagabond
    How do you set focus on a component with Apache Wicket? Searching leads to very little information, mostly on setting the default field. I do not want to set a default field, rather I am looking to set focus when, for example, a specific radio button is selected.

    Read the article

  • How to paginate Django with other get variables?

    - by vagabond
    I am having problems using pagination in Django. Take the URL below as an example: http://127.0.0.1:8000/users/?sort=first_name On this page I sort a list of users by their first_name. Without a sort GET variable it defaults to sort by id. Now if I click the next link I expect the following URL: http://127.0.0.1:8000/users/?sort=first_name&page=2 Instead I lose all get variables and end up with http://127.0.0.1:8000/users/?page=2 This is a problem because the second page is sorted by id instead of first_name. If I use request.get_full_path I will eventually end up with an ugly URL: http://127.0.0.1:8000/users/?sort=first_name&page=2&page=3&page=4 What is the solution? Is there a way to access the GET variables on the template and replace the value for the page? I am using pagination as described in Django's documentation and my preference is to keep using it. The template code I am using is similar to this: {% if contacts.has_next %} <a href="?page={{ contacts.next_page_number }}">next</a> {% endif %}

    Read the article

  • RadioGroup getValue does not return correct slected value

    - by vagabond
    I'm running into a small issue with RadioGroup. My RadioGroup has possible values, true and false. The Radio types I have in my radiogroup use a Model that stores true or false. On an ajax onchange event I want to do some handling, and to do so I need to know the selected radio in my radiogroup and another identical radiogroup. The problem is getValue() only returns the initial value from my Pojo. Whenver I click on a radio button to change the selected Radio getValue() still returns the initial value. When I save my changes, my Pojo gets the correct value. I am finding this bizarre and have spent hours trying to figure our what I'm missing.

    Read the article

1