don't understand model behaviour for a form and a datatable

2008-08-15 Thread puschteblume
I have a DataTable in a Panel which creates a Subpanel by an AjaxRequest 
with a form in it. The form shows the double-clicked entry of a 
DataTable's row, where the objects parameters can be changed by pressing 
the save button. The form is constructed by a CompoundPropertyModel.


And now comes the magic I don't understand: If I press the save button 
the object in the table will immediately updated although the submit 
methods are empty.


How does this behavior work? How can I interupt this update if I have a 
problem on the backend?


Heiko

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



Re: How to build a dynamic navigation bar

2008-07-22 Thread puschteblume

Here is my code that works for me. I put the navigation bar in a panel.

wicket:panel
   span wicket:id=mainNavList
 span wicket:id=navigationItem 
   a href=#
 span wicket:id=navigationLabel/span
   /a
 /span
   /span

/wicket:panel

And the java class looks like this:

public class MainMenuListView extends ListViewINavigationItem {

   private static final long serialVersionUID = 1L;
   protected static Logger logger = 
Logger.getLogger(MainMenuListView.class);
  
   public MainMenuListView(String id, ListINavigationItem dataList) {

   super(id, dataList);
   }
  
  
   @Override

   protected void populateItem(ListItem item) {
   INavigationItem navItem = (INavigationItem) item.getModelObject();
   ResourceModel rModel = new ResourceModel(navItem.getResourceKey());
   BookmarkablePageLink pageLink = new 
BookmarkablePageLink(navigationItem, navItem.getNavTargetClass());
   item.add(new BookmarkablePageLink(navigationItem, 
navItem.getNavTargetClass()).add(new Label(navigationLabel, rModel)));

   }

}


Alexander Landsnes Keül wrote:

They need the same wicket:id yes, but that doesn't mean that they need the same 
text or targets. Just create as many links as you want/need, with whatever 
behaviour they need. Just make sure they all have the same id :)

Alex

-Opprinnelig melding-
Fra: Edbay [mailto:[EMAIL PROTECTED] 
Sendt: 22. juli 2008 19:00

Til: users@wicket.apache.org
Emne: RE: How to build a dynamic navigation bar


Thanks for the quick reply.

Wouldn't this force all links to have the same wicket ids (linkid)?
I'd like to be able to have the line items look like this:

ul wicket:id=list
li # Link01 text here /li
li # Link02 text here /li
li # Link03 text here /li
/ul





Alexander Landsnes Keül wrote:
  

I'd use a ListView :)

Assuming this lil code

add( new ListView(list, linkList )
{
public void populateItem(ListItem item)
{
item.add( (Link)linkList );
}
});

You'd have the html look something like this

ul wicket:id=list
li # Link text here /li
/ul

Just remember to add whatever you want to the item, and not just use
add(...). 


http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/list/ListView.html

Alex

-Opprinnelig melding-
Fra: Edbay [mailto:[EMAIL PROTECTED] 
Sendt: 22. juli 2008 18:08

Til: users@wicket.apache.org
Emne: How to build a dynamic navigation bar


Hello, 
  
I want to be able to build a left-side dynamic navigation bar based on

user
permissions. For example, if the user does not have access to the Prices
page, I do not want to show the Prices link on the navigation bar. Also,
since the link will point to a Wicket page, it has to be a Wicket link. 

This is how I would like the NavBar to appear: 


div id=mainNav
ul
li Home /li
li Prices /li
li Contracts /li
li Products /li
li Transactions /li
/ul
/div

I tried using ListView, but I could not get it to work, as it forces the
wicket id of the line items to be all the same. 



Thanks in advance.
--
View this message in context:
http://www.nabble.com/How-to-build-a-dynamic-navigation-bar-tp18592899p18592899.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


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






  



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



StyleSheetReference - what does href mean?

2008-07-17 Thread puschteblume

Hello

First of all .. thanks for this wonderful peace of software.

I don't understand what the generate reference in the stylesheet link 
mean. The generated output is:


head
link rel=stylesheet type=text/css 
href=resources/net.form105.web.base.page.login.LoginPage/LoginPage.css wicket:id=styleSheet/
/head

This works as it should.

In the LoginPage.class I defined following:

add(new StyleSheetReference(styleSheet, new 
ResourceReference(LoginPage.class, LoginPage.css)));


But what means the generated reference?

resources/net.form105.web.base.page.login.LoginPage/LoginPage.css

What is the resources folder? I can't find them?

Sorry for the stupid question. I don't have some html experience ...

Thanks Heiko

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