


Put in the html to load ext and extnd as a computed value like

Then create another custom control the exact same way and put your picklist code in it.
Put these at the top of the xpage as controls.
Create a button on the page and make the name( id) What you need it to be in your extnd code. like "show-dialog-btn1", but realize in the dom it will show like "view:_id1:tabPanel2:show-dialog-btn1" so in extnd code put it in like this
// for button 1, this is an example of how to attach to click event through Javasciprt
showBtn = Ext.get('view:_id1:tabPanel2:show-dialog-btn1');
showBtn.on('click', this.showPL, this);
Using firebug in firefox makes it simple to find what these items are called, so then you can set your fields values based on what you return from the picklist.
Any ideas on how to do this better? I just started trying to use xpages yesterday, so there may be better ways of doing some of this stuff.
2 comments:
For your click-through event, check out the getClientId() function. The xPage renderer will translate your designed-element id into the how-it-happens-to-be-rendered xPage crazy id.
Or, even easier, use #{id:[your id]}
Anything that is in #{...} will be evaluated by the runtime and replaced by its result, before going to the client. The "id:" tells the runtime to generate the actual client id of the component. That take care of the context, like repeated controls.
In short:
showBtn = Ext.get('#{id:show-dialog-btn1}');
should do the trick
Post a Comment