how can i get combobox in a ZK spreadsheet cell as shown in the link below?
ZK spreadsheet
Try this code...
<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<div height="100%" width="100%" apply="org.zkoss.zssessentials.config.SheetDimensionComposer">
<combobox id="sheets">
</combobox>
<spreadsheet id="spreadsheet" src="/WEB-INF/excel/config/demo_sample.xls"
maxrows="200"
maxcolumns="40"
width="100%"
height="450px"></spreadsheet>
</div>
</zk>
The combobox is a ZK Spreadsheet data validation drop down(when excel cell validation type is a list), it is not a embedded zk combobox. I think ZK Spreadsheet doesn't support to embedded a outside zk component into it yet.
I've never used ZK Spreadsheet but I think this could be the same behavior that in a classic listbox.
In a listbox you have to use a listbox in mold "select" instead a combobox, like this bellow.
<listbox id="listOfItems" model="#bind(vm.listOfItems) #template('anItem')" selectedItem="#bind(vm.selectedItem)">
<listhead>
<listheader label="Item-Label" hflex="1" />
<listheader label="Thing-Label" hflex="1" />
</listhead>
<template name="anItem" var="i">
<listitem>
<listcell>
<textbox value="#bind(i.code)" hflex="1" />
</listcell>
<listcell>
<listbox mold="select" model="#bind(vm.listOfThings) #template('aThing')" selectedItem="#bind(i.selectedThing)" hflex="1">
<template name="aThing"var="t">
<listitem label="#load(t.label)" />
</template>
</listbox>
</listcell>
</listitem>
</template>
</listbox>
Related
I am Using Infragistics XamDocManager and Its Default behavior is coming i want to re-style the tab and borders but i am not able to design
Below is my code and
also Image with Tab
Image :
<igDock:XamDockManager ToolWindowLoaded="XamDockManager_ToolWindowLoaded" AllowMaximizeFloatingWindows="True" AllowMinimizeFloatingWindows="True">
<igDock:DocumentContentHost>
<igDock:SplitPane Style="{StaticResource mysplit}">
<igDock:TabGroupPane >`<igDock:ContentPane Header="Title Data" Style="{StaticResource myNavgi}"/>
<igDock:ContentPane Header="Job Title Data" Style="{StaticResource myNavgi}"/>
<igDock:ContentPane Header="Designation Data" Style="{StaticResource myNavgi}"/>
</igDock:TabGroupPane>
</igDock:SplitPane>
</igDock:DocumentContentHost>
</igDock:XamDockManager>`
I want to create a custom dashboard in Sales Force using visual force page. I want to get data from customs objects. For this I write a apex controller
<apex:page controller="Sample">
<apex:chart height="400" width="700" data="{!pweb}">
<apex:axis type="Numeric" position="left" fields="pweb2"
title="users Count" grid="true"/>
<apex:axis type="Category" position="bottom" fields="pweb1"
title="Week Days">
</apex:axis>
<apex:lineSeries axis="left" fill="true" xField="pweb1" yField="pweb2"
markerType="cross" markerSize="4" markerFill="#FF0000"/>
</apex:chart>
</apex:page>
and creating a chart using visualforce page:
<apex:page controller="Sample">
<apex:chart height="400" width="700" data="{!pweb}">
<apex:axis type="Numeric" position="left" fields="pweb2"
title="users Count" grid="true"/>
<apex:axis type="Category" position="bottom" fields="pweb1"
title="Week Days">
</apex:axis>
<apex:lineSeries axis="left" fill="true" xField="pweb1" yField="pweb2"
markerType="cross" markerSize="4" markerFill="#FF0000"/>
</apex:chart>
</apex:page>
It's not showing any error but after saving this, when I am clicking on preview button, its not showing anything. Could anyone please help me solve it?
I created new outlook ribbon by ribbonXML
I want to show this Ribbon
1. in Appointment\Meeting window
2. in CalendarItems near 'Appointment' tab , when appointment is selected from the calendar view
I can display the two options but not together in one Ribbon.
"contextualTabs" - displays the tab in calendarItems,
"TabAddins" - displays the tab only in appointment\meeting window according to the C# code
I want this Ribbon will be displayed in both of these cases.How can I do it?
My Code:
<ribbon>
<tabs>
<tab idMso="TabAddIns" label="MyTab">
<group id="group1" label="save">
<button id="btnSaveAs" onAction="btnSaveAs_Click"
imageMso="FileSave"/>
</group>
</tab>
</tabs>
<contextualTabs>
<tabSet idMso="TabSetAppointment">
<tab id="TabAppointment" label="MyTab">
<group id="MyGroup" label="save">
<button id="btnSaveAppAs" onAction="btnSaveAs_Click" label="save"
imageMso="FileSave"/>
</group>
</tab>
</tabSet>
</contextualTabs>
</ribbon>
C#: (cause showing the ribbon only in appointment\meeting window)
public string GetCustomUI(string ribbonID)
{
if(ribbonID=="Microsoft.Outlook.Appointment")
return GetResourceText("OutlookAddIn.Ribbon.xml");
if (ribbonID == "Microsoft.Outlook.MeetingRequest")
return GetResourceText("OutlookAddIn.Ribbon.xml");
return null;
}
It looks like you need to return an appropriate Ribbon XML markup for the Explorer ribbon ID value. Try to debug the GetCustomUI method and see what values are passed.
Read more about the Ribbon UI (aka Fluent UI) in the following articles in MSDN:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
I found the solution.
I put the two options in two separate xml files and repaired getcustomUI
Ribbon.xml:
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="Ribbon_Load">
<ribbon>
<tabs>
<tab idMso="TabAddIns" label="MyTab">
<group id="group1" label="save">
<button id="btnSaveAs" onAction="btnSaveAs_Click"
imageMso="FileSave"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
CalendarToolsRibbon.xml:
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="Ribbon_Load">
<ribbon>
<contextualTabs>
<tabSet idMso="TabSetAppointment">
<tab id="TabAppointment" label="MyTab">
<group id="MyGroup" label="save">
<button id="btnSaveAppAs" onAction="btnSaveAs_Click" label="save"
imageMso="FileSave"/>
</group>
</tab>
</tabSet>
</contextualTabs>
</ribbon>
</customUI>
C#:
public string GetCustomUI(string ribbonID)
{
if (ribbonID == "Microsoft.Outlook.Appointment")
return GetResourceText("OutlookAddIn.Ribbon.xml");
if (ribbonID == "Microsoft.Outlook.MeetingRequest.Read")
return GetResourceText("OutlookAddIn.Ribbon.xml");
return GetResourceText("OutlookAddIn.CalendarToolsRibbon.xml");
}
I am using following code to edit value of a record. And the code is working fine.
<rich:popupPanel header="Edit Company Region" id="editCompanyRegionPane"
domElementAttachment="parent" width="230" height="115">
<h:form>
<h:panelGrid columns="3" id="editCompanyRegionGrid">
<h:inputHidden value="#{CompanyAdminPageModel.editCompanyRegion.companyRegionId}"
id="editcompanyRegionId">
</h:inputHidden>
<h:message for="editcompanyRegionId" />
<h:column>
<h:outputText value="Name " />
<h:inputText value="#{CompanyAdminPageModel.editCompanyRegion.name}"
id="editCompanyRegionName">
</h:inputText>
<h:message for="editCompanyRegionName" />
</h:column>
</h:panelGrid>
<h:commandButton value="Update"
action="#{CompanyAdminPageModel.companyRegionUpdate}" render="table"
oncomplete="if (#{facesContext.maximumSeverity==null}) {#{rich:component('editCompanyRegionPane')}.hide();}" />
<h:commandButton value="Cancel"
onclick="#{rich:component('editCompanyRegionPane')}.hide(); return false;" />
</h:form>
</rich:popupPanel>
I want to show a message in the same page after updating the value in database. For example: when I will click on the update button then it will call method from Bean class and then update value in the DB and after closing the popup panel it will display a message (like: updated successfully) inside the same page.
Any help please.
I used follwoing java code:
public String updateUser(Long usrId, String firstName, String lastName,
String loginName, String emailAddr) {
AllCompanyDAO aDAO = new AllCompanyDAO();
FacesContext.getCurrentInstance().addMessage("test", new javax.faces.application.FacesMessage("Success"));
return aDAO.userUpdate(usrId, firstName, lastName, loginName, emailAddr);
}
and following jsf code:
<div class="content container">
<div style="padding-left:220px;">
To see the relationships between users and regions <a href="#{appPath}/app/insertion/userRegionInfo.faces" >click here</a> <br/>
<h:message for="test"></h:message>
</div>
</div>
At the end of companyRegionUpdate(), add :
A message
FacesContext.getCurrentInstance().addMessage("test", new FacesMessage("Success"));
Where test is the absolute reference to the <h:message> JSF component.
To your <h:commandButton> , add Ajax support
Such as
<h:commandButton value="Update" >
<a4j:support oncomplete="if (#{facesContext.maximumSeverity==null}) {#{rich:component('editCompanyRegionPane')}.hide();}" action="#{CompanyAdminPageModel.companyRegionUpdate}" event="onclick" reRender="test, table" />
</h:commandButton>
Where test is the absolute reference to the <h:message> JSF component.
Instead of adding ajax support to your <h:commandButton>, you could simply use <a4j:commandButton > component which has ajax support.
I used following code that solved my problem.
1. Used the following code in the companyRegionUpdate method in java.
FacesContext.getCurrentInstance().addMessage("test", new javax.faces.application.FacesMessage("Successful"));
Then used <h:messages /> inside my desired div. <h:messages /> is different than <h:message />. In my case <h:messages /> works.
That's it. :-)
I am trying to drag an content over an html content in OL5.0.
the observations are
i am able to drag from the laszlo component to html component without any problem.
I am able to drag from laszlo to html to laszlo.
But, if i drag that view to html and then release it and then drag from html it's not working.
This is the code.
<canvas>
<view bgcolor="green" width="20" height="20" onmousedown="dragger.setAttribute('applied', true);this.bringToFront();" onmouseup="dragger.setAttribute('applied', false)">
<dragstate name="dragger"/>
</view>
<view y="50" width="100%" height="300" bgcolor="blue" onmousedown="res.apply()" onmouseup="res.remove()">
<resizestate name="res"/>
<dragstate name="drg"/>
<text width="100%" bgcolor="gray" onmousedown="parent.drg.apply()" onmouseup="parent.drg.remove()">Drag here</text>
<html id="ht" src="http://localhost:8080/lps-5.0.x/htmlTest/resource/text.html" x="15" y="15" width="${parent.width - 30}" height="${parent.height - 30}"/>
</view>
</canvas>
I have been programming in OpenLaszlo 2006 and when I have tried to use the OpenLaszlo <html> class it has been very unstable, buggy and unpredictable. I do not recommend using that particular class in any application.