Measure once, login twice?

2010-11-15 Thread Ivana

I have a problem with authentication on tomcat. I use
RoleAuthorizationStrategy and formbased container managed authentication.
What happens is that tomcat always asks the user to authenticate twice. 

I have looked into it a little further and essentially the first login is
the wicket login and the second is when tomcat is happy the user has access.
Wicket ignores the second login.

Here is a snippet from my web.xml:


images and css

images and css
/css/*
/images/*




security constraint

all resources
/*



Admins, users and internal users, see 
RTROLES

ADMIN
USER
INTERNAL



If i remove the security contstraint where i give the world access to the
css & images folders i do not only lose the formatting on the login-form but
also on the app. But only untill the user logs in the second time, when the
stylesheets become accesible.

I can use the credentials of any user for the second login, Wicket will
ignore them and i remain logged in as the original user. 

Am i missing something obvious?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Measure-once-login-twice-tp3042978p3042978.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: Wicket-auth annotations to hide a link problem

2010-11-03 Thread Ivana

I just found this works - but has other problems:

I have a page with a menu made of links. The links replace the main panel
the user is looking at. Depending on user role, some panels are not
available and the corresponding links are not shown.

I have implemented this like this:
@AuthorizeAction(action = Action.RENDER, roles = { Roles.internal })
class InternalAjaxReplacementLink extends AjaxFallbackLink{
... replace panel, change/append css styles
}

@AuthorizeAction(action = Action.RENDER, roles = {Roles.public,
Roles.internal })
class PublicAjaxReplacementLink extends AjaxFallbackLink{
... replace panel, change/append css styles
}On my page i add the links, according to which users should have access to
which resources - and this works.
A user that has only the 'public' role sees only the links leading to public
resources, internal users see more resources. 


Except: the welcome panel is accesible to both 'internal' and 'public'
user-roles. When 'internal' users click an InternalAjaxReplacementLink, the
container asks them to authenticate again before they can continue. Nothing
happens with this new login: i have tried loggin in as a different
authorized user and the original credentials are not overwritten.  What is
going on?

I'm using tomcat form based security while developing. I intend to replace
this in the near future with spring security.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-auth-annotations-to-hide-a-link-problem-tp2542360p3025671.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



flot and IE7

2010-11-02 Thread Ivana

I would very much like to know why IE chooses to show me the javascript
instead letting it draw the chart.

It has the canvas element in one FlotPanel (not in the second?!) but it is
completely empty. The second FlotPanel has no canvas and simply shows the
underlying javascript. Sigh.





-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/flot-examples-tp3013635p3023806.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: flot examples

2010-11-02 Thread Ivana

Hi Misha,
The short answer is no, you cannot use more then one FlotPanel on a page.
Referencing and sizing problems prevent the current implementation from
showing more then one graph. But you can roll your own, and make it so you
can have as many as you like. 

FlotPanel combines the script and drawing area. In theory each panel should
be painted by its own script but the use of constants and global variables
(i think, dont know much about javascript) prevents this.
The variable declarations in the script (FlotPanel.js) file look like this:
 
var flotTarget = $("#FlotPanel_drawingArea");
var flotData = %s;
var flotOptions = %s;
var showTooltip = %s;

Notice that the drawing area id is hardcoded. 

Just to see if it would work, i cobbled together a new implementation where
the js looks like this:

var %1$s = $("#%2$s");
var %3$s = %4$s;
var %5$s = %6$s;
var %7$s = %8$s;
... and so on in the rest of the script

Then, i changed FlotPanel.java, using unique variable names in
getFlotScript():

Object[] input = new Object[] {id+"_target", id+"_drawingArea", id+"_data",
strData, id+"_options", strOptions, id+"_toolTips", (showTooltip ? "true" :
"false")};
return String.format(str, input);

Where id is the wicket id.

Also, i needed to add a unique id to the drawing area, i did this in the
constructor:

WebComponent wc = new WebComponent("drawingArea") {};
wc.add(new AttributeAppender("id", true, new
Model(id+"_drawingArea"), " "));

Dont forget to remove the id from the original element in FlotPanel.html and
add the wicket id and a class:
(You will notice that in the original FlotPanel style file (FlotPanel.css)
the drawingarea is referenced by id, i reference it by class)




Finally i adjusted the size in the css like this, where "graphics" is the
class i put on the FlotPanels i added to my page:

.graphics {
float: left;
width: 600px;
height: 300px;
}

.FlotPanel {
position: absolute;
overflow: hidden;
width: 40%;
height: 40%;

I think the whole FlotPanel needs thorough refactoring by someone who knows
their way around javascript and css, ie not me.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/flot-examples-tp3013635p3023780.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: flot examples

2010-11-01 Thread Ivana

Thanks, i'm looking at the examples and i'll get back to you if i figure out
how to get multiple graphs on one page.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/flot-examples-tp3013635p3021887.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



flot examples

2010-10-26 Thread Ivana

Hi,
Is anyone using Flot from Wicketstuff? Im looking for a simple example to
get me started. 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/flot-examples-tp3013635p3013635.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



calculated columns in a pivot table

2010-10-08 Thread Ivana Cace
Hi list,
This isnt so much a question, it's more that i'd like to hear your
thoughts on the following.
I'm making an webapp that shows a number of pivot tables or
crosstables. Most repeaters are made for showing a list of objects,
where each row is one object. While in a crosstab there is no
connection between the values in one row except that they have the
same y-coordinate.
So to make things easier for myself and to have the webcomponents
better reflect the nature of my data, i have used Loop() drawing on
this: 
https://cwiki.apache.org/WICKET/how-to-work-with-excel-in-wicket-using-jexcel-api.html.
The object that holds my data has methods to add a value (put(Pair
coordinates, Number value)), to retrieve a value given the coordinates
and to get the domain (= the rows and columns or distinct x and y
values if you will).

So now in addition to the raw data i want some tables to show totals,
averages, and some other computed columns.
I'm wondering what would be a good place to do this. Add them to the
modelobject (the dataobject) in the panel that shows the table? Only
add the extra columns to the table? I'm thinking that in the future i
might give users the option to show or hide these computed columns.

cheers

Ivana

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



DatePicker NaN

2007-09-18 Thread Ivana Cace

Hi
I have a problem with the DatePicker. It works fine if the input is a 
valid date or if the input is very wrong, for example: ''xxx".
But when the input consists of numbers and but is not a valid date, the 
calendar is rendered with NaN in every field.

I'm guessing this is a bug somewhere in the JS, or is it intentional?






--
Ivana Cace
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


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



Wizards FeedbackPanel

2007-08-30 Thread ivana

Is there a way to remove/turn off Wizard's own feedbackpanel? Because now i
have two and i only want one

I have an application that gets user input in a number of WizardSteps. Each
wizardstep has its own feedbackpanel. 

This worked fine until i made the next-step-button the default button for
submitting. Now, if the input does not validate *and* the submit was done by
pressing  the wizard's own feedbackpanel is shown as well as our own.

If the next-step button is clicked, and the input does not validate, only
our own (styled) feedbackpanel shows the errormessages. 
(But if a previous submit caused the second feedbackpanel to appear, it will
still be there).

As expected, the second feedbackpanel's messages are updated only on
. Meaning that if, say 1 of 2 errors is seen to, and the next-step
button is clicked, one feedbackpanel shows one error less while the other 
still shows both. On  both feedbackpanels are updated.
-- 
View this message in context: 
http://www.nabble.com/Wizards-FeedbackPanel-tf4352766.html#a12402952
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [Wicket-user] LoadableDetachableModels and Trees

2007-08-02 Thread Ivana Cace

Thats an interesting solution!
I'm still using 1.2.6, and  went 'up'. The Tree is on a Panel, the Panel 
gets a LDM and after some pre-processing builds the Tree using  
javax.swing.tree.TreeModel.  I thought of doing the pre-processing in a 
class extending LDM and overwriting getObject, but part of the 
preprocessing is overwriting toString when creating TreeNodes and i want 
to have some flexibility here.


The nice thing about the panel is that i add ajax-links for expanding 
and collapsing in the same panel.

The panel is now updated with the rest of the page.

James McLaughlin wrote:

Hi Sean,
Sure, if you have something in your XTreeModel that needs to be
detached. But I was suggesting to make the TreeNode  implement
IDetachable. This way each TreeItem will detach its TreeNode when the
request is over. Are you asking if you need to make your TreeModel
detachable in order to have your TreeNodes detach? No, that is not
necessary.

best,
jim

On 8/1/07, Sean Sullivan <[EMAIL PROTECTED]> wrote:
  

James,

I am using Wicket 1.3's LinkTree class in my application.  I built a custom
tree model class that extends Swing's DefaultTreeModel:

   public class XTreeModel extends javax.swing.tree.DefaultTreeModel

Should my class, XTreeModel, implement IDetachable?

Sean


On 8/1/07, James McLaughlin <[EMAIL PROTECTED]> wrote:


For the trees in 1.3 (I haven't used 1.2.x in a long time), if your
TreeNodes implement IDetachable, they wil be detached when the
requestcycle completes. Then it is up to you to implement some logic
in the methods you call to retrieve the user object (such as
getUserObject()) from the TreeNode to check and perform reattachement.

best,
jim

On 8/1/07, Ivana Cace <[EMAIL PROTECTED]> wrote:
  

  What do you want to use the model for?



Is it possible to use LDMs and *Trees*?


Here's a question (from the old user-list) i'd like reopened.
I'm using a Tree to show a directory structure, the user selects folders

to upload files into. It should be updated every submit.

Is there a best practice for using a Tree with a


LoadableDetachableModel?
  

I now have a Tree that is updated on every mouseClick (in a node) and
this seems a little too much. I would like to see a behaviour similar
to  ListView.

Has anyone tried something like this?


  


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

  



--
Ivana Cace
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


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



Re: [Wicket-user] LoadableDetachableModels and Trees

2007-08-01 Thread Ivana Cace

 What do you want to use the model for?


> Is it possible to use LDMs and *Trees*?


Here's a question (from the old user-list) i'd like reopened.
I'm using a Tree to show a directory structure, the user selects folders 
to upload files into. It should be updated every submit.

Is there a best practice for using a Tree with a LoadableDetachableModel?

I now have a Tree that is updated on every mouseClick (in a node) and 
this seems a little too much. I would like to see a behaviour similar 
to  ListView.


Has anyone tried something like this?

ciao,
Ivana

--
Ivana Cace
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500




--
Ivana Cace
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


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