Hi,
I am a bit new to tapestry and have tried to fix the issue " XCF-1546 :
"Send Profile" should be on every Phone page ", and I am attaching the
patch in this mail.
Please verify it and correct me if the fix for the issue is wrong.
Thanks & Regards,
Shruthi Harish
Index: main/sipXconfig/web/context/WEB-INF/phone/PhoneSettings.properties
===================================================================
--- main/sipXconfig/web/context/WEB-INF/phone/PhoneSettings.properties (revision 0)
+++ main/sipXconfig/web/context/WEB-INF/phone/PhoneSettings.properties (revision 0)
@@ -0,0 +1 @@
+button.generateProfile=Send Profiles
Index: main/sipXconfig/web/context/WEB-INF/phone/PhoneSettings.html
===================================================================
--- main/sipXconfig/web/context/WEB-INF/phone/PhoneSettings.html (revision 13058)
+++ main/sipXconfig/web/context/WEB-INF/phone/PhoneSettings.html (working copy)
@@ -3,4 +3,12 @@
<span jwcid="settingDescription" />
</span>
<span jwcid="settingsForm" />
+ <form jwcid="@Form" delegate="bean:validator">
+ <li>
+ <input id="phone:sendProfiles"
+ jwcid="[EMAIL PROTECTED]"
+ value="message:button.generateProfiles"
+ listener="listener:generateProfiles"/>
+ </li>
+ </form>
</div>
Index: main/sipXconfig/web/src/org/sipfoundry/sipxconfig/site/phone/PhoneSettings.java
===================================================================
--- main/sipXconfig/web/src/org/sipfoundry/sipxconfig/site/phone/PhoneSettings.java (revision 13058)
+++ main/sipXconfig/web/src/org/sipfoundry/sipxconfig/site/phone/PhoneSettings.java (working copy)
@@ -9,6 +9,10 @@
*/
package org.sipfoundry.sipxconfig.site.phone;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.apache.tapestry.annotations.Persist;
import org.apache.tapestry.event.PageBeginRenderListener;
import org.apache.tapestry.event.PageEvent;
import org.apache.tapestry.html.BasePage;
@@ -43,6 +47,11 @@
public abstract PhoneContext getPhoneContext();
+ @Persist
+ public abstract Collection<Integer> getGenerateProfileIds();
+
+ public abstract void setGenerateProfileIds(Collection<Integer> ids);
+
public void pageBeginRender(PageEvent event_) {
Phone phone = getPhone();
if (phone != null) {
@@ -69,4 +78,10 @@
public String cancel() {
return ManagePhones.PAGE;
}
+
+ public void generateProfile() {
+ Collection<Integer> phoneIds = Collections.singleton(getPhone().getId());
+ setGenerateProfileIds(phoneIds);
+ }
+
}
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev