Hi Lance, I think I made some excellent progress tonight, however I seem to
be stuck at the Value Encoder and DAO. I apologize if these questions seem
simple. I specialize in UI, so this component tends to present a big
challenge for me. 

I've implemented everything you outlined without issue. 

Below is my page class containing the value encoder. I'm having a difficult
time getting the root nodes as well as the toValue node from the
CategoryNode. Do you think you could take a quick look at my code snippet
and offer a suggestion?

    @Inject
    private Session session;

    private TreeModel<CategoryNode> selectModel;

    @InjectComponent
    private Tree tree;

    public TreeModel<CategoryNode> getTreeModel() {

        if (selectModel == null) {

            ValueEncoder<CategoryNode> encoder = new
ValueEncoder<CategoryNode>() {

                @Override
                public String toClient(CategoryNode node) {
                    return node.getCategory().getId().toString();
                }

                @Override
                public CategoryNode toValue(String nodeId) {
                    return;
                }
            };
//Haven't figured out how to obtain rootNodes.
            selectModel = new DefaultTreeModel<CategoryNode>(encoder, new
CategoryTreeModelAdapter(session), rootNodes);
        }

        return selectModel;
    }

Cheers,
George

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-TreeGrid-tp5462126p5484903.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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

Reply via email to