You could do something like this:

        new PropertyColumn(new Model("your-object-model-replaces-this-one"),
"property.expression") {
            @Override
            protected IModel createLabelModel(final IModel embeddedModel) {
                return new Model() {
                    @Override
                    public Serializable getObject() {
                        PropertyModel pm = new PropertyModel(embeddedModel,
getPropertyExpression());
                        return mask((String) pm.getObject());
                    }

                    private Serializable mask(String string) {
                        return "XXX-XX-" + string.substring(string.length()
- 4);
                    }
                };
            }
        };


On Tue, Jun 3, 2008 at 4:36 PM, Steve Thompson <[EMAIL PROTECTED]>
wrote:

> I'm creating a AjaxFallbackDefaultDataTable, just as shown in the live
> examples, and things are working great.  My only problem though is
> that I would like to scramble one of the columns of information that I
> present depending on the user (in this case, the column holds SSN, and
> I want it to appear as XXX-XX-1234 for most users).
>
> Is there a way to do this easily?  Does it require building a custom
> version of AbstractColumn?
>
> Let me know and best regards as always,
>
>
> Steve
>
> --
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to